
Kubernite is a Drone Plugin for Kubernetes written in golang using the official client-go kubernetes api client library.
Kubernite was built out of a desire to achieve complete automation of the deployment stage of the development cycle of an application running in a kubernetes cluster. To that end the plugin was developed with the following functionality:
- name: deploy
image: tbcloud/kubernite:<version>
settings:
# url for accessing the kubernetes server
kubernetes_server:
from_secret: kubernetes_server
# cluster ca certificate (for TLS)
kubernetes_cert_data:
from_secret: kubernetes_cert_data
# client ca certificate (for TLS)
kubernetes_client_cert_data:
from_secret: kubernetes_client_cert_data
# for cluster access
kubernetes_client_key_data:
from_secret: kubernetes_client_key_data
# path to deployment manifest file
deployment_file_path: src/deployments/kubernetes/Deployment.yaml
See additional examples.
| Setting | Description |
|---|---|
| kubernetes_server | URL of kubernetes server. Can be found in the kube config at key 'cluster.server'. The kube config can typcially be found at $USER/.kube/config or by running kubectl config view. |
| kubernetes_cert_data | Root certificate used to verify the certificate presented by the API server when transport security is being established. Can be found in the kube config at key 'cluster.certificate-authority-data'. The kube config can typcially be found at $USER/.kube/config. |
| kubernetes_client_cert_data | Public client certificate data for client X509 certificate. Used in authentication process. Can be found in kube config at key 'user.client-certificate-data'. See authenticating with X509 Client Certs, and generating certificates. Can be found in the kube config at key 'user.client-key-data'. The kube config can typcially be found at $USER/.kube/config. Note that if you are using a hosted service such as Digital Ocean KaaS you may need to download your config file from them to get access to this data. |
| kubernetes_client_key_data | Private key data for client X509 certificate. Used in authentication process. Can be found in kube config at key 'user.client-key-data'. See authenticating with X509 Client Certs, and generating certificates. Can be found in the kube config at key 'user.client-key-data'. The kube config can typcially be found at $USER/.kube/config. Note that if you are using a hosted service such as Digital Ocean KaaS you may need to download your config file from them to get access to this data. |
| deployment_file_path | Path to deployment manifest .yaml or .yml file which describes the deployment to be redeployed by kubernite. |
| deployment_tag_repository_path | [optional - default is /drone/src] Path to root of repository from which tag/commit information is drawn to update the kubernetes.io/change-cause annotations in the deployment file. Defaults to default drone working directory (i.e. /drone/src) which is typically the root of the repository which has triggered the deployment. |
| dry_run | [optional - default is false] If set, no deployment takes place and the updated deployment file which would be applied to the cluster is printed out in json format. |
| deployment_file_repository_path | [optional - no default] Path to root of repository to which deployment file with updated kubernetes.io/change-cause annotations will be committed and pushed if settings.commit_deployment is set. |
| commit_deployment | [optional - default is false] If set, deployment file with updated kubernetes.io/change-cause annotations will be committed and pushed to repository with it's root at settings.deployment_file_repository_path. |
A redeployment of an existing deployment is triggered when the pod template part of the deployment's .spec section is changed.

Content type
Image
Digest
Size
19.9 MB
Last updated
about 7 years ago
docker pull tbcloud/kubernite