From 8374cc5f6dbe88572c24ff1acf4afe4a725384a6 Mon Sep 17 00:00:00 2001 From: Pablo Rodriguez Nava Date: Wed, 29 Jul 2026 17:17:42 +0200 Subject: [PATCH] NO-ISSUE: Render OSImageStream in OKD too The MCO is already creating the OSImageStream for OKD as we have GAed the feature in OKD and OCP. If not passed by the installer the MCO itself creates the resource but it would be nice to generate it from the installer like we do for OCP to align the behavior with OCP. Signed-off-by: Pablo Rodriguez Nava --- data/data/install.openshift.io_installconfigs.yaml | 1 + pkg/asset/manifests/osimagestream.go | 7 ++----- pkg/explain/printer_test.go | 2 +- pkg/types/installconfig.go | 2 +- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/data/data/install.openshift.io_installconfigs.yaml b/data/data/install.openshift.io_installconfigs.yaml index 08d7ff8c573..4cc5cc24036 100644 --- a/data/data/install.openshift.io_installconfigs.yaml +++ b/data/data/install.openshift.io_installconfigs.yaml @@ -5065,6 +5065,7 @@ spec: enum: - rhel-9 - rhel-10 + - centos-10 type: string pki: description: |- diff --git a/pkg/asset/manifests/osimagestream.go b/pkg/asset/manifests/osimagestream.go index 98b8eed00c9..8ee296b694b 100644 --- a/pkg/asset/manifests/osimagestream.go +++ b/pkg/asset/manifests/osimagestream.go @@ -41,11 +41,8 @@ func (f *OSImageStream) Generate(_ context.Context, dependencies asset.Parents) installConfig := &installconfig.InstallConfig{} dependencies.Get(installConfig) - // If one of the following are true the OSImageStream CR is not generated - // 1. The feature is not enabled - // 2. The target is CentOS Stream CoreOS - if ic := installConfig.Config; !ic.Enabled(features.FeatureGateOSStreams) || ic.IsSCOS() { - // FG disabled or not OCP + // If OS Image Streams are not enabled don't generate the OSImageStream CR + if ic := installConfig.Config; !ic.Enabled(features.FeatureGateOSStreams) { return nil } diff --git a/pkg/explain/printer_test.go b/pkg/explain/printer_test.go index 874f331484b..e513443ecfd 100644 --- a/pkg/explain/printer_test.go +++ b/pkg/explain/printer_test.go @@ -136,7 +136,7 @@ the cluster. OperatorPublishingStrategy controls the visibility of ingress and apiserver. Defaults to public. osImageStream - Valid Values: "rhel-9","rhel-10" + Valid Values: "rhel-9","rhel-10","centos-10" OSImageStream is the global OS Image Stream to be used for all machines in the cluster. pki diff --git a/pkg/types/installconfig.go b/pkg/types/installconfig.go index 2a71b98c82d..c4fe6a7475d 100644 --- a/pkg/types/installconfig.go +++ b/pkg/types/installconfig.go @@ -771,7 +771,7 @@ func (c *InstallConfig) PublicIngress() bool { } // OSImageStream represents the name of an OS Image Stream to use in a pool. -// +kubebuilder:validation:Enum=rhel-9;rhel-10 +// +kubebuilder:validation:Enum=rhel-9;rhel-10;centos-10 type OSImageStream string const (