Plugin for woodpecker to deploy helm charts using helm3
Go to file
2020-01-02 12:29:32 -08:00
.github Encourage good issues with issue templates [#12] 2019-12-25 12:03:36 -08:00
assets Mention that EKS isn't currently supported [#5] 2019-12-27 10:49:22 -08:00
cmd/drone-helm Merge remote-tracking branch 'origin/master' into help-by-default 2019-12-26 12:23:14 -08:00
docs Merge branch 'master' into keep-history 2020-01-02 12:29:32 -08:00
internal Merge branch 'master' into keep-history 2020-01-02 12:29:32 -08:00
.drone.yml Provide better e2e-testing instructions [#12] 2019-12-26 15:21:34 -08:00
.gitignore Directions on how to setup custom build of images till PR gets merged 2019-12-31 14:19:56 -05:00
CODE_OF_CONDUCT.md Use the Contributor Covenant code of conduct [#12] 2019-12-25 11:47:41 -08:00
Dockerfile pin version of docker image to alpine/helm:3.0.2 2019-12-31 17:57:32 -05:00
go.mod Test yaml validity without a new dependency [#15] 2019-12-26 12:53:36 -08:00
go.sum Run golint during drone builds 2019-12-09 15:27:56 -08:00
LICENSE Use the apache 2.0 license [#23] 2019-12-27 11:18:13 -08:00
README.md Pass --keep-history when so instructed [#24] 2020-01-02 10:58:58 -08:00

Drone plugin for Helm 3

Build Status Go Report

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: ./

Installation

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

Uninstallation

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

drone-helm3 is largely backwards-compatible with drone-helm. There are some known differences:

  • You'll need to migrate the deployments in the cluster helm-v2-to-helm-v3.
  • EKS is not supported. See #5 for more information.
  • The prefix setting is no longer supported. If you were relying on the prefix setting with secrets: [...], you'll need to switch to the from_secret syntax.
  • During uninstallations, the release history is purged by default. Use keep_history: true to return to the old behavior.
  • Several settings no longer have any effect. The plugin will produce warnings if any of these are present:
    • purge -- this is the default behavior in Helm 3
    • recreate_pods
    • tiller_ns
    • upgrade
    • canary_image
    • client_only
    • stable_repo_url

Since helm 3 does not require Tiller, we also recommend switching to a service account with less-expansive permissions.

Contributing

This repo is setup in a way that if you enable a personal drone server to build your fork it will build and publish your image (makes it easier to test PRs and use the image till the contributions get merged)

  • Build local DRONE_REPO_OWNER=josmo DRONE_REPO_NAME=drone-ecs drone exec
  • on your server (or cloud.drone.io) just make sure you have DOCKER_USERNAME, DOCKER_PASSWORD, and PLUGIN_REPO set as secrets