Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

muraee
Copy link

@muraee muraee commented Nov 26, 2024

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.

@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels Nov 26, 2024
@openshift-ci-robot
Copy link

@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
  • bug is open, matching expected state (open)
  • bug target version (4.19.0) matches configured target version for branch (4.19.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @anuragthehatter

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

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.

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.

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 27, 2024
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 27, 2024
@muraee
Copy link
Author

muraee commented Nov 27, 2024

/retest-required

if err != nil {
return err
}
deployment.Spec.Template.Labels = labels
Copy link
Contributor

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.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@jsafrane
Copy link
Contributor

jsafrane commented Dec 9, 2024

In addition, you need to modify cluster-storage-operator to run the CSI driver operators themselves with the right labels, probably around here.

Copy link
Contributor

openshift-ci bot commented Dec 13, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: muraee
Once this PR has been reviewed and has the lgtm label, please assign gnufied for approval. For more information see the Code Review Process.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@muraee
Copy link
Author

muraee commented Dec 13, 2024

@jsafrane thanks for the hint about the needed change in cluster-storage-operator, I will open a PR for that.

@muraee
Copy link
Author

muraee commented Dec 14, 2024

/retest-required

Copy link
Contributor

openshift-ci bot commented Dec 15, 2024

@muraee: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/hypershift-e2e-openstack-csi-manila 7afb560 link true /test hypershift-e2e-openstack-csi-manila
ci/prow/hypershift-e2e-openstack-csi-cinder 7afb560 link true /test hypershift-e2e-openstack-csi-cinder
ci/prow/aws-efs-operator-e2e-extended e75af35 link false /test aws-efs-operator-e2e-extended
ci/prow/smb-win2019-operator-e2e e75af35 link false /test smb-win2019-operator-e2e
ci/prow/smb-win2022-operator-e2e e75af35 link false /test smb-win2022-operator-e2e
ci/prow/e2e-azurestack-csi e75af35 link false /test e2e-azurestack-csi
ci/prow/okd-scos-e2e-aws-ovn e75af35 link false /test okd-scos-e2e-aws-ovn
ci/prow/e2e-azure e75af35 link true /test e2e-azure

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.
Copy link
Contributor

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,
},
{
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants