Hi there! So I’ve installed Drone helm chart following the instructions in the chart repo, and it seems to be running just fine (note: there’s just one pod running, the server, no agents, even though agent configuration is still present in values.yaml).
Now, my next step would be to run the build, of course, and to do that, I need to pass some environment variables down to the build process. The problem is, I have tried various different approaches, but still couldn’t get through. Here’s the pipeline that I have:
(1) the chart in Helm stable is broken and does not install the kubernetes runner, which is the only supported method for running Drone on kubernetes. Instead, the stable chart defaults to experimental features that were deprecated almost a year ago.
Due to the poor state of the stable Helm chart, we have decided to provide our own official chart. Just this week, a member of our community began working on a new chart from scratch. It is still a work in progress, see https://github.com/drone/charts
(2) to use kubernetes secrets you need to install the kubernetes secret extension. The stable helm chart does not install the kubernetes secret extension, to my knowledge. The drone/charts repositories does have a chart for installing the kubernetes secrets extension.
(3) once the kubernetes runner is properly installed, you need to make sure your yaml configuration file uses the appropriate kind and type. For example:
The example in the docs doesn’t have it, so I assumed that the runner defaults to kubernetes when running in a cluster.
when no type is defined the system assumes the pipeline is of type docker, for legacy reasons. The type parameter, and multiple runners, were introduced in 1.2 and we did not want to break existing configurations.
we cannot introduce any breaking changes to 1.x, but it would make sense in 2.x to throw an exception when the type is blank. That would certainly help in situations like this.
I have a few questions regarding using the Kubernetes runner to close it off:
Is this an officially recommended/supported way to run Drone at this point, or is it better to use a docker based set-up?
Is there a way to specify the CPU and memory requests/limits values for the job pods, or are they always using the namespace/cluster defaults?
Back to my original question of using Kubernetes secrets, you (and the documentation) mention that an extension has to be installed, but I couldn’t find any information regarding that. The drone/charts repo doesn’t have any actual charts at all at this point. Also, is this an extension for the runner or the server?
Thanks @ashwilliams1 and sorry for asking the questions that have answers in the docs. Guess I had some troubles navigating it—I’ll try to recap those and submit some issues to the docs repo later. It would definitely benefit from a few more cross-links (e.g. the page explaining the usage of Kubernetes secrets mentions the extension but doesn’t have the link to the page describing its installation) and maybe some pipeline examples containing all possible options for a given runner.
Anyhow the first question was more like “is running Drone in Kubernetes the right thing in the long term” rather “is using Kubernetes runner the right way to use Drone in Kubernetes”, but I guess you’ve cleared my doubts, thank you.
I understand that this extension will mostly be used together with Drone Kubernetes runner, and the Helm chart to install this extension has just been pushed yesterday to https://github.com/drone/charts/tree/master/charts/drone-kubernetes-secrets, but the page itself is somewhat confusing. It gives an example of docker run command, but is it actually intended to be run that way? And if yes, how is it supposed to connect to a cluster to retrieve the secrets?