-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
policy server use kubernetes recommended labels #1037
policy server use kubernetes recommended labels #1037
Conversation
All the resources associated with Policy Server are now using the labels recommended by Kubernetes, see here: https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/#labels Signed-off-by: Flavio Castelli <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1037 +/- ##
==========================================
+ Coverage 72.47% 72.62% +0.15%
==========================================
Files 30 30
Lines 3760 3781 +21
==========================================
+ Hits 2725 2746 +21
Misses 877 877
Partials 158 158
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
e755c1f
to
0f18201
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
for k, v := range policyServer.CommonLabels() { | ||
Expect(deployment.Spec.Template.ObjectMeta.Labels).To(HaveKeyWithValue(k, v)) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
folks, I'm not a ginkgo expert. I didn't find a better way to write this assertion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think there is a better way to do this since gomega Keys
is used to match literal keys.
However, once we remove the legacy labels, we could be strict in this assertion:
Expect(deployment.Spec.Template.ObjectMeta.Labels).To(Equal(policyServer.CommonLabels()))
for k, v := range policyServer.CommonLabels() { | ||
Expect(deployment.Spec.Template.ObjectMeta.Labels).To(HaveKeyWithValue(k, v)) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think there is a better way to do this since gomega Keys
is used to match literal keys.
However, once we remove the legacy labels, we could be strict in this assertion:
Expect(deployment.Spec.Template.ObjectMeta.Labels).To(Equal(policyServer.CommonLabels()))
All the resources associated with Policy Server are now using the labels recommended by Kubernetes, see here.