-
Notifications
You must be signed in to change notification settings - Fork 160
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
Update selector label for pod and service #751
Changes from all commits
0fdc6e8
ad2c505
2be786e
bf66816
392d5d5
9b9f0c2
974574f
14296c6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,22 +8,25 @@ metadata: | |
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: controller-manager | ||
name: manager | ||
namespace: system | ||
labels: | ||
control-plane: controller-manager | ||
control-plane: opendatahub-operator | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would we want to take this opportunity to use https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/ ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @astefanutti Are you expecting to delete exiting label @VaishnaviHire @zdtsw what is your thought on it ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @zdtsw I'll create a separate issue for adding common labels. Let's merge this PR if changes looks ok. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @ajaypratap003 yes, ideally we would take the opportunity to add common labels. As these labels are immutable, the less they are changed the better. Otherwise the deployment name will have to be changed again. It's not technically impossible, but it might be better to keep the iterations minimum. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thats exactly my concern, by changing the label which can cause deployment failure. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
In general observability is not tight to the deployment name. But you're right, it's possible QE has some automation that depends on that name. So any reference to it will have to be updated accordingly. That's another reason why I'd recommend the common labels be added as part of that fix, if that's what we want, to reduce the overhead. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. my personal opinion: if we want to do it then do it in one PR with all the changes. normally to split to several PR is to reduce risk but if eventually this is already changing the name of the deployment, then preferable to get all pieces in. otherwise when deal with the "following" issue will need change deployment name again? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Absolutely, that'd be my opinion as well. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @asanzgom Can you please confirm about these label changes, will these changes impact the tests in downstream ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @ajaypratap003 we do have Test Cases that make use of label selector
|
||
spec: | ||
selector: | ||
matchLabels: | ||
control-plane: controller-manager | ||
app.kubernetes.io/name: opendatahub-operator | ||
app.kubernetes.io/part-of: opendatahub | ||
control-plane: opendatahub-operator | ||
replicas: 1 | ||
template: | ||
metadata: | ||
annotations: | ||
kubectl.kubernetes.io/default-container: manager | ||
labels: | ||
control-plane: controller-manager | ||
name: opendatahub-operator | ||
app.kubernetes.io/name: opendatahub-operator | ||
app.kubernetes.io/part-of: opendatahub | ||
control-plane: opendatahub-operator | ||
spec: | ||
securityContext: | ||
runAsNonRoot: true | ||
|
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.
Why are we changing the name of the deployment?
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.
@VaishnaviHire you can find more context in operator-framework/operator-lifecycle-manager#952 (comment). Changing the Deployment name is a way to avoid the OLM upgrade fails because these labels are immutable.
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.
Thanks @astefanutti !! Since we are changing the deployment name, we need to make sure we update the tests downstream as well.