josdk-webhooks icon indicating copy to clipboard operation
josdk-webhooks copied to clipboard

Validation of immutable fields, passing oldResource from admission request

Open jonesbusy opened this issue 6 months ago • 0 comments

https://github.com/operator-framework/josdk-webhooks/blob/main/core/src/main/java/io/javaoperatorsdk/webhook/admission/validation/Validator.java takes only the current resource for validation

Shouldn't we be able to retrieve the oldResource on https://github.com/operator-framework/josdk-webhooks/blob/main/core/src/main/java/io/javaoperatorsdk/webhook/admission/validation/DefaultAdmissionRequestValidator.java#L27 for validation

So that we can validate immutable field between the oldResource and the current resource?

jonesbusy avatar May 12 '25 04:05 jonesbusy