drone / charts

Helm charts for the Drone platform on Kubernetes
Other
168 stars 118 forks source link

drone Provide for annotations to kubernetes service #32

Closed james-mcgoodwin closed 2 years ago

james-mcgoodwin commented 3 years ago

This change allows the user to provide annotations to the k8s svc for drone.

In our case, we rely on service annotations to interact with GCP NEGs via a controller that reads them.

This adds to the templates/service.yaml an optional 'annotations' field that can be populated by the user, or left empty by default.

This shouldn't be conflaited with the ingress annotations. We specifically do not use k8s ingress and we should be able to articulate annotations for either, both, or none of the service/ingress resources.

james-mcgoodwin commented 3 years ago

Popping this commit message out since it changes a default value in values.yaml:

CI fails to pass because values.yaml contains an invalid null string. Running 'helm lint ./drone' fails Even calling helm lint with an additional '-f ./drone/ci/test-values.yaml' still fails to validate values.yaml

$  helm lint ./drone/ -f ./drone/ci/test-values.yaml
==> Linting ./drone/
[ERROR] values.yaml: - env.DRONE_SERVER_HOST: String length must be greater than or equal to 3

Error: 1 chart(s) linted, 1 chart(s) failed

I have updated values.yaml with the example string used in the drone documentation page for the DRONE_SERVER_HOST value: https://readme.drone.io/server/reference/drone-server-host/

cognifloyd commented 3 years ago

values.schema.json needs an entry for service.annotations as well.

jimsheldon commented 2 years ago

Apologies for the delay on this. I agree it would be valuable to be able to set annotations on the service. If you can resolve the conflicts, I will review. Thanks!

outergod commented 2 years ago

I'm also affected by this and would love to see it resolved.

jimsheldon commented 2 years ago

78 will add this feature, closing this PR.