Validator | Add validator to avoid changes to certain fields #13
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Certain fields cannot be removed on the resource, because the controller will not be able to reconcile the new status with Authentik.
These are e.g. the outpost field of a ProxyProvider. When this value gets update, the controller only gets the new state, not the old state.
We would have to iterate through all outposts to remove the provide. And that every time we handle the resource, as we don't know if the field got updated.
Instead, through a validator, we prevent that outpost field can be updated at all. Instead, we require the user to delete the resource first and create a new one. Similar to how this is handled with PVs.