Plugin for woodpecker to deploy helm charts using helm3
Go to file
Erin Call ef66bc0f92
Document parameters in a single markdown file [#8]
I was unhappy with the comments-in-yaml approach; it required
duplicating a lot of information and it was hard to find a balance
between "usefully thorough" and "readably concise.""
2019-12-24 14:36:39 -08:00
cmd/drone-helm Non-0 exit status on error 2019-12-16 15:46:37 -08:00
docs Document parameters in a single markdown file [#8] 2019-12-24 14:36:39 -08:00
internal Rough-draft upgrade settings documentation [#8] 2019-12-23 09:49:01 -08:00
.drone.yml update drone.yml to publish to docker hub 2019-12-19 13:38:04 -08:00
.gitignore Make it so 2019-11-21 11:35:50 -08:00
Dockerfile Initialize kubernetes config on upgrade 2019-12-16 15:41:04 -08:00
go.mod Run golint during drone builds 2019-12-09 15:27:56 -08:00
go.sum Run golint during drone builds 2019-12-09 15:27:56 -08:00
kubeconfig Initialize kubernetes config on upgrade 2019-12-16 15:41:04 -08:00
README.md Document parameters in a single markdown file [#8] 2019-12-24 14:36:39 -08:00

Drone plugin for Helm 3

This plugin provides an interface between Drone and Helm 3:

  • Lint your charts
  • Deploy your service
  • Delete your service

The plugin is inpsired by drone-helm, which fills the same role for Helm 2. It provides a comparable feature-set and the configuration settings are backwards-compatible.

Example configuration

The examples below give a minimal and sufficient configuration for each use-case. For a full description of each command's settings, see docs/parameter_reference.md.

Linting

steps:
  - name: lint
    image: pelotech/drone-helm3
    settings:
      helm_command: lint
      chart: ./

Deployment

steps:
  - name: deploy
    image: pelotech/drone-helm3
    settings:
      helm_command: upgrade
      chart: ./
      release: my-project
    environment:
      API_SERVER: https://my.kubernetes.installation/clusters/a-1234
      KUBERNETES_TOKEN:
        from_secret: kubernetes_token

Deletion

steps:
  - name: uninstall
    image: pelotech/drone-helm3
    settings:
      helm_command: uninstall
      release: my-project
    environment:
      API_SERVER: https://my.kubernetes.installation/clusters/a-1234
      KUBERNETES_TOKEN:
        from_secret: kubernetes_token

Upgrading from drone-helm

The setting names for drone-helm3 are backwards-compatible with those for drone-helm, so the only mandatory step is to update the image clause so that drone uses the new plugin.

There are some recommended changes, though:

  • If your service_account is currently tiller, change it to a service account with more restricted permissions.

    • If possible, remove the tiller account entirely, since its superuser status presents a security risk.
  • Remove outdated settings that have no effect in drone-helm3:

  • purge -- this is the default behavior in Helm 3

  • recreate_pods

  • tiller_ns

  • upgrade

  • canary_image

  • client_only

  • stable_repo_url