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

CEL expression to invalidate setting/unsetting of immutable fields. #1053

Merged
merged 1 commit into from
Apr 7, 2025

Conversation

Shreyas-s14
Copy link
Contributor

How to categorize this PR?

/area control-plane
/kind bug

What this PR does / why we need it:

  1. Added immutability rule to prevent setting/unsetting the immutable fields in etcd.Spec after creation. This was overlooked in the previous PR for CEL Validation.
  2. Added integration tests for the same.

Which issue(s) this PR fixes:
Fixes #1048

Special notes for your reviewer:

Release note:

Added CEL expression to prevent unsetting and setting of immutable fields in etcd.Spec after creation.

1) Added immutability rule for setting/unsetting at the lowest possible scope for the field.
2) Added it tests for the same
3) Added new generated crd yaml.
@Shreyas-s14 Shreyas-s14 requested a review from a team as a code owner April 4, 2025 07:17
@gardener-robot gardener-robot added needs/review Needs review area/control-plane Control plane related kind/bug Bug labels Apr 4, 2025
@gardener-robot
Copy link

@Shreyas-s14 Thank you for your contribution.

@gardener-robot gardener-robot added the size/s Size of pull request is small (see gardener-robot robot/bots/size.py) label Apr 4, 2025
@gardener-robot-ci-2
Copy link
Contributor

Thank you @Shreyas-s14 for your contribution. Before I can start building your PR, a member of the organization must set the required label(s) {'reviewed/ok-to-test'}. Once started, you can check the build status in the PR checks section below.

Copy link
Contributor

@shreyas-s-rao shreyas-s-rao left a comment

Choose a reason for hiding this comment

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

@Shreyas-s14 thanks for the quick fix.
/lgtm
/reviewed ok-to-test

@gardener-robot gardener-robot added reviewed/lgtm Has approval for merging reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed needs/review Needs review labels Apr 4, 2025
@gardener-robot-ci-1 gardener-robot-ci-1 added needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Apr 4, 2025
@shreyas-s-rao shreyas-s-rao added this to the v0.29.0 milestone Apr 4, 2025
@shreyas-s-rao shreyas-s-rao removed their assignment Apr 4, 2025
@renormalize renormalize merged commit 66299f4 into gardener:master Apr 7, 2025
15 checks passed
@gardener-robot gardener-robot added the status/closed Issue is closed (either delivered or triaged) label Apr 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/control-plane Control plane related kind/bug Bug needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) reviewed/lgtm Has approval for merging size/s Size of pull request is small (see gardener-robot robot/bots/size.py) status/closed Issue is closed (either delivered or triaged)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CEL transition rules do not apply to optional fields during set/unset
6 participants