Skip to content

Set a CRD field immutable #2829

Closed Answered by FillZpp
hjiajing asked this question in Support
Jul 20, 2022 · 3 comments · 2 replies
Discussion options

You must be logged in to vote

It seems like that should be a config fixed on the controller/reconciliation.

@camilamacedo86 I think the immutable means the field can not be changed once the CR created.

I wonder if there is any other way to implement this? Is it possible to implement it with schema ?

@hjiajing No, it seems now CRD does not support immutable fields. You can only validate the update in your webhook.

But I think it's worth to have it in CRD. You can create an issue in k/k repo and see how ppl from sig-api-machinery think about it.

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@hjiajing
Comment options

Comment options

You must be logged in to vote
1 reply
@hjiajing
Comment options

Answer selected by hjiajing
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Support
Labels
None yet
3 participants