Skip to content

Conversation

aaron-prindle
Copy link
Contributor

One-line PR description: This addresses how we intend to handle immutability related validations with Declarative Validation.

Issue link: #5073

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Oct 6, 2025
@k8s-ci-robot k8s-ci-robot requested a review from deads2k October 6, 2025 01:38
@k8s-ci-robot k8s-ci-robot added the kind/kep Categorizes KEP tracking issues and PRs modifying the KEP directory label Oct 6, 2025
@k8s-ci-robot k8s-ci-robot requested a review from sttts October 6, 2025 01:38
@k8s-ci-robot k8s-ci-robot added sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 6, 2025
@aaron-prindle aaron-prindle force-pushed the kep-5073-immutable-update branch from 2a215cd to d1367ca Compare October 6, 2025 01:39
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 6, 2025
@aaron-prindle aaron-prindle force-pushed the kep-5073-immutable-update branch 5 times, most recently from 4730a27 to ff4124d Compare October 6, 2025 02:52
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Oct 6, 2025
@aaron-prindle
Copy link
Contributor Author

/cc @yongruilin
/assign @deads2k

Copy link
Contributor

@jpbetz jpbetz left a comment

Choose a reason for hiding this comment

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

/approve
I'm OK with this approach. I like how this models "immutability" in terms of the exact transitions allowed.
/hold to give @deads2k and @sttts a chance to weigh in

@k8s-ci-robot k8s-ci-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Oct 6, 2025
Copy link
Contributor

@deads2k deads2k left a comment

Choose a reason for hiding this comment

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

Minor comments. The Common Patterns table is excellent, thank you.

// ✅ Create: replicas = 3
// ✅ Update: replicas = 5
// ❌ Update: replicas = nil
Replicas *int32
Copy link
Contributor

Choose a reason for hiding this comment

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

why did this example get removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed this when adding the Common Patterns table but I agree they should be kept. I've updated this to keep these examples now (updated for new semantics) in a new section:

Immutability Patterns and Tags Demonstrated

Replicas *int32
}

type PersistentVolumeStatus struct {
Copy link
Contributor

Choose a reason for hiding this comment

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

can we keep this example? I think it's create, update(set), update(modify) ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've added back this example updated for the new semantics

Strategy *DeploymentStrategy
}

type PersistentVolumeClaimSpec struct {
Copy link
Contributor

Choose a reason for hiding this comment

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

the new examples are good, but can we keep and update these too?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've added back this example updated for the new semantics

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aaron-prindle, deads2k, jpbetz

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:

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

@aaron-prindle aaron-prindle force-pushed the kep-5073-immutable-update branch 2 times, most recently from 5835867 to a672b43 Compare October 10, 2025 21:04
@aaron-prindle aaron-prindle force-pushed the kep-5073-immutable-update branch from a672b43 to 6fccab4 Compare October 10, 2025 21:04
@aaron-prindle
Copy link
Contributor Author

/unhold
Feedback addressed, should be good to merge now.

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 10, 2025
@lalitc375
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 10, 2025
@k8s-ci-robot k8s-ci-robot merged commit 5952b37 into kubernetes:master Oct 10, 2025
4 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.35 milestone Oct 10, 2025
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/kep Categorizes KEP tracking issues and PRs modifying the KEP directory lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. 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.

5 participants