This plugin will let BitOps to automatically deploy helm
templates to kubernates running on any provider.
helm
plugin uses bitops.config.yaml
located in the operations repo when deploying resources using helm templates.
helm:
cli:
namespace: bitops
timeout: 60s
set:
- "key1=value1"
- "key2=value2"
debug: false
atomic: true
force: true
dry-run: true
options:
skip-deploy: false
release-name: bitops-release
uninstall-charts: "chart1,chart2"
k8s:
fetch:
kubeconfig: true
cluster-name: my-cluster
plugins:
This version of helm
plugin loops over the list of all helm chart folders of the operations repo and install in a sequential manner.
However if a helm chart folder name is passed in BITOPS_ENVIRONMENT_HELM_SUBDIRECTORY
variable in the docker run, this plugin will only install that specific helm chart. Below is the sample docker run showing how to install only one helm chart.
docker run --rm --name bitops \
-e AWS_ACCESS_KEY_ID="${BITOPS_AWS_ACCESS_KEY_ID}" \
-e AWS_SECRET_ACCESS_KEY="${BITOPS_AWS_SECRET_ACCESS_KEY}" \
-e AWS_DEFAULT_REGION="${BITOPS_AWS_DEFAULT_REGION}" \
-e BITOPS_ENVIRONMENT="${ENVIRONMENT}" \
-e BITOPS_ENVIRONMENT_HELM_SUBDIRECTORY="ingress-nginx" \
-v $(pwd):/opt/bitops_deployment \
bitops-core:latest
- BitOps Property:
namespace
- Environment Variable:
NAMESPACE
- default:
""
- required:
"true"
namespace scope for this request. This is a required parameter.
- BitOps Property:
timeout
- Environment Variable:
TIMEOUT
- default:
"500s"
time to wait for any individual Kubernetes operation (like Jobs for hooks)
- BitOps Property:
set
- Environment Variable:
HELM_SET_FLAG
- default:
{}
list of "key=value" strings to pass in to helm
via --set
- BitOps Property:
debug
- Environment Variable:
HELM_DEBUG
- default:
""
enable verbose helm output
- BitOps Property:
atomic
- Environment Variable:
TODO
- default:
""
if set, the installation process deletes the installation on failure
- BitOps Property:
force
- Environment Variable:
TODO
- default:
""
sets helm's --force
flag
- BitOps Property:
dry-run
- Environment Variable:
TODO
- default:
""
simulate an install
- BitOps Property:
skip-deploy
- Environment Variable:
HELM_SKIP_DEPLOY
- default:
""
- Description: If set to true, regardless of the stack-action, deployment actions will be skipped.
- BitOps Property:
release-name
- Environment Variable:
HELM_RELEASE_NAME
- default:
""
sets helm release name
- BitOps Property:
uninstall
- Environment Variable:
HELM_UNINSTALL
- default:
""
If true, this chart will be uninstalled instead of deployed/upgraded. If the environment variable HELM_UNINSTALL
is passed in to the container, all BitOps managed charts for a given environment will be uninstalled.
- BitOps Property:
k8s
configure cluster access. Has the following child-properties. Should provide one of k8s.kubeconfigpath
or k8s.fetch.kubeconfig & k8s.fetch.cluster-name
. Defaults to k8s.fetch.kubeconfig & k8s.fetch.cluster-name
- BitOps Property:
k8s.kubeconfigpath
- Environment Variable:
KUBE_CONFIG_PATH
- default:
""
relative file path to .kubeconfig file
- BitOps Property:
k8s.fetch
k8s.fetch kubeconfig using cloud provider auth
- BitOps Property:
k8s.fetch.kubeconfig
- Environment Variable:
FETCH_KUBECONFIG
- default:
true
enables/disables k8s.fetch
- BitOps Property:
k8s.fetch.cluster-name
- Environment Variable:
CLUSTER_NAME
- default:
""
cloud kubernetes cluster name for kubeconfig fetching.
This section of bitops.config.yml
is unique to helm and allows the customization of helm plugins
- BitOps Property:
s3
Configure helm s3 plugin with the following properties
- BitOps Property:
s3.region
- Environment Variable:
HELM_PLUGIN_S3_REGION
AWS region containing s3 bucket
- BitOps Property:
s3.bucket
- Environment Variable:
HELM_CHARTS_S3_BUCKET
AWS s3 bucket name
Although not captured in bitops.config.yml
, the following environment variables can be set to further customize behaviour
Will skill all helm executions. This superseeds all other configuration
Comma separated string. If any of the charts to be deployed match one of the chart names listed here, it will be uninstalled with helm uninstall $HELM_RELEASE_NAME
instead of deployed/upgraded.