-
Notifications
You must be signed in to change notification settings - Fork 819
OCPBUGS-105168: Add haproxyVersion in IngressController API #2971
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: release-4.22
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -385,6 +385,25 @@ type IngressControllerSpec struct { | |
| // +kubebuilder:default:="Continue" | ||
| // +default="Continue" | ||
| ClosedClientConnectionPolicy IngressControllerClosedClientConnectionPolicy `json:"closedClientConnectionPolicy,omitempty"` | ||
|
|
||
| // haproxyVersion specifies the HAProxy version to use for this | ||
| // IngressController. | ||
| // | ||
| // This field is available in OpenShift 4.22 as an API-only backport with no | ||
| // operator implementation. Setting this field on OpenShift 4.22 allows | ||
| // administrators to pin HAProxy 2.8 before upgrading to OpenShift 5.0, where | ||
| // the operator will honor this setting. | ||
| // | ||
| // Valid values for OpenShift 4.22: | ||
| // - Unset (default): Uses HAProxy 2.8 (the default for OpenShift 4.22) | ||
| // - "2.8": Explicitly pins HAProxy 2.8 for preservation during cluster | ||
| // upgrade to OpenShift 5.0 | ||
| // | ||
| // On OpenShift 4.22, this field has no effect on the running IngressController. | ||
| // It only preserves the administrator's intent for the OpenShift 5.0 upgrade. | ||
| // | ||
| // +optional | ||
| HAProxyVersion HAProxyVersion `json:"haproxyVersion,omitempty"` | ||
| } | ||
|
|
||
| // httpCompressionPolicy turns on compression for the specified MIME types. | ||
|
|
@@ -2285,3 +2304,15 @@ const ( | |
| // server's response regardless of the client having closed the connection. | ||
| IngressControllerClosedClientConnectionPolicyContinue IngressControllerClosedClientConnectionPolicy = "Continue" | ||
| ) | ||
|
|
||
| // HAProxyVersion is a string representing a HAProxy minor version in "X.Y" | ||
| // format. The allowed values are constrained by enum validation and vary by | ||
| // OpenShift release. | ||
| // | ||
| // +kubebuilder:validation:Enum="2.8" | ||
| type HAProxyVersion string | ||
|
Comment on lines
+2312
to
+2313
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 2. Openapi enum omitted HAProxyVersion is intended to be an enum (CRD enforces it), but it lacks the +enum marker, so the generated OpenAPI schema exposes haproxyVersion as an unconstrained string. This makes OpenAPI/Swagger-driven tooling (docs, generated clients, client-side validation) disagree with what the API server will actually accept via CRD validation. Agent Prompt
|
||
|
|
||
| const ( | ||
| // HAProxyVersion28 represents HAProxy 2.8, shipped with OpenShift 4.22. | ||
| HAProxyVersion28 HAProxyVersion = "2.8" | ||
| ) | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1. haproxyversion missing featuregate marker
📘 Rule violation§ ComplianceAgent Prompt
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools