Skip to content

fix: enable safe-upgrades VAP to permit upgrades of experimental CRDs - #4557

Merged
k8s-ci-robot merged 2 commits into
kubernetes-sigs:mainfrom
snorwin:fix-vap
Feb 20, 2026
Merged

k8s-ci-robot merged 2 commits into
kubernetes-sigs:mainfrom
snorwin:fix-vap

Conversation

@snorwin

@snorwin snorwin commented Feb 18, 2026 •

Copy link
Copy Markdown
Member

What type of PR is this?

/kind bug

What this PR does / why we need it:
The current validation rule prevents upgrades of experimental CRDs. This means that either the validation message is misleading or the expression itself is too restrictive. In my opinion, upgrading experimental CRDs should be allowed without requiring the VAP to be deleted first. Therefore, this PR adjusts the validation expression accordingly.

Which issue(s) this PR fixes:

N/A

Does this PR introduce a user-facing change?:

Fixed the safe-upgrades ValidatingAdmissionPolicy to allow upgrades of experimental CRDs

@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. labels Feb 18, 2026
@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Feb 18, 2026
@snorwin

snorwin commented Feb 18, 2026

Copy link
Copy Markdown
Member Author

/cc @robscott

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Feb 18, 2026
Signed-off-by: Norwin Schnyder <norwin.schnyder+github@gmail.com>

@robscott robscott left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @snorwin!

@k8s-ci-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: robscott, snorwin

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

The pull request process is described here

Details 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

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Feb 19, 2026
Signed-off-by: Norwin Schnyder <norwin.schnyder+github@gmail.com>
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Feb 19, 2026
@robscott

Copy link
Copy Markdown
Member

Thanks @snorwin!

/lgtm
/cherry-pick release-1.5

@k8s-infra-cherrypick-robot

Copy link
Copy Markdown
Contributor

@robscott: once the present PR merges, I will cherry-pick it on top of release-1.5 in a new PR and assign it to you.

Details

In response to this:

Thanks @snorwin!

/lgtm
/cherry-pick release-1.5

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.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 20, 2026
@k8s-ci-robot
k8s-ci-robot merged commit 2f091ef into kubernetes-sigs:main Feb 20, 2026
20 checks passed
@k8s-infra-cherrypick-robot

Copy link
Copy Markdown
Contributor

@robscott: #4557 failed to apply on top of branch "release-1.5":

Applying: fix: enable safe-upgrades VAP to permit upgrades of experimental CRDs
.git/rebase-apply/patch:16: trailing whitespace.
        oldObject != null && has(oldObject.metadata.annotations) && oldObject.metadata.annotations.exists(k, k == 'gateway.networking.k8s.io/channel') && 
.git/rebase-apply/patch:31: trailing whitespace.
        oldObject != null && has(oldObject.metadata.annotations) && oldObject.metadata.annotations.exists(k, k == 'gateway.networking.k8s.io/channel') && 
warning: 2 lines add whitespace errors.
Using index info to reconstruct a base tree...
M	config/crd/experimental/gateway.networking.k8s.io_vap_safeupgrades.yaml
M	config/crd/standard/gateway.networking.k8s.io_vap_safeupgrades.yaml
Falling back to patching base and 3-way merge...
Auto-merging config/crd/standard/gateway.networking.k8s.io_vap_safeupgrades.yaml
CONFLICT (content): Merge conflict in config/crd/standard/gateway.networking.k8s.io_vap_safeupgrades.yaml
Auto-merging config/crd/experimental/gateway.networking.k8s.io_vap_safeupgrades.yaml
CONFLICT (content): Merge conflict in config/crd/experimental/gateway.networking.k8s.io_vap_safeupgrades.yaml
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 fix: enable safe-upgrades VAP to permit upgrades of experimental CRDs

Details

In response to this:

Thanks @snorwin!

/lgtm
/cherry-pick release-1.5

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.

danehans pushed a commit to danehans/gateway-api that referenced this pull request Mar 10, 2026
…kubernetes-sigs#4557)

* fix: enable safe-upgrades VAP to permit upgrades of experimental CRDs

Signed-off-by: Norwin Schnyder <norwin.schnyder+github@gmail.com>

* add safe-upgrades VAP tests for experimental CRDs

Signed-off-by: Norwin Schnyder <norwin.schnyder+github@gmail.com>

---------

Signed-off-by: Norwin Schnyder <norwin.schnyder+github@gmail.com>
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.

4 participants