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
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,12 @@ require (
github.com/nutanix-cloud-native/cluster-api-provider-nutanix v1.7.0
github.com/nutanix-cloud-native/prism-go-client v0.5.0
github.com/onsi/gomega v1.38.2
github.com/openshift/api v0.0.0-20251120220512-cb382c9eaf42
github.com/openshift/api v0.0.0-20260122154241-80c3fbc164d6
github.com/openshift/assisted-image-service v0.0.0-20240607085136-02df2e56dde6
github.com/openshift/assisted-service/api v0.0.0
github.com/openshift/assisted-service/client v0.0.0
github.com/openshift/assisted-service/models v0.0.0
github.com/openshift/client-go v0.0.0-20251015124057-db0dee36e235
github.com/openshift/client-go v0.0.0-20251205093018-96a6cbc1420c
github.com/openshift/cloud-credential-operator v0.0.0-20240404165937-5e8812d64187
github.com/openshift/cluster-api-provider-baremetal v0.0.0-20220408122422-7a548effc26e
github.com/openshift/cluster-api-provider-libvirt v0.2.1-0.20230308152226-83c0473d4429
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -701,8 +701,8 @@ github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQ
github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM=
github.com/opencontainers/runtime-spec v1.2.0 h1:z97+pHb3uELt/yiAWD691HNHQIF07bE7dzrbT927iTk=
github.com/opencontainers/runtime-spec v1.2.0/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
github.com/openshift/api v0.0.0-20251120220512-cb382c9eaf42 h1:Mo2FlDdoCZ+BE2W4C0lNcxEDeIIhfsYFP6vj4Sggp8w=
github.com/openshift/api v0.0.0-20251120220512-cb382c9eaf42/go.mod h1:d5uzF0YN2nQQFA0jIEWzzOZ+edmo6wzlGLvx5Fhz4uY=
github.com/openshift/api v0.0.0-20260122154241-80c3fbc164d6 h1:En/+Utvxj7rpAhhj9f2YkkF+e5ZQoRdv8Rs+E1MMBdM=
github.com/openshift/api v0.0.0-20260122154241-80c3fbc164d6/go.mod h1:d5uzF0YN2nQQFA0jIEWzzOZ+edmo6wzlGLvx5Fhz4uY=
github.com/openshift/assisted-image-service v0.0.0-20240607085136-02df2e56dde6 h1:U6ve+dnHlHhAELoxX+rdFOHVhoaYl0l9qtxwYtsO6C0=
github.com/openshift/assisted-image-service v0.0.0-20240607085136-02df2e56dde6/go.mod h1:o2H5VwQhUD8P6XsK6dRmKpCCJqVvv12KJQZBXmcCXCU=
github.com/openshift/assisted-service/api v0.0.0-20250922204150-a52b83145bea h1:YhJ9iHKKT5ooAdVr8qq3BdudhTxP/WF0XYDT5gzi1ak=
Expand All @@ -715,8 +715,8 @@ github.com/openshift/baremetal-operator/apis v0.0.0-20231128154154-6736c9b9c6c8
github.com/openshift/baremetal-operator/apis v0.0.0-20231128154154-6736c9b9c6c8/go.mod h1:CvKrrnAcvvtrZIc9y9WaqWmJhK0AJ9sWnh+VP4d7jcM=
github.com/openshift/baremetal-operator/pkg/hardwareutils v0.0.0-20231128154154-6736c9b9c6c8 h1:38vY9w7dXqB7tI9g1GCUnpahNDyBbp9Yylq+BQ154YE=
github.com/openshift/baremetal-operator/pkg/hardwareutils v0.0.0-20231128154154-6736c9b9c6c8/go.mod h1:399nvdaqoU9rTI25UdFw2EWcVjmJPpeZPIhfDAIx/XU=
github.com/openshift/client-go v0.0.0-20251015124057-db0dee36e235 h1:9JBeIXmnHlpXTQPi7LPmu1jdxznBhAE7bb1K+3D8gxY=
github.com/openshift/client-go v0.0.0-20251015124057-db0dee36e235/go.mod h1:L49W6pfrZkfOE5iC1PqEkuLkXG4W0BX4w8b+L2Bv7fM=
github.com/openshift/client-go v0.0.0-20251205093018-96a6cbc1420c h1:TBE0Gl+oCo/SNEhLKZQNNH/SWHXrpGyhAw7P0lAqdHg=
github.com/openshift/client-go v0.0.0-20251205093018-96a6cbc1420c/go.mod h1:IsynOWZAfdH+BgWimcFQRtI41Id9sgdhsCEjIk8ACLw=
github.com/openshift/cloud-credential-operator v0.0.0-20240404165937-5e8812d64187 h1:v2D/+SWsOPsl4Syz1SVjo7m3L0ethuRGR++ubsb89oA=
github.com/openshift/cloud-credential-operator v0.0.0-20240404165937-5e8812d64187/go.mod h1:eyA6FG71366St6Q1TW+jXdQbald0rUwtEPhAREMlyhA=
github.com/openshift/cloud-provider-vsphere v1.19.1-0.20240626105621-6464d0bb4928 h1:gX0HAKR0f40xmMWlUSn8DBMCjip8Iuzg5XToWAv6Uzw=
Expand Down
17 changes: 17 additions & 0 deletions pkg/types/validation/featuregate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,23 @@ func TestFeatureGates(t *testing.T) {
return c
}(),
},
{
name: "OKD featureset requires SCOS-compiled installer",
installConfig: func() *types.InstallConfig {
c := validInstallConfig()
c.FeatureSet = v1.OKD
return c
}(),
// This test will fail when installer is compiled without TAGS=scos
// When compiled with TAGS=scos, this should pass (no error)
expected: func() string {
// Only expect error if not compiled with SCOS
if !types.SCOS {
return `^featureSet: Forbidden: OKD featureset is not supported on OpenShift clusters$`
}
return ""
}(),
},
}

for _, tc := range cases {
Expand Down
5 changes: 5 additions & 0 deletions pkg/types/validation/installconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -1490,6 +1490,11 @@ func ValidateFeatureSet(c *types.InstallConfig) field.ErrorList {
allErrs = append(allErrs, field.NotSupported(field.NewPath("featureSet"), c.FeatureSet, sortedFeatureSets))
}

// Validate that OKD featureset is only used with SCOS-compiled installer
if c.FeatureSet == configv1.OKD && !c.IsSCOS() {
allErrs = append(allErrs, field.Forbidden(field.NewPath("featureSet"), "OKD featureset is not supported on OpenShift clusters"))
}

if len(c.FeatureGates) > 0 {
if c.FeatureSet != configv1.CustomNoUpgrade {
allErrs = append(allErrs, field.Forbidden(field.NewPath("featureGates"), "featureGates can only be used with the CustomNoUpgrade feature set"))
Expand Down
Loading