-
Notifications
You must be signed in to change notification settings - Fork 39
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
OCPBUGS-45073: Support HCP labels #332
base: master
Are you sure you want to change the base?
Conversation
@muraee: This pull request references Jira Issue OCPBUGS-45073, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
Requesting review from QA contact: The bug has been updated to refer to the pull request using the external bug tracker. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
/retest-required |
pkg/driver/common/operator/hooks.go
Outdated
if err != nil { | ||
return err | ||
} | ||
deployment.Spec.Template.Labels = labels |
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.
This will replace all existing labels. The new labels should be added, so the deployment's labelSelector still works. In addition, existing labels should not be replaced with new values, again because of the deployment's labelSelector.
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.
done
In addition, you need to modify cluster-storage-operator to run the CSI driver operators themselves with the right labels, probably around here. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: muraee The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@jsafrane thanks for the hint about the needed change in cluster-storage-operator, I will open a PR for that. |
/retest-required |
@muraee: The following tests failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
} | ||
|
||
for key, value := range labels { | ||
// don't replace existing labels as theyt are used in the deployment's labelSelector. |
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.
typo: theyt
hcp: getTestHostedControlPlane("hcp_no_labels.yaml"), | ||
expectedLabels: nil, | ||
}, | ||
{ |
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 add a test that existing labels are not replaced
HCP is adding a new API field to allow users creating HCP clusters to set custom labels on all HCP pods openshift/hypershift#5114. The CSI needs to integrate this feature in the same way it integrated the NodeSelector feature for HCP.