Is your feature request related to a problem? Please describe.
It seems that DRONE_KUBERNETES_ENABLED is deprecated in favor of the new drone/drone-runner-kube Image (kube-runner.docs.drone.io).
Describe the solution you'd like
Let's use kube-runners instead of the (legacy) drone/controller.
Should have:
drone/drone-runner-kube:latest$releasename-runner-kube), Role and RoleBindinghttps://kube-runner.docs.drone.io/installation/installation/#step-3-install
Nice to have:
$releasename-runner-kube-builder), Role and RolebindingProbably out of scope:
Configuration could look like this:
# values.yml
# breaking change:
# sets the server's DRONE_KUBERNETES_ENABLED variable to false
# but starts kube-runner Deployments instead
server:
kubernetes: true
runner:
kubernetes:
- name: team1
namespace: drone-runner-kube
serviceAccount: drone-runner-kube
replicas: 2
affinity: ...
resources: ...
ui:
enabled: true # creates a Service for the runner dashboard
username: admin
password: password123 # or:
secret: drone-runner-kube-dashboard # requires a secret containing username and password
ingress: # creates Ingress
enabled: true
annotations: ...
hosts: ...
extraEnvVars:
# https://kube-runner.docs.drone.io/installation/reference/
DRONE_NAMESPACE_DEFAULT: drone-builds-team1
DRONE_NAMESPACE_RULES: drone-builds-team1:team1/*
DRONE_SERVICEACCOUNT_DEFAULT: drone-runner-kube-builder
- name: team2
...
```
**Describe alternatives you've considered**
Treat kube-runner as agent:
```yaml
# values.yml
agent:
replicas: 2
image:
agent:
repository: docker.io/drone/drone-runner-kube
tag: latest
server:
kubernetes: false
Contra:
kubernetes to false for this to work which looks strange for a "cloud native" setup with kube-runnersAdditional context
@christian-roggia, @zakkg3, what do you think?
I could supply most of the templates required.
I support this. I just hacked up the existing chart to get kube runner working (so I could get features like metadata annotations). Is it popular to run anything other than the kube runner? Could we simplify this chart by removing that support going forward?
@pauvos i think your pr for sec policy its going to be merged, feel free to open another pr for this.
+1 would like to have this. probably going to try hacking the existing chart until kube-runner is supported by helm. @xrl any tips on this in the mean time?
@one000mph I think this fork has made the effort of migrating to the kube-runner.
https://github.com/HighwayofLife/helm-charts-drone/commits/master
Following up on my previous comment -- that fork didn't go far enough to support the kube-runner. I've spent some time making it work in my repo found here: https://github.com/jonathan-mothership/helm-charts-drone
If it works for others I can submit a PR to this chart.
Following up on my previous comment -- that fork didn't go far enough to support the kube-runner. I've spent some time making it work in my repo found here: https://github.com/jonathan-mothership/helm-charts-drone
If it works for others I can submit a PR to this chart.
sharing is caring, feel free to submit a PR. please document as best as possible, read the docs on how to submit a PR, leave defaults to disable (as the docs say) and so on.
thanks!
@jonathan-mothership I heavily modified your repository and created a pull request https://github.com/helm/charts/pull/20831
@zakkg3 I did it here https://github.com/helm/charts/pull/20831
And also, I added support for k8s secrets, as .drone.yaml can refers to passwords stored in k8s Secret objects
Most helpful comment
@christian-roggia, @zakkg3, what do you think?
I could supply most of the templates required.