open-policy-agent / gatekeeper

🐊 Gatekeeper - Policy Controller for Kubernetes
https://open-policy-agent.github.io/gatekeeper/
Apache License 2.0
3.72k stars 765 forks source link

feat: Add commonLabels to Deployments #3684

Closed wyattfry closed 2 weeks ago

wyattfry commented 3 weeks ago

What this PR does / why we need it: This adds Kubernetes-recommended labels to the Deployment manifests. https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/

Which issue(s) this PR fixes: No corresponding issue

Special notes for your reviewer: The labels were present on the Pods but not on the Deployments themselves. I tried my best to add the labels in a way that is consistent with the precedent set by the existing code, but I've never worked on a generated chart like this, so I may have made some rookie mistakes. If there's a cleaner way I'm completely open to it.

wyattfry commented 2 weeks ago

@JaydipGabani @maxsmythe @ritazh @abhipatnala Could I please have a review?

codecov-commenter commented 2 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 47.56%. Comparing base (3350319) to head (a1bb0a0). Report is 177 commits behind head on master.

:exclamation: There is a different number of reports uploaded between BASE (3350319) and HEAD (a1bb0a0). Click for more details.

HEAD has 1 upload less than BASE | Flag | BASE (3350319) | HEAD (a1bb0a0) | |------|------|------| |unittests|2|1|
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #3684 +/- ## ========================================== - Coverage 54.49% 47.56% -6.93% ========================================== Files 134 236 +102 Lines 12329 19786 +7457 ========================================== + Hits 6719 9412 +2693 - Misses 5116 9488 +4372 - Partials 494 886 +392 ``` | [Flag](https://app.codecov.io/gh/open-policy-agent/gatekeeper/pull/3684/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-policy-agent) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/open-policy-agent/gatekeeper/pull/3684/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-policy-agent) | `47.56% <ø> (-6.93%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-policy-agent#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

JaydipGabani commented 2 weeks ago

@open-policy-agent/gatekeeper-maintainers PTAL