Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions openapi/generated_openapi/zz_generated.openapi.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

54 changes: 54 additions & 0 deletions operator/v1/types_ingresscontroller.go
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,32 @@ type IngressControllerSpec struct {
// +kubebuilder:default:="Continue"
// +default="Continue"
ClosedClientConnectionPolicy IngressControllerClosedClientConnectionPolicy `json:"closedClientConnectionPolicy,omitempty"`

// haproxyVersion specifies the HAProxy version to use for this
// IngressController.
//
// OpenShift 5.0 introduces HAProxy 3.2 as its default version and supports
// HAProxy 2.8 from OpenShift 4.22 for migration purposes. When an OpenShift
// release introduces a new default HAProxy version, that HAProxy version
// becomes available as a pinnable value in subsequent OpenShift releases,
// providing a smooth migration path for administrators who want to defer
// HAProxy upgrades.
//
// Valid values for OpenShift 5.0:
// - Unset (default): Uses HAProxy 3.2 (the default for OpenShift 5.0)
// - "3.2": Explicitly pins HAProxy 3.2 for preservation during cluster
// upgrades to future OpenShift releases
// - "2.8": Uses HAProxy 2.8 from OpenShift 4.22 (migration support, will
// be dropped in the next OpenShift release)
//
// If a specific HAProxy version is set and would become unsupported in a
// target cluster upgrade, a preflight check would block the cluster upgrade,
// blocking the cluster upgrade until this field is updated to unset or a
// supported version.
//
// +optional
// +openshift:enable:FeatureGate=IngressControllerMultipleHAProxyVersions

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rebase after merging EP and #2852

HAProxyVersion HAProxyVersion `json:"haproxyVersion,omitempty"`
}

// httpCompressionPolicy turns on compression for the specified MIME types.
Expand Down Expand Up @@ -2263,6 +2289,19 @@ type IngressControllerStatus struct {
// routeSelector is the actual routeSelector in use.
// +optional
RouteSelector *metav1.LabelSelector `json:"routeSelector,omitempty"`

// effectiveHAProxyVersion reports the HAProxy version currently in use by
// this IngressController. This reflects the resolved value of the
// spec.haproxyVersion field. When omitted, the effective value has not yet
// been resolved by the operator or the feature is not enabled for this cluster.
//
// Examples for OpenShift 5.0:
// - "3.2": Using HAProxy 3.2
// - "2.8": Using HAProxy 2.8
//
// +optional
// +openshift:enable:FeatureGate=IngressControllerMultipleHAProxyVersions
EffectiveHAProxyVersion HAProxyVersion `json:"effectiveHAProxyVersion,omitempty"`
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
Expand Down Expand Up @@ -2331,3 +2370,18 @@ 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";"3.2"
type HAProxyVersion string

const (
// HAProxyVersion28 represents HAProxy 2.8, shipped with OpenShift 4.22.
HAProxyVersion28 HAProxyVersion = "2.8"

// HAProxyVersion32 represents HAProxy 3.2, introduced in OpenShift 5.0.
HAProxyVersion32 HAProxyVersion = "3.2"
)
Original file line number Diff line number Diff line change
Expand Up @@ -924,6 +924,33 @@ spec:
required:
- type
type: object
haproxyVersion:
description: |-
haproxyVersion specifies the HAProxy version to use for this
IngressController.

OpenShift 5.0 introduces HAProxy 3.2 as its default version and supports
HAProxy 2.8 from OpenShift 4.22 for migration purposes. When an OpenShift
release introduces a new default HAProxy version, that HAProxy version
becomes available as a pinnable value in subsequent OpenShift releases,
providing a smooth migration path for administrators who want to defer
HAProxy upgrades.

Valid values for OpenShift 5.0:
- Unset (default): Uses HAProxy 3.2 (the default for OpenShift 5.0)
- "3.2": Explicitly pins HAProxy 3.2 for preservation during cluster
upgrades to future OpenShift releases
- "2.8": Uses HAProxy 2.8 from OpenShift 4.22 (migration support, will
be dropped in the next OpenShift release)

If a specific HAProxy version is set and would become unsupported in a
target cluster upgrade, a preflight check would block the cluster upgrade,
blocking the cluster upgrade until this field is updated to unset or a
supported version.
enum:
- "2.8"
- "3.2"
type: string
httpCompression:
description: |-
httpCompression defines a policy for HTTP traffic compression.
Expand Down Expand Up @@ -2601,6 +2628,20 @@ spec:
domain:
description: domain is the actual domain in use.
type: string
effectiveHAProxyVersion:
description: |-
effectiveHAProxyVersion reports the HAProxy version currently in use by
this IngressController. This reflects the resolved value of the
spec.haproxyVersion field. When omitted, the effective value has not yet
been resolved by the operator or the feature is not enabled for this cluster.

Examples for OpenShift 5.0:
- "3.2": Using HAProxy 3.2
- "2.8": Using HAProxy 2.8
enum:
- "2.8"
- "3.2"
type: string
endpointPublishingStrategy:
description: endpointPublishingStrategy is the actual strategy in
use.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -924,6 +924,33 @@ spec:
required:
- type
type: object
haproxyVersion:
description: |-
haproxyVersion specifies the HAProxy version to use for this
IngressController.

OpenShift 5.0 introduces HAProxy 3.2 as its default version and supports
HAProxy 2.8 from OpenShift 4.22 for migration purposes. When an OpenShift
release introduces a new default HAProxy version, that HAProxy version
becomes available as a pinnable value in subsequent OpenShift releases,
providing a smooth migration path for administrators who want to defer
HAProxy upgrades.

Valid values for OpenShift 5.0:
- Unset (default): Uses HAProxy 3.2 (the default for OpenShift 5.0)
- "3.2": Explicitly pins HAProxy 3.2 for preservation during cluster
upgrades to future OpenShift releases
- "2.8": Uses HAProxy 2.8 from OpenShift 4.22 (migration support, will
be dropped in the next OpenShift release)

If a specific HAProxy version is set and would become unsupported in a
target cluster upgrade, a preflight check would block the cluster upgrade,
blocking the cluster upgrade until this field is updated to unset or a
supported version.
enum:
- "2.8"
- "3.2"
type: string
httpCompression:
description: |-
httpCompression defines a policy for HTTP traffic compression.
Expand Down Expand Up @@ -2601,6 +2628,20 @@ spec:
domain:
description: domain is the actual domain in use.
type: string
effectiveHAProxyVersion:
description: |-
effectiveHAProxyVersion reports the HAProxy version currently in use by
this IngressController. This reflects the resolved value of the
spec.haproxyVersion field. When omitted, the effective value has not yet
been resolved by the operator or the feature is not enabled for this cluster.

Examples for OpenShift 5.0:
- "3.2": Using HAProxy 3.2
- "2.8": Using HAProxy 2.8
enum:
- "2.8"
- "3.2"
type: string
endpointPublishingStrategy:
description: endpointPublishingStrategy is the actual strategy in
use.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -924,6 +924,33 @@ spec:
required:
- type
type: object
haproxyVersion:
description: |-
haproxyVersion specifies the HAProxy version to use for this
IngressController.

OpenShift 5.0 introduces HAProxy 3.2 as its default version and supports
HAProxy 2.8 from OpenShift 4.22 for migration purposes. When an OpenShift
release introduces a new default HAProxy version, that HAProxy version
becomes available as a pinnable value in subsequent OpenShift releases,
providing a smooth migration path for administrators who want to defer
HAProxy upgrades.

Valid values for OpenShift 5.0:
- Unset (default): Uses HAProxy 3.2 (the default for OpenShift 5.0)
- "3.2": Explicitly pins HAProxy 3.2 for preservation during cluster
upgrades to future OpenShift releases
- "2.8": Uses HAProxy 2.8 from OpenShift 4.22 (migration support, will
be dropped in the next OpenShift release)

If a specific HAProxy version is set and would become unsupported in a
target cluster upgrade, a preflight check would block the cluster upgrade,
blocking the cluster upgrade until this field is updated to unset or a
supported version.
enum:
- "2.8"
- "3.2"
type: string
httpCompression:
description: |-
httpCompression defines a policy for HTTP traffic compression.
Expand Down Expand Up @@ -2601,6 +2628,20 @@ spec:
domain:
description: domain is the actual domain in use.
type: string
effectiveHAProxyVersion:
description: |-
effectiveHAProxyVersion reports the HAProxy version currently in use by
this IngressController. This reflects the resolved value of the
spec.haproxyVersion field. When omitted, the effective value has not yet
been resolved by the operator or the feature is not enabled for this cluster.

Examples for OpenShift 5.0:
- "3.2": Using HAProxy 3.2
- "2.8": Using HAProxy 2.8
enum:
- "2.8"
- "3.2"
type: string
endpointPublishingStrategy:
description: endpointPublishingStrategy is the actual strategy in
use.
Expand Down
1 change: 1 addition & 0 deletions operator/v1/zz_generated.featuregated-crd-manifests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ ingresscontrollers.operator.openshift.io:
Category: ""
FeatureGates:
- IngressControllerDynamicConfigurationManager
- IngressControllerMultipleHAProxyVersions
- TLSGroupPreferences
FilenameOperatorName: ingress
FilenameOperatorOrdering: "00"
Expand Down
Loading