-
Notifications
You must be signed in to change notification settings - Fork 31
K8SPS-269 add labels for all objects created by operator #989
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
base: main
Are you sure you want to change the base?
Conversation
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.
@nmarukovich please add to the PR description which labels were added
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.
please check @gkech's comments
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 am not sure that we need to have this label in all objects :(
app.kubernetes.io/version: v0.11.0
Will the operator update it as soon as we update the image or when we change the crVersion?
Can it cause any additional restarts/problems?
@egegunes WDYT?
pkg/k8s/configmap.go
Outdated
}, | ||
Data: map[string]string{ | ||
filename: data, | ||
}, | ||
} | ||
if cr.CompareVersion("0.12.0") >= 0 { | ||
cm.Labels = naming.Labels(name, cr.Name, "percona-server", "database") |
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.
isn't this function used for all config maps? is it okay to set database
as component in every config map?
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.
which one do you think it should be put here?
@hors I don't see anything that adds version label in this PR. I think it's already in main. |
I know, but I just saw it when I reviewed it :( |
As we discussed, I will fix it in this PR |
commit: df96235 |
CHANGE DESCRIPTION
Problem:
I rechecked all objects created by operator and only cm doesn't have labels. The labels to config map were added in this PR.
metadata:
creationTimestamp: "2025-08-18T08:08:05Z"
labels:
app.kubernetes.io/component: database
app.kubernetes.io/instance: cluster1
app.kubernetes.io/managed-by: percona-server-mysql-operator
app.kubernetes.io/name: auto-cluster1-mysql
app.kubernetes.io/part-of: percona-server
app.kubernetes.io/version: v0.11.0
Cause:
Short explanation of the root cause of the issue if applicable.
Solution:
Short explanation of the solution we are providing with this PR.
CHECKLIST
Jira
Needs Doc
) and QA (Needs QA
)?Tests
Config/Logging/Testability