crossplane / crossplane-tools

Experimental code generators for Crossplane controllers.
https://crossplane.io
Apache License 2.0
34 stars 26 forks source link

Generate webhook functions for fields with `+immutable` comment tag #40

Open muvaf opened 2 years ago

muvaf commented 2 years ago

What problem are you facing?

Webhooks are available in Crossplane now and immutability check on UPDATE action is implemented manually for each field.

How could Crossplane help solve your problem?

Similar to reference resolver generation, we can have a generator in crossplane-tools that will scan the fields for // +immutable tag and generate the logic automatically.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

negz commented 2 years ago

We might also be able to do this with CEL now per https://github.com/kubernetes/kubernetes/issues/65973#issuecomment-1150197430. See also https://github.com/kubernetes/website/pull/36032.