No description
| .drone.yml | ||
| Dockerfile | ||
| entrypoint.sh | ||
| LICENSE | ||
| README.md | ||
Drone Infisical Kubectl Helm
This Docker image is designed for CI/CD pipelines, specifically for use with Drone CI. It provides a pre-configured environment with kubectl and helm for managing Kubernetes deployments. The kubeconfig is securely loaded via Infisical, ensuring sensitive configuration data remains protected.
Features
kubectl: Kubernetes CLI tool for cluster management.helm: Package manager for Kubernetes.- Infisical Integration: Securely loads the
kubeconfigusing environment variables. - Drone CI Compatibility: Tailored for use in Drone CI pipelines.
Environment Variables
The following environment variables must be set for the image to function correctly:
| Variable | Description |
|---|---|
CLIENT_ID |
The client ID for Infisical authentication. |
CLIENT_SECRET |
The client secret for Infisical authentication. |
PROJECT_ID |
The Infisical project ID containing the secrets. |
PROJECT_ENV |
The environment (e.g., dev, stg, prod) within the Infisical project. |
KUBECONFIG_NAME |
The name of the kubeconfig secret in Infisical (default: KUBECONFIG). |
INFISICAL_API_URL |
The URL of the Infisical API (optional, for self-hosted instances). |
Usage
Example Drone Pipeline
Below is an example of how to use this Docker image in a Drone CI pipeline:
kind: pipeline
type: docker
name: default
steps:
- name: deploy
image: docker.io/criscolosimo04/drone-infisical-kubectl-helm:0.1.8
environment:
CLIENT_ID:
from_secret: client_id
CLIENT_SECRET:
from_secret: client_secret
PROJECT_ID:
from_secret: project_id
INFISICAL_API_URL:
from_secret: infisical_api_url
PROJECT_ENV: stg
commands:
- /entrypoint.sh
- kubectl get pod
- helm install nginx
/entrypoint.sh
The entrypoint.sh script is required and must be run before executing kubectl or helm commands. It handles the following:
- Fetches the
kubeconfigfrom Infisical using the provided environment variables. - Exports the
kubeconfigso it is accessible tokubectlandhelm.
Requirements
- An Infisical machine account with the required secrets configured.
- Kubernetes cluster access properly set up in the
kubeconfigfile. - Drone CI secrets configured to securely provide the environment variables.
License
This project is licensed under the MIT License.