Description of problem: OpenShift 4.11 adds a new API field to IngressController: spec.tuningOptions.healthCheckInterval. This field has the following validation: // +kubebuilder:validation:Pattern=^0|([0-9]+(\.[0-9]+)?(ns|us|µs|μs|ms|s|m|h))+$ Note that the left subgroup includes the "^" anchor, and the right subgroup includes the "$" anchor. The validation should be the following: // +kubebuilder:validation:Pattern=^(0|([0-9]+(\.[0-9]+)?(ns|us|µs|μs|ms|s|m|h))+)$ OpenShift release version: 4.11.0 Cluster Platform: All platforms. How reproducible: Easily. Steps to Reproduce (in detail): 1. Set a value for spec.tuningOptions.healthCheckInterval with a leading 0 and any arbitrary suffix. Actual results: Any value with a leading 0 is accepted: % oc -n openshift-ingress-operator patch ingresscontroller/default --type=merge --patch='{"spec":{"tuningOptions":{"healthCheckInterval":"0abc"}}}' ingresscontroller.operator.openshift.io/default patched Expected results: Only 0 or a number with an optional decimal part and with a unit should be accepted: % oc -n openshift-ingress-operator patch ingresscontroller/default --type=merge --patch='{"spec":{"tuningOptions":{"healthCheckInterval":"0abc"}}}' The IngressController "default" is invalid: spec.tuningOptions.healthCheckInterval: Invalid value: "0abc": spec.tuningOptions.healthCheckInterval in body should match '^(0|([0-9]+(\.[0-9]+)?(ns|us|µs|μs|ms|s|m|h))+)$' Impact of the problem: Users can set invalid values. Additional info: This API field is new in OpenShift 4.11.0.
verified with 4.12.0-0.ci-2022-07-13-214326 and passed. $ oc get clusterversion NAME VERSION AVAILABLE PROGRESSING SINCE STATUS version 4.12.0-0.ci-2022-07-13-214326 True False 97m Cluster version is 4.12.0-0.ci-2022-07-13-214326 $ oc -n openshift-ingress-operator patch ingresscontroller/default --type=merge --patch='{"spec":{"tuningOptions":{"healthCheckInterval":"0abc"}}}' The IngressController "default" is invalid: spec.tuningOptions.healthCheckInterval: Invalid value: "0abc": spec.tuningOptions.healthCheckInterval in body should match '^(0|([0-9]+(\.[0-9]+)?(ns|us|µs|μs|ms|s|m|h))+)$'
No doc update is required because this was an issue in a new API.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Moderate: OpenShift Container Platform 4.12.0 bug fix and security update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2022:7399