Skip to content

A simple solution to upgrade your k8s-deployment in your k8s-cluster managed by rancher.

Notifications You must be signed in to change notification settings

Quving/rancher-cicd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RANCHER-CICD

Build Status

Description

This container upgrades a desired deployment on your k8s cluster.

Available Environment-Variables

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)

Usage

Example: Run a docker-container simply.

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

FAQ

What Rancher-API-Key?

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!

Useful Resources

About

A simple solution to upgrade your k8s-deployment in your k8s-cluster managed by rancher.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published