ipedrazas / drone-helm

Helm (Kubernetes) plugin for drone.io
MIT License
121 stars 90 forks source link

support for multiple pre-baked kube/helm versions #95

Closed pulsar256 closed 5 years ago

pulsar256 commented 5 years ago

Do not merge, this needs to be discussed.

I was toying with the idea to support multiple versions of kubectl and helm pre-baked into the docker image. setup-environments.sh will download the 3 latest major releases of each package and the entrypoint.sh "wrapper" will setup the $PATH based on the selected versions via HELM_VERSION and KUBECTL_VERSION environment variables.

I have included the following versions in this PR:

helm:

kubectl:

use the plugin / image as usual and pass the KUBECTL_VERSION and HELM_VERSION environments according to the supported version list above.

A major drawback of this PR is the increased image size (122MB -> 486MB), therefore I am not that sure if this approach is sane.

If it turns out that I am the only one here with concerns about that image size, I will gladly finish the PR by adding some sanity checks, documentation and refactor the versions to be configured externally.

ipedrazas commented 5 years ago

I think it's worth the cost of the size. Having an easy way to define which versions you want to use is going to increase the flexibility of the plugin 😄