Files
plugin-drone-kube-apply/README.md
T

1.6 KiB

drone-kubano

A simple Drone plugin for managing Kubernetes deployments. Follows from vallard/drone-kube but with dependency management system, improved docs, examples and restructured code.

Usage

Add the following build step to your drone pipeline definition.

drone.yaml partial example

- name: Deploy app
  image: danielgormly/kubano
  settings:
    template: path/to/deployment.yaml # within repo
    ca: # BASE64 encoded string of the K8s CA cert
    Server: 10.0.0.24 # K8s master node address
    Token: # Service account token to a service account that can manage deployments
    Namespace: custom # Custom namespace. (Optional, defaults to `default`)
    custom: string # Available to be referenced in template rendering as PLUGIN_CUSTOM
    master_alias: production # Custom setting example. Available as PLUGIN_MASTER_ALIAS

deployment templates

Deployment config files are first interpreted by aymerick/raymond (handlebarsjs equivalent). You can use all available raymond expressions, DRONE_*, PLUGIN_* environment variables. Use {{VARIABLE}} to add interpolated expressions e.g.

deployment.yaml partial example

spec:
  containers:
  - name: nginx
    image: 10.0.0.24:443/danielgormly:{{DRONE_BRANCH}}

Development