-
We are currently building a Crossplane provider for provisioning resources on Confluent Cloud. We have run into a very general discussion (we think) about how to implement the update functionality for managing a very stateful resource. For resource provisioning some of the initial inputs would lead to a destructive update procedure (delete and then create) if changed for the reconsiler to apply the changes to the resource.
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
Good question! IMHO, I think option 2 with the validating admission webhook is the better user experience, because it provides the immediate feedback upon applying the edits. Option 1 would probably result in more confusion if the updates are accepted by the API server but then nothing happens and the user needs to go searching around for an explanation of what is happening under the covers. A validating webhook could immediately provide the feedback that the update is not valid or accepted, so that UX is probably best. This is another good example of how a pluggable webhook framework in crossplane could make developing and deploying functionality like this more streamlined. Feel free to add a thumbs-up on this issue: #1152 |
Beta Was this translation helpful? Give feedback.
-
There are some Crossplane docs on immutable properties. In general, I've seen #1 used more often. Also see Crossplane issue 727. |
Beta Was this translation helpful? Give feedback.
-
My thinking here is:
I would consider it acceptable for a provider (and its managed resource APIs) to reach beta quality (e.g. v1beta1) without addressing this shortcoming; we're planning to start adding the plumbing to tackle at least the ability to reject updates to immutable fields this quarter per #2719. |
Beta Was this translation helpful? Give feedback.
-
In the case of using validating webhooks and implementing destructive updates one could easily think of a situation where one imports a resource but hasn't gotten the configuration exactly right, so your import do a "latent create" and then a destructive update because the validating webhook is unaware of resource you are trying to import. |
Beta Was this translation helpful? Give feedback.
My thinking here is: