# K8s jobs created by Drone should include labels

**URL:** <https://drone.discourse.group/t/k8s-jobs-created-by-drone-should-include-labels/5538>\
**Category:** Drone Support\
**Created:** [February 5, 2019, 10:22am UTC](https://drone.discourse.group/t/k8s-jobs-created-by-drone-should-include-labels/5538 "2019-02-05T10:22:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![max-rocket-internet](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/max-rocket-internet/32/5574_2.png) [@max-rocket-internet](https://drone.discourse.group/u/max-rocket-internet)\
**Post date:** [February 5, 2019, 10:22am UTC](https://drone.discourse.group/t/k8s-jobs-created-by-drone-should-include-labels/5538/1 "2019-02-05T10:22:17Z")

</div>

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`

---

<div class="post-metadata">

**Author:** ![bradrydzewski](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/bradrydzewski/32/3513_2.png) [@bradrydzewski](https://drone.discourse.group/u/bradrydzewski)\
**Post date:** [February 5, 2019, 5:09pm UTC](https://drone.discourse.group/t/k8s-jobs-created-by-drone-should-include-labels/5538/2 "2019-02-05T17:09:53Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![max-rocket-internet](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/max-rocket-internet/32/5574_2.png) [@max-rocket-internet](https://drone.discourse.group/u/max-rocket-internet)\
**Post date:** [February 6, 2019, 9:12am UTC](https://drone.discourse.group/t/k8s-jobs-created-by-drone-should-include-labels/5538/3 "2019-02-06T09:12:22Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![bradrydzewski](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/bradrydzewski/32/3513_2.png) [@bradrydzewski](https://drone.discourse.group/u/bradrydzewski)\
**Post date:** [February 6, 2019, 4:45pm UTC](https://drone.discourse.group/t/k8s-jobs-created-by-drone-should-include-labels/5538/4 "2019-02-06T16:45:45Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![max-rocket-internet](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/max-rocket-internet/32/5574_2.png) [@max-rocket-internet](https://drone.discourse.group/u/max-rocket-internet)\
**Post date:** [February 6, 2019, 5:07pm UTC](https://drone.discourse.group/t/k8s-jobs-created-by-drone-should-include-labels/5538/5 "2019-02-06T17:07:26Z")

</div>

OK [done](https://github.com/drone/drone-runtime/issues/45)
