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

Fix namespace selector comparison for webhook #1985

Merged
merged 1 commit into from
Nov 28, 2023

Conversation

saschagrunert
Copy link
Member

What type of PR is this?

/kind bug

What this PR does / why we need it:

We should only compare supported labels and not everything on the namespace, otherwise we can end up being stuck in a SPOD with the UPDATING state. We now only compare supported webhook labels and use them as indicator if it requires and update or not.

Which issue(s) this PR fixes:

Fixes #1981

Does this PR have test?

Yes

Special notes for your reviewer:

None

Does this PR introduce a user-facing change?

Fixed spod being stuck in `UPDATING` state because the webhook thinks it's requiring an update.

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Nov 28, 2023
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Nov 28, 2023
@saschagrunert saschagrunert changed the title Fix namespace selector comparison for webhook WIP: Fix namespace selector comparison for webhook Nov 28, 2023
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 28, 2023
@codecov-commenter
Copy link

codecov-commenter commented Nov 28, 2023

Codecov Report

Merging #1985 (d7f11ef) into main (47c73e8) will decrease coverage by 2.01%.
Report is 1 commits behind head on main.
The diff coverage is 66.66%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1985      +/-   ##
==========================================
- Coverage   49.32%   47.32%   -2.01%     
==========================================
  Files          72       77       +5     
  Lines        7008     7352     +344     
==========================================
+ Hits         3457     3479      +22     
- Misses       3420     3742     +322     
  Partials      131      131              

We should only compare supported labels and not everything on the
namespace, otherwise we can end up being stuck in a `SPOD` with the
`UPDATING` state. We now only compare supported webhook labels and use
them as indicator if it requires and update or not.

Fixes kubernetes-sigs#1981

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
@saschagrunert saschagrunert changed the title WIP: Fix namespace selector comparison for webhook Fix namespace selector comparison for webhook Nov 28, 2023
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 28, 2023
@saschagrunert
Copy link
Member Author

@kubernetes-sigs/security-profiles-operator-maintainers PTAL

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 28, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JAORMX, saschagrunert

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [JAORMX,saschagrunert]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit 957c14b into kubernetes-sigs:main Nov 28, 2023
26 checks passed
@saschagrunert saschagrunert deleted the webhook-label-fix branch November 28, 2023 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AKS spod STATE : UPDATING
4 participants