This container upgrades a desired deployment on your k8s cluster.
Environment Variable | Required | Description | Example |
---|---|---|---|
RANCHER_URL | ✔️ | More | https://rancher.example.com/v3 |
RANCHER_TOKEN | ✔️ | More | token-8rhz5:jnpc...l74d |
KUBERNETES_NAMESPACE | ✔️ | Namespace of your kubernetes Cluster | testing |
KUBERNETES_DEPLOYMENT | ✔️ | The deployment Ressource you want to upgrade. Pass multiple deployments by using comma seperated list. (e.g. "foo,bar,baz") | backend-api, nginx-web |
KUBECTL_OPTIONS | ✖️ | Arguments passing to kubectl accordingly named to official docs. | '--insecure-skip-tls-verify -...' |
RANCHER_CONTEXT | ✖️ | In case you've got multiple kubernetes cluster you have to specify a cluster by the context. | c-hg9ng:p-49nnp |
STAMP | ✔️ | The value, you want to inject into your container. For instance the commit_sha. | $(date) |
docker run --rm \
-e RANCHER_URL='<rancher-url> \
-e RANCHER_TOKEN='<bearer-token> \
-e KUBECTL_OPTIONS='--insecure-skip-tls-verify' \
-e KUBERNETES_NAMESPACE='<namespace>' \
-e KUBERNETES_DEPLOYMENT='<deployment-name>' \
-e STAMP="ba1351s12" \
quving/rancher-cicd:latest
More information can be found here. https://rancher.com/docs/rancher/v2.5/en/user-settings/api-keys/
Important It's important to select 'No scope'. Otherwise the rancher-authorization will not work!
- Rancher API-KEYS