From 83932610a70202f903f886a4b65bb71241855a43 Mon Sep 17 00:00:00 2001 From: barbacbd Date: Fri, 19 Sep 2025 09:30:30 -0400 Subject: [PATCH] OCPBUGS-61901: Update explain for Publish Update the publish strategy to include "Mixed" (it was left out of the kube enum). Update the explain commands to ensure the Mixed info is present. --- data/data/install.openshift.io_installconfigs.yaml | 2 ++ pkg/explain/fields_lookup_test.go | 1 + pkg/explain/printer_test.go | 6 ++++-- pkg/types/installconfig.go | 3 ++- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/data/data/install.openshift.io_installconfigs.yaml b/data/data/install.openshift.io_installconfigs.yaml index 7a4808024e..7387dd4c2a 100644 --- a/data/data/install.openshift.io_installconfigs.yaml +++ b/data/data/install.openshift.io_installconfigs.yaml @@ -7837,11 +7837,13 @@ spec: default: External description: |- Publish controls how the user facing endpoints of the cluster like the Kubernetes API, OpenShift routes etc. are exposed. + A "Mixed" strategy only applies to the "azure" platform, and requires "operatorPublishingStrategy" to be configured. When no strategy is specified, the strategy is "External". enum: - "" - External - Internal + - Mixed type: string pullSecret: description: PullSecret is the secret to use when pulling images. diff --git a/pkg/explain/fields_lookup_test.go b/pkg/explain/fields_lookup_test.go index 38e8944646..9df2b53c12 100644 --- a/pkg/explain/fields_lookup_test.go +++ b/pkg/explain/fields_lookup_test.go @@ -20,6 +20,7 @@ func Test_lookup(t *testing.T) { }, { path: []string{"publish"}, desc: `Publish controls how the user facing endpoints of the cluster like the Kubernetes API, OpenShift routes etc. are exposed. +A "Mixed" strategy only applies to the "azure" platform, and requires "operatorPublishingStrategy" to be configured. When no strategy is specified, the strategy is "External".`, }, { path: []string{"publish", "unknown"}, diff --git a/pkg/explain/printer_test.go b/pkg/explain/printer_test.go index bb784d9f79..44b31eac51 100644 --- a/pkg/explain/printer_test.go +++ b/pkg/explain/printer_test.go @@ -143,8 +143,9 @@ If unset, the cluster will not be configured to use a proxy. publish Default: "External" - Valid Values: "","External","Internal" + Valid Values: "","External","Internal","Mixed" Publish controls how the user facing endpoints of the cluster like the Kubernetes API, OpenShift routes etc. are exposed. +A "Mixed" strategy only applies to the "azure" platform, and requires "operatorPublishingStrategy" to be configured. When no strategy is specified, the strategy is "External". pullSecret -required- @@ -414,8 +415,9 @@ VERSION: v1 RESOURCE: Default: "External" - Valid Values: "","External","Internal" + Valid Values: "","External","Internal","Mixed" Publish controls how the user facing endpoints of the cluster like the Kubernetes API, OpenShift routes etc. are exposed. +A "Mixed" strategy only applies to the "azure" platform, and requires "operatorPublishingStrategy" to be configured. When no strategy is specified, the strategy is "External". `, }, { diff --git a/pkg/types/installconfig.go b/pkg/types/installconfig.go index dd10419e47..6ed13abad8 100644 --- a/pkg/types/installconfig.go +++ b/pkg/types/installconfig.go @@ -63,7 +63,7 @@ var ( ) // PublishingStrategy is a strategy for how various endpoints for the cluster are exposed. -// +kubebuilder:validation:Enum="";External;Internal +// +kubebuilder:validation:Enum="";External;Internal;Mixed type PublishingStrategy string const ( @@ -157,6 +157,7 @@ type InstallConfig struct { ImageDigestSources []ImageDigestSource `json:"imageDigestSources,omitempty"` // Publish controls how the user facing endpoints of the cluster like the Kubernetes API, OpenShift routes etc. are exposed. + // A "Mixed" strategy only applies to the "azure" platform, and requires "operatorPublishingStrategy" to be configured. // When no strategy is specified, the strategy is "External". // // +kubebuilder:default=External