-
Enhancement
-
Resolution: Done
-
Major
-
RHDG Operator CSV 8.3.0 GA
-
None
Upgrading to operator-sdk v1.3.2 means it's now possible to make use of the tooling required to create Operator webhooks.
Validating webhooks will allow us to prevent user's creating CRs with incompatible spec fields, with an error returned on `kubectl apply`. Currently the operator is only able to log error messages, which means that it's necessary for the user to check the operator logs in order to discover their configuration is not valid. In some environments, this may not be possible as the k8s user won't have the permissions required to view the operator logs.
Mutating webhooks can be used to apply a default state or transform CR spec fields before they are reconciled by the Controllers, simplifying the Controller logic.