Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
conformance: require that GatewayClass controller name is immutable
Relates to kubernetes-sigs#1514 This is a proof-of-concept conformance test that checks for the validation behavior provided by the admission webhook. In this case we're just checking that an update to a GatewayClass controller name is rejected. We use a temporary GatewayClass rather than the one specified by the --gateway-class, to avoid messing up installations that do allow this update through. This does raise an interesting question though - isn't it strange that we're saying an implementation is required to validate objects that it should otherwise ignore? In this case, we would would otherwise say an implementation should ingore this object because it doesn't recognize the controller name. Failure looks like this: ``` === RUN TestConformance/GatewayClassAdmissionValidation/GatewayClass_controllerName_is_immutable gatewayclass-admission-validation.go:62: Error Trace: gatewayclass-admission-validation.go:62 Error: Should be in error chain: expected: %!q(**errors.StatusError=0xc000014008) in chain: Test: TestConformance/GatewayClassAdmissionValidation/GatewayClass_controllerName_is_immutable Messages: updating gatewayclass-immutable GatewayClass.Spec.ControllerName should not be permitted ```
- Loading branch information