K8s jobs created by Drone should include labels


#1

I’m currently testing the release candidates of Drone on K8s and would like to suggest some changes around labels and perhaps annotations.

  1. Use the label k8s-app=drone for jobs. This is standard for almost every resource on k8s and is currently missing from pipeline jobs created by Drone. This would allow a user to run kubectl delete job -l k8s-app=drone for example.

  2. Add more labels. Labels for build ID, repo, etc. I see we have annotations for these but not labels. Are the annotations used/read by either Drone itself or drone/controller? If not, then I would move all the annotations to the labels. If they are used, then duplicate some of this data to the labels so they can be used with kubectl <verb> -l xxx=yyy


#2

thanks for the feedback, there is an open issue you can subscribe to for updates: https://github.com/drone/drone-runtime/issues/38


#3

Thanks for the reply @bradrydzewski!

That issue is unrelated. It’s about adding annotations that would be used by Kube2IAM. Not really related to my feature request about fixing labelling.

Should I create an issue on Github? Is that the proper way for Drone feature requests?


#4

If you have a separate feature request related to kubernetes, please create an issue at https://github.com/drone/drone-runtime. Also please note that feature requests typically require a volunteer to implement.


#5

OK done