From de1fddbf5fb7287c5f0212db549f05ef33e09eda Mon Sep 17 00:00:00 2001 From: Hongkai Liu Date: Tue, 26 May 2026 17:17:58 -0400 Subject: [PATCH 1/2] Install namespace/openshift-lightspeed only when TechPreview is enabled I forgot to do this in https://github.com/openshift/cluster-version-operator/pull/1382. The feature of creating proposals is [enabled only on TP clusters](https://github.com/openshift/cluster-version-operator/blob/fa129da3b3cba865873715ec88a0fafde98f6585/pkg/cvo/cvo.go#L1215-L1219). The namespace is only for testing that feature. Installing it only on TP clusters is to keep the damage away from any production clusters. The renaming of ConfigMap from `ota-advisory-prompt` to `cluster-update-advisory-prompt` is to avoid using an obsolete team name. --- ...ter-version-operator_45_openshift-lightspeed_namespace.yaml | 3 ++- ...0000_00_cluster-version-operator_50_lightspeed-prompts.yaml | 2 +- pkg/proposal/controller.go | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/install/0000_00_cluster-version-operator_45_openshift-lightspeed_namespace.yaml b/install/0000_00_cluster-version-operator_45_openshift-lightspeed_namespace.yaml index 41018646a..fc0f30e6b 100644 --- a/install/0000_00_cluster-version-operator_45_openshift-lightspeed_namespace.yaml +++ b/install/0000_00_cluster-version-operator_45_openshift-lightspeed_namespace.yaml @@ -3,6 +3,7 @@ kind: Namespace metadata: name: openshift-lightspeed annotations: - kubernetes.io/description: This manifest is only for testing purpose and will be removed when its own operator becomes available on the cluster. + kubernetes.io/description: This manifest is only for testing purpose and will be removed before 5.0 GA or figure out how to install the cluster-update-advisory-prompt ConfigMap on a cluster where the openshift-lightspeed Namespace is installed by the OLM-installed OpenShift Lightspeed operator. include.release.openshift.io/self-managed-high-availability: "true" workload.openshift.io/allowed: "management" + release.openshift.io/feature-set: TechPreviewNoUpgrade diff --git a/install/0000_00_cluster-version-operator_50_lightspeed-prompts.yaml b/install/0000_00_cluster-version-operator_50_lightspeed-prompts.yaml index c22cf996d..16adb243d 100644 --- a/install/0000_00_cluster-version-operator_50_lightspeed-prompts.yaml +++ b/install/0000_00_cluster-version-operator_50_lightspeed-prompts.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: ConfigMap metadata: - name: ota-advisory-prompt + name: cluster-update-advisory-prompt namespace: openshift-lightspeed annotations: include.release.openshift.io/self-managed-high-availability: "true" diff --git a/pkg/proposal/controller.go b/pkg/proposal/controller.go index 9f270a621..9e13e9770 100644 --- a/pkg/proposal/controller.go +++ b/pkg/proposal/controller.go @@ -85,7 +85,7 @@ type Config struct { func DefaultConfig() Config { return Config{ Namespace: envOrDefault("LIGHTSPEED_PROPOSAL_NAMESPACE", "openshift-lightspeed"), - PromptConfigMap: envOrDefault("LIGHTSPEED_PROMPT_CONFIGMAP", "ota-advisory-prompt"), + PromptConfigMap: envOrDefault("LIGHTSPEED_PROMPT_CONFIGMAP", "cluster-update-advisory-prompt"), } } From 593a469f423c40885d6e9bc7ef84758fddd450f2 Mon Sep 17 00:00:00 2001 From: Hongkai Liu Date: Tue, 26 May 2026 18:48:01 -0400 Subject: [PATCH 2/2] Modify a unit test to guard CM renaming --- pkg/proposal/controller_test.go | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/pkg/proposal/controller_test.go b/pkg/proposal/controller_test.go index 847b79537..9c9d58563 100644 --- a/pkg/proposal/controller_test.go +++ b/pkg/proposal/controller_test.go @@ -138,12 +138,15 @@ Update path: Recommended for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { c := NewController(tt.updatesGetterFunc, tt.client, tt.cvGetterFunc, func(_ context.Context, namespace, name string, _ metav1.GetOptions) (*corev1.ConfigMap, error) { - return &corev1.ConfigMap{ - Data: map[string]string{ - "prompt": "prompt-abc", - "foo": "bar", - }, - }, nil + if namespace == "openshift-lightspeed" && name == "cluster-update-advisory-prompt" { + return &corev1.ConfigMap{ + Data: map[string]string{ + "prompt": "prompt-abc", + "foo": "bar", + }, + }, nil + } + return nil, fmt.Errorf("ConfigMap %s not found in namespace %s", name, namespace) }, func() string { return "4.22.1" })