Skip to content

Conversation

akalenyu
Copy link
Collaborator

What this PR does / why we need it:
CDI opinionates the namespace selector field
which makes it play badly in case something is mutating this field.
Since we don't care we can just leave empty and allow merging with our desired spec.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #3810

Special notes for your reviewer:

Release note:

BugFix: unset namespace selector on webhooks to allow cloud provider mutation

CDI opinionates the namespace selector field
which makes it play badly in case something is mutating
this field.
Since we don't care we can just leave empty and allow
merging with our desired spec.

Signed-off-by: Alex Kalenyuk <[email protected]>
@kubevirt-bot kubevirt-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. labels Jul 15, 2025
@kubevirt-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign mhenriks 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

@kubevirt-bot kubevirt-bot requested review from ShellyKa13 and awels July 15, 2025 14:06
@akalenyu
Copy link
Collaborator Author

/cc @mhenriks

@kubevirt-bot kubevirt-bot requested a review from mhenriks July 15, 2025 14:06
@coveralls
Copy link

Coverage Status

coverage: 59.527% (+0.03%) from 59.502%
when pulling 54daa5f on akalenyu:webhook-ns-selector
into 91f8cda on kubevirt:main.

@Acedus
Copy link
Contributor

Acedus commented Jul 15, 2025

/lgtm

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Jul 15, 2025
@akalenyu
Copy link
Collaborator Author

akalenyu commented Jul 17, 2025

/test pull-containerized-data-importer-e2e-istio
#3831 (comment)

@kubevirt-bot
Copy link
Contributor

Pull requests that are marked with lgtm should receive a review
from an approver within 1 week.

After that period the bot marks them with the label needs-approver-review.

/label needs-approver-review

@kubevirt-bot kubevirt-bot added the needs-approver-review Indicates that a PR requires a review from an approver. label Jul 24, 2025
@akalenyu
Copy link
Collaborator Author

/cc @mhenriks

@mhenriks
Copy link
Member

@akalenyu have you tested upgrade? I think it should work

@akalenyu
Copy link
Collaborator Author

akalenyu commented Jul 29, 2025

@akalenyu have you tested upgrade? I think it should work

we have an upgrade lane on PRs in CDI that does this
EDIT: actually, most lanes perform an upgrade from latest->current hash

@mhenriks
Copy link
Member

@akalenyu have you tested upgrade? I think it should work

we have an upgrade lane on PRs in CDI that does this EDIT: actually, most lanes perform an upgrade from latest->current hash

but does the upgrade test verify (or you personally) that NamespaceSelector is unset after the upgrade?

@akalenyu
Copy link
Collaborator Author

@akalenyu have you tested upgrade? I think it should work

we have an upgrade lane on PRs in CDI that does this EDIT: actually, most lanes perform an upgrade from latest->current hash

but does the upgrade test verify (or you personally) that NamespaceSelector is unset after the upgrade?

I didn't, I am relying on the CR not being able to reach Available=true if the desired state couldn't be reached

@akalenyu
Copy link
Collaborator Author

@mhenriks so apparently there is in fact a DIFF spam over the default being the empty selector AND this PR won't make a different selector go through unchanged by us
/hold

@kubevirt-bot kubevirt-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-signoff: yes Indicates the PR's author has DCO signed all their commits. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm Indicates that a PR is ready to be merged. needs-approver-review Indicates that a PR requires a review from an approver. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cdi-operator constantly updates the webhooks

5 participants