From 8542335b6bc2276f384769d31f4730a0cda344ff Mon Sep 17 00:00:00 2001 From: Andrey Lebedev Date: Thu, 20 Nov 2025 10:22:22 +0100 Subject: [PATCH] OCPBUGS-61858: Use pointer type for HTTPKeepAliveTimeout in IngressController API This commit addresses the problem of the creation of the default IngressController without `HTTPKeepAliveTimeout` tuning option by the cluster ingress operator: "IngressController.operator.openshift.io \"default\" is invalid: spec.tuningOptions.httpKeepAliveTimeout: Invalid value: \"string\": httpKeepAliveTimeout must be greater than or equal to 1 millisecond" --- operator/v1/types_ingress.go | 2 +- operator/v1/zz_generated.deepcopy.go | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/operator/v1/types_ingress.go b/operator/v1/types_ingress.go index 052ff9d5268..478713bd5a3 100644 --- a/operator/v1/types_ingress.go +++ b/operator/v1/types_ingress.go @@ -1912,7 +1912,7 @@ type IngressControllerTuningOptions struct { // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=16 // +optional - HTTPKeepAliveTimeout metav1.Duration `json:"httpKeepAliveTimeout,omitempty"` + HTTPKeepAliveTimeout *metav1.Duration `json:"httpKeepAliveTimeout,omitempty"` // tlsInspectDelay defines how long the router can hold data to find a // matching route. diff --git a/operator/v1/zz_generated.deepcopy.go b/operator/v1/zz_generated.deepcopy.go index b385c912da3..3bc6b81de46 100644 --- a/operator/v1/zz_generated.deepcopy.go +++ b/operator/v1/zz_generated.deepcopy.go @@ -2564,7 +2564,11 @@ func (in *IngressControllerTuningOptions) DeepCopyInto(out *IngressControllerTun *out = new(metav1.Duration) **out = **in } - out.HTTPKeepAliveTimeout = in.HTTPKeepAliveTimeout + if in.HTTPKeepAliveTimeout != nil { + in, out := &in.HTTPKeepAliveTimeout, &out.HTTPKeepAliveTimeout + *out = new(metav1.Duration) + **out = **in + } if in.TLSInspectDelay != nil { in, out := &in.TLSInspectDelay, &out.TLSInspectDelay *out = new(metav1.Duration)