diff --git a/api/hypershift/v1beta1/featuregates/featureGate-Hypershift-Default.yaml b/api/hypershift/v1beta1/featuregates/featureGate-Hypershift-Default.yaml index a9dec3bcea43..ed6fe5dc246d 100644 --- a/api/hypershift/v1beta1/featuregates/featureGate-Hypershift-Default.yaml +++ b/api/hypershift/v1beta1/featuregates/featureGate-Hypershift-Default.yaml @@ -35,9 +35,6 @@ }, { "name": "EtcdSharding" - }, - { - "name": "OSStreams" } ], "enabled": [ @@ -57,6 +54,9 @@ }, { "name": "NetworkDiagnosticsConfig" + }, + { + "name": "OSStreams" } ], "version": "" diff --git a/api/hypershift/v1beta1/featuregates/featureGate-SelfManagedHA-Default.yaml b/api/hypershift/v1beta1/featuregates/featureGate-SelfManagedHA-Default.yaml index 67012a8438cd..9970329f3b4e 100644 --- a/api/hypershift/v1beta1/featuregates/featureGate-SelfManagedHA-Default.yaml +++ b/api/hypershift/v1beta1/featuregates/featureGate-SelfManagedHA-Default.yaml @@ -35,9 +35,6 @@ }, { "name": "EtcdSharding" - }, - { - "name": "OSStreams" } ], "enabled": [ @@ -57,6 +54,9 @@ }, { "name": "NetworkDiagnosticsConfig" + }, + { + "name": "OSStreams" } ], "version": "" diff --git a/cmd/install/assets/crds/hypershift-operator/payload-manifests/featuregates/featureGate-Hypershift-Default.yaml b/cmd/install/assets/crds/hypershift-operator/payload-manifests/featuregates/featureGate-Hypershift-Default.yaml index a9dec3bcea43..ed6fe5dc246d 100644 --- a/cmd/install/assets/crds/hypershift-operator/payload-manifests/featuregates/featureGate-Hypershift-Default.yaml +++ b/cmd/install/assets/crds/hypershift-operator/payload-manifests/featuregates/featureGate-Hypershift-Default.yaml @@ -35,9 +35,6 @@ }, { "name": "EtcdSharding" - }, - { - "name": "OSStreams" } ], "enabled": [ @@ -57,6 +54,9 @@ }, { "name": "NetworkDiagnosticsConfig" + }, + { + "name": "OSStreams" } ], "version": "" diff --git a/cmd/install/assets/crds/hypershift-operator/payload-manifests/featuregates/featureGate-SelfManagedHA-Default.yaml b/cmd/install/assets/crds/hypershift-operator/payload-manifests/featuregates/featureGate-SelfManagedHA-Default.yaml index 67012a8438cd..9970329f3b4e 100644 --- a/cmd/install/assets/crds/hypershift-operator/payload-manifests/featuregates/featureGate-SelfManagedHA-Default.yaml +++ b/cmd/install/assets/crds/hypershift-operator/payload-manifests/featuregates/featureGate-SelfManagedHA-Default.yaml @@ -35,9 +35,6 @@ }, { "name": "EtcdSharding" - }, - { - "name": "OSStreams" } ], "enabled": [ @@ -57,6 +54,9 @@ }, { "name": "NetworkDiagnosticsConfig" + }, + { + "name": "OSStreams" } ], "version": "" diff --git a/cmd/install/assets/crds/hypershift-operator/zz_generated.crd-manifests/nodepools-Default.crd.yaml b/cmd/install/assets/crds/hypershift-operator/zz_generated.crd-manifests/nodepools-Default.crd.yaml index fcc412213e2c..1f54fc9e8976 100644 --- a/cmd/install/assets/crds/hypershift-operator/zz_generated.crd-manifests/nodepools-Default.crd.yaml +++ b/cmd/install/assets/crds/hypershift-operator/zz_generated.crd-manifests/nodepools-Default.crd.yaml @@ -330,6 +330,39 @@ spec: After the timeout, any remaining attached volumes will be ignored and the removal of the machine will continue. Changing this field propagate inplace into existing Nodes. type: string + osImageStream: + description: |- + osImageStream specifies an OS stream to be used for nodes in this pool. + + This field can be optionally set to a known OSImageStream name to change + the OS and Extension images with a well-known, tested, release-provided + set of images. This enables a streamlined way of switching the pool's + node OS to a different version than the cluster default, such as + transitioning to a major RHEL version. + + When set, the referenced stream overrides the default OS images for the + pool. When omitted, the pool uses the release version's default stream + (rhel-9 for OCP < 5.0, rhel-10 for OCP >= 5.0). + Changing this field triggers a rollout. Forward transitions + (rhel-9 -> rhel-10) are allowed; backward transitions + (rhel-10 -> rhel-9) are rejected by CEL validation because + in-place OS downgrades are not supported. + properties: + name: + description: name is a required reference to an OSImageStream + to be used for the pool. + enum: + - rhel-9 + - rhel-10 + type: string + required: + - name + type: object + x-kubernetes-validations: + - message: OS stream downgrade from rhel-10 to rhel-9 is not allowed; + create a new NodePool instead + rule: '!has(oldSelf.name) || oldSelf.name != ''rhel-10'' || (has(self.name) + && self.name != ''rhel-9'')' pausedUntil: description: |- pausedUntil is a field that can be used to pause reconciliation on the NodePool controller. Resulting in any change to the NodePool being ignored. @@ -1528,6 +1561,9 @@ spec: - release type: object x-kubernetes-validations: + - message: osImageStream cannot be removed once set; create a new NodePool + instead + rule: '!has(oldSelf.osImageStream) || has(self.osImageStream)' - message: Arch is required once set rule: '!has(oldSelf.arch) || has(self.arch)' - message: Setting Arch to arm64 is only supported for AWS, Azure, Agent, @@ -1673,6 +1709,22 @@ spec: required: - nodeVersions type: object + osImageStream: + description: |- + osImageStream reports the OS stream observed on the nodes in this pool. + + When omitted, the pool is using the release version's default OS images. + properties: + name: + description: name is a required reference to an OSImageStream + to be used for the pool. + enum: + - rhel-9 + - rhel-10 + type: string + required: + - name + type: object platform: description: platform holds the specific statuses properties: diff --git a/go.mod b/go.mod index 07889bb56a91..6bcab083a300 100644 --- a/go.mod +++ b/go.mod @@ -63,7 +63,7 @@ require ( github.com/onsi/gomega v1.42.1 github.com/opencontainers/go-digest v1.0.0 github.com/opencontainers/image-spec v1.1.1 - github.com/openshift/api v0.0.0-20260805160557-b61243060d5f + github.com/openshift/api v0.0.0-20260820183036-3db6c4b03286 github.com/openshift/client-go v0.0.0-20260715172546-dac61734e0ec github.com/openshift/cloud-credential-operator v0.0.0-20250225003505-216fd1a30ec3 github.com/openshift/cluster-api-provider-agent/api v0.0.0-20260120122324-898e638ec7d1 diff --git a/go.sum b/go.sum index 8978917523e4..211ad4fe3804 100644 --- a/go.sum +++ b/go.sum @@ -576,8 +576,8 @@ github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJw github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M= github.com/opencontainers/selinux v1.13.0 h1:Zza88GWezyT7RLql12URvoxsbLfjFx988+LGaWfbL84= github.com/opencontainers/selinux v1.13.0/go.mod h1:XxWTed+A/s5NNq4GmYScVy+9jzXhGBVEOAyucdRUY8s= -github.com/openshift/api v0.0.0-20260805160557-b61243060d5f h1:NU7ltJhtFhqAJC+77DcNk6jmIpsJ3a+mebZIceiPW+U= -github.com/openshift/api v0.0.0-20260805160557-b61243060d5f/go.mod h1:k6qH5QOVa5GDln2VVm8Jz4NV3Z7R2SATHFLwGS6Wh3M= +github.com/openshift/api v0.0.0-20260820183036-3db6c4b03286 h1:zz+Bfuhq9gAlbICRli8wk9CKgGmRMe5yQSxzvnmX73Q= +github.com/openshift/api v0.0.0-20260820183036-3db6c4b03286/go.mod h1:k6qH5QOVa5GDln2VVm8Jz4NV3Z7R2SATHFLwGS6Wh3M= github.com/openshift/aws-karpenter-provider-aws v0.0.0-20260722223016-abcf7d1e3417 h1:b4vLxDvDmwESkz21ezCxIZOLRE8zk68gDjn4P4gvtbo= github.com/openshift/aws-karpenter-provider-aws v0.0.0-20260722223016-abcf7d1e3417/go.mod h1:K2x7H8k8k07WechkBHQ+sOr+6gPAkwILzVc7hYzODfY= github.com/openshift/client-go v0.0.0-20260715172546-dac61734e0ec h1:UDjX+mot5IVLpcChyBqLXG1oSB29s4UkqFmgNb0Xsqc= diff --git a/hypershift-operator/controllers/nodepool/aws_test.go b/hypershift-operator/controllers/nodepool/aws_test.go index 6bff1cbf502e..8a523990b286 100644 --- a/hypershift-operator/controllers/nodepool/aws_test.go +++ b/hypershift-operator/controllers/nodepool/aws_test.go @@ -173,7 +173,7 @@ func TestAWSMachineTemplateSpec(t *testing.T) { }), }, { - name: "When no sg is specified and no cluster sg is available, it should return NotReady error", + name: "When no sg is specified and no cluster sg is available, it should return a NotReady error", clusterStatus: &hyperv1.HostedClusterStatus{Platform: &hyperv1.PlatformStatus{AWS: &hyperv1.AWSPlatformStatus{DefaultWorkerSecurityGroupID: ""}}}, checkError: func(t *testing.T, err error) { var notReadyErr *NotReadyError diff --git a/hypershift-operator/controllers/nodepool/nodepool_controller.go b/hypershift-operator/controllers/nodepool/nodepool_controller.go index 6aa441b9d0de..b9d22adc5603 100644 --- a/hypershift-operator/controllers/nodepool/nodepool_controller.go +++ b/hypershift-operator/controllers/nodepool/nodepool_controller.go @@ -379,14 +379,6 @@ func (r *NodePoolReconciler) reconcile(ctx context.Context, hcluster *hyperv1.Ho }) return ctrl.Result{}, fmt.Errorf("failed to resolve RHEL stream for boot image: %w", err) } - // TODO(jparrill): remove debug log before merge - log.Info("Resolved RHEL stream for boot image", - "stream", resolvedRHELStream, - "osStreamsEnabled", osStreamsEnabled, - "specOSImageStream", nodePool.Spec.OSImageStream.Name, - "statusOSImageStream", nodePool.Status.OSImageStream.Name, - "releaseVersion", releaseImage.Version()) - if err := r.setPlatformConditions(ctx, hcluster, nodePool, controlPlaneNamespace, releaseImage, resolvedRHELStream); err != nil { return ctrl.Result{}, err } diff --git a/hypershift-operator/controllers/nodepool/osstream.go b/hypershift-operator/controllers/nodepool/osstream.go index e7e342f2632d..f52661305b67 100644 --- a/hypershift-operator/controllers/nodepool/osstream.go +++ b/hypershift-operator/controllers/nodepool/osstream.go @@ -85,33 +85,17 @@ func usesRuncRuntime(ctx context.Context, c client.Client, nodePool *hyperv1.Nod // // Resolution order: // 1. spec.osImageStream.Name — explicit user choice, always honored -// 2. status.osImageStream.Name — what existing nodes are running; -// preserves the current stream across upgrades to avoid unintended -// rollouts (e.g., upgrading from OCP 4.x to 5.0 keeps rhel-9) -// 3. When the OSStreams feature gate is disabled: always rhel-9 +// 2. When the OSStreams feature gate is disabled: always rhel-9 // (backwards-compatible with upstream behavior) -// 4. When the OSStreams feature gate is enabled: version-derived default -// via GetRHELStream — for brand-new NodePools with no status yet -// (rhel-9 for <5.0, rhel-10 for >=5.0) +// 3. When the OSStreams feature gate is enabled: version-derived default +// via GetRHELStream (rhel-9 for <5.0, rhel-10 for >=5.0) func GetRHELStreamForBootImage(ctx context.Context, c client.Client, nodePool *hyperv1.NodePool, releaseImage *releaseinfo.ReleaseImage, osStreamsEnabled bool) (string, error) { - // Explicit user choice takes precedence. explicitStream := nodePool.Spec.OSImageStream.Name if explicitStream == "" { - // Preserve the stream that nodes are already running to avoid a - // spurious rollout on upgrade (e.g., 4.x→5.0 keeps rhel-9). - if nodePool.Status.OSImageStream.Name != "" { - return nodePool.Status.OSImageStream.Name, nil - } if !osStreamsEnabled { - // Feature gate off: match upstream behavior (hardcoded rhel-9). - // Without this guard a 5.x NodePool would resolve to rhel-10 - // while the MCO still installs rhel-9, causing a template flip - // after machines report their actual OS. return StreamRHEL9, nil } - // Feature gate on, no status yet: fall through to version-derived - // default so brand-new OCP 5.0+ NodePools get rhel-10. } version, err := semver.Parse(releaseImage.Version()) diff --git a/hypershift-operator/controllers/nodepool/osstream_test.go b/hypershift-operator/controllers/nodepool/osstream_test.go index bcd04bd8cfb6..ead161354c6a 100644 --- a/hypershift-operator/controllers/nodepool/osstream_test.go +++ b/hypershift-operator/controllers/nodepool/osstream_test.go @@ -139,7 +139,7 @@ func TestGetRHELStreamForBootImage(t *testing.T) { expectedStream: "rhel-9", }, { - name: "When spec is empty and status has rhel-9 on OCP 5.0 upgrade, it should preserve rhel-9", + name: "When spec is empty and status has rhel-9 on OCP 5.0 upgrade, it should return version-derived rhel-10", nodePool: &hyperv1.NodePool{ Spec: hyperv1.NodePoolSpec{}, Status: hyperv1.NodePoolStatus{ @@ -150,10 +150,10 @@ func TestGetRHELStreamForBootImage(t *testing.T) { ImageStream: &imageapi.ImageStream{ObjectMeta: metav1.ObjectMeta{Name: "5.0.0"}}, }, osStreamsEnabled: true, - expectedStream: "rhel-9", + expectedStream: "rhel-10", }, { - name: "When spec is empty and FG off and status has rhel-9 on OCP 5.0, it should preserve rhel-9", + name: "When spec is empty and FG off and status has rhel-9 on OCP 5.0, it should return rhel-9", nodePool: &hyperv1.NodePool{ Spec: hyperv1.NodePoolSpec{}, Status: hyperv1.NodePoolStatus{ @@ -167,7 +167,7 @@ func TestGetRHELStreamForBootImage(t *testing.T) { expectedStream: "rhel-9", }, { - name: "When spec is empty and status has rhel-10 on OCP 5.0, it should preserve rhel-10", + name: "When spec is empty and status has rhel-10 on OCP 5.0, it should return version-derived rhel-10", nodePool: &hyperv1.NodePool{ Spec: hyperv1.NodePoolSpec{}, Status: hyperv1.NodePoolStatus{ @@ -213,7 +213,7 @@ func TestGetRHELStreamForBootImage(t *testing.T) { expectedStream: "rhel-9", }, { - name: "When spec is empty and status has rhel-9 with runc config, it should preserve rhel-9 without checking runc", + name: "When spec is empty and status has rhel-9 with runc config on OCP 5.0, it should return rhel-9 due to runc", nodePool: &hyperv1.NodePool{ ObjectMeta: metav1.ObjectMeta{ Name: "test-np", diff --git a/hypershift-operator/featuregate/feature.go b/hypershift-operator/featuregate/feature.go index c10387ebcdfe..a84d933b3b74 100644 --- a/hypershift-operator/featuregate/feature.go +++ b/hypershift-operator/featuregate/feature.go @@ -52,7 +52,7 @@ const ( // (e.g., OCP 5.0+ defaults to rhel-10). When disabled, boot images always use rhel-9. // owner: @jparrill // alpha: v0.1.49 - // beta: x.y.z + // default: OCP 5.0 OSStreams featuregate.Feature = "OSStreams" ) @@ -66,7 +66,7 @@ var ( hcpEtcdBackupFeature = featuregates.NewFeature(HCPEtcdBackup, featuregates.WithEnableForFeatureSets(configv1.TechPreviewNoUpgrade)) karpenterOperatorFeature = featuregates.NewFeature(KarpenterOperator, featuregates.WithEnableForFeatureSets(configv1.TechPreviewNoUpgrade)) etcdShardingFeature = featuregates.NewFeature(EtcdSharding, featuregates.WithEnableForFeatureSets(configv1.TechPreviewNoUpgrade)) - osStreamsFeature = featuregates.NewFeature(OSStreams, featuregates.WithEnableForFeatureSets(configv1.TechPreviewNoUpgrade)) + osStreamsFeature = featuregates.NewFeature(OSStreams, featuregates.WithEnableForFeatureSets(configv1.TechPreviewNoUpgrade, configv1.Default)) ) func init() { diff --git a/hypershift-operator/featuregate/feature_test.go b/hypershift-operator/featuregate/feature_test.go index ecea193bbad5..aee2a7f99841 100644 --- a/hypershift-operator/featuregate/feature_test.go +++ b/hypershift-operator/featuregate/feature_test.go @@ -102,6 +102,7 @@ func TestAllHypershiftOperatorFeatureGates(t *testing.T) { "GCPPlatform": false, "HCPEtcdBackup": false, "KarpenterOperator": false, + "OSStreams": true, }, }, { @@ -113,6 +114,7 @@ func TestAllHypershiftOperatorFeatureGates(t *testing.T) { "GCPPlatform": true, "HCPEtcdBackup": true, "KarpenterOperator": true, + "OSStreams": true, }, }, { @@ -124,6 +126,7 @@ func TestAllHypershiftOperatorFeatureGates(t *testing.T) { "GCPPlatform": false, "HCPEtcdBackup": false, "KarpenterOperator": false, + "OSStreams": false, }, }, } @@ -162,6 +165,12 @@ func TestAllHypershiftOperatorFeatureGates(t *testing.T) { assert.Equal(t, tc.expected["KarpenterOperator"], actualKarpenterOperator, "KarpenterOperator should be %v for feature set %s", tc.expected["KarpenterOperator"], tc.featureSet) + + // Test OSStreams + actualOSStreams := featuregate.Gate().Enabled(featuregate.OSStreams) + assert.Equal(t, tc.expected["OSStreams"], actualOSStreams, + "OSStreams should be %v for feature set %s", + tc.expected["OSStreams"], tc.featureSet) }) } } @@ -173,4 +182,5 @@ func TestFeatureGateConstants(t *testing.T) { assert.Equal(t, "GCPPlatform", string(featuregate.GCPPlatform)) assert.Equal(t, "HCPEtcdBackup", string(featuregate.HCPEtcdBackup)) assert.Equal(t, "KarpenterOperator", string(featuregate.KarpenterOperator)) + assert.Equal(t, "OSStreams", string(featuregate.OSStreams)) } diff --git a/test/e2e/nodepool_major_version_upgrade_test.go b/test/e2e/nodepool_major_version_upgrade_test.go new file mode 100644 index 000000000000..a82e21733b28 --- /dev/null +++ b/test/e2e/nodepool_major_version_upgrade_test.go @@ -0,0 +1,198 @@ +//go:build e2e + +package e2e + +import ( + "context" + "fmt" + "io" + "os" + "testing" + "time" + + . "github.com/onsi/gomega" + hyperv1 "github.com/openshift/hypershift/api/hypershift/v1beta1" + "github.com/openshift/hypershift/support/releaseinfo" + e2eutil "github.com/openshift/hypershift/test/e2e/util" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/intstr" + crclient "sigs.k8s.io/controller-runtime/pkg/client" + + "github.com/blang/semver" +) + +// NodePoolMajorVersionUpgradeTest validates that upgrading a NodePool across +// major/minor OCP versions (e.g. 4.x to 5.0) correctly updates +// status.osImageStream to the version-derived RHEL stream (rhel-10 for OCP 5.0+). +type NodePoolMajorVersionUpgradeTest struct { + DummyInfraSetup + ctx context.Context + mgmtClient crclient.Client + + hostedCluster *hyperv1.HostedCluster + hostedClusterClient crclient.Client + clusterOpts e2eutil.PlatformAgnosticOptions + previousReleaseImage string + latestReleaseImage string +} + +func NewNodePoolMajorVersionUpgradeTest(ctx context.Context, mgmtClient crclient.Client, hostedCluster *hyperv1.HostedCluster, + hcClient crclient.Client, clusterOpts e2eutil.PlatformAgnosticOptions, previousReleaseImage, latestReleaseImage string) *NodePoolMajorVersionUpgradeTest { + return &NodePoolMajorVersionUpgradeTest{ + ctx: ctx, + hostedCluster: hostedCluster, + hostedClusterClient: hcClient, + clusterOpts: clusterOpts, + mgmtClient: mgmtClient, + previousReleaseImage: previousReleaseImage, + latestReleaseImage: latestReleaseImage, + } +} + +func (ru *NodePoolMajorVersionUpgradeTest) Setup(t *testing.T) { + t.Log("starting test NodePoolMajorVersionUpgradeTest") +} + +func (ru *NodePoolMajorVersionUpgradeTest) BuildNodePoolManifest(defaultNodepool hyperv1.NodePool) (*hyperv1.NodePool, error) { + nodePool := &hyperv1.NodePool{ + ObjectMeta: metav1.ObjectMeta{ + Name: ru.hostedCluster.Name + "-" + "test-majorversionupgrade", + Namespace: ru.hostedCluster.Namespace, + }, + } + defaultNodepool.Spec.DeepCopyInto(&nodePool.Spec) + + nodePool.Spec.Replicas = &oneReplicas + nodePool.Spec.Management.Replace = &hyperv1.ReplaceUpgrade{ + Strategy: hyperv1.UpgradeStrategyRollingUpdate, + RollingUpdate: &hyperv1.RollingUpdate{ + MaxUnavailable: func(v intstr.IntOrString) *intstr.IntOrString { return &v }(intstr.FromInt(0)), + MaxSurge: func(v intstr.IntOrString) *intstr.IntOrString { return &v }(intstr.FromInt(int(oneReplicas))), + }, + } + + nodePool.Spec.Release.Image = ru.previousReleaseImage + + return nodePool, nil +} + +func (ru *NodePoolMajorVersionUpgradeTest) Run(t *testing.T, nodePool hyperv1.NodePool, nodes []corev1.Node) { + g := NewWithT(t) + ctx := ru.ctx + + releaseInfoProvider := &releaseinfo.RegistryClientProvider{} + pullSecretFile, err := os.Open(ru.clusterOpts.PullSecretFile) + g.Expect(err).NotTo(HaveOccurred(), "failed to open pull secret file") + defer pullSecretFile.Close() + pullSecret, err := io.ReadAll(pullSecretFile) + g.Expect(err).NotTo(HaveOccurred(), "failed to read pull secret file") + previousReleaseInfo, err := releaseInfoProvider.Lookup(ctx, ru.previousReleaseImage, pullSecret) + g.Expect(err).NotTo(HaveOccurred(), "failed to get release info for previous image") + latestReleaseInfo, err := releaseInfoProvider.Lookup(ctx, ru.latestReleaseImage, pullSecret) + g.Expect(err).NotTo(HaveOccurred(), "failed to get release info for latest image") + + previousVersion, err := semver.Parse(previousReleaseInfo.Version()) + g.Expect(err).NotTo(HaveOccurred(), "failed to parse previous release version") + latestVersion, err := semver.Parse(latestReleaseInfo.Version()) + g.Expect(err).NotTo(HaveOccurred(), "failed to parse latest release version") + if latestVersion.Major <= previousVersion.Major { + t.Skipf("skipping major-version upgrade test: latest (%s) is not a higher major than previous (%s)", + latestReleaseInfo.Version(), previousReleaseInfo.Version()) + } + + t.Logf("Major-version upgrade: %s -> %s", previousReleaseInfo.Version(), latestReleaseInfo.Version()) + + // Verify NodePool is at the previous version before upgrade. + e2eutil.EventuallyObject(t, ctx, fmt.Sprintf("NodePool %s/%s to have version %s", nodePool.Namespace, nodePool.Name, previousReleaseInfo.ObjectMeta.Name), + func(ctx context.Context) (*hyperv1.NodePool, error) { + np := &hyperv1.NodePool{} + err := ru.mgmtClient.Get(ctx, crclient.ObjectKeyFromObject(&nodePool), np) + return np, err + }, + []e2eutil.Predicate[*hyperv1.NodePool]{ + func(nodePool *hyperv1.NodePool) (done bool, reasons string, err error) { + return nodePool.Status.Version == previousReleaseInfo.ObjectMeta.Name, fmt.Sprintf("wanted version %s, got %s", previousReleaseInfo.ObjectMeta.Name, nodePool.Status.Version), nil + }, + }, + e2eutil.WithTimeout(10*time.Second), + ) + + // Record pre-upgrade osImageStream. + { + np := &hyperv1.NodePool{} + g.Expect(ru.mgmtClient.Get(ctx, crclient.ObjectKeyFromObject(&nodePool), np)).To(Succeed()) + t.Logf("Pre-upgrade osImageStream: %q", np.Status.OSImageStream.Name) + } + + // Upgrade to latest release. + err = ru.mgmtClient.Get(ctx, crclient.ObjectKeyFromObject(&nodePool), &nodePool) + g.Expect(err).NotTo(HaveOccurred(), "failed to get NodePool") + t.Logf("Upgrading NodePool image: %s -> %s", ru.previousReleaseImage, ru.latestReleaseImage) + original := nodePool.DeepCopy() + nodePool.Spec.Release.Image = ru.latestReleaseImage + err = ru.mgmtClient.Patch(ctx, &nodePool, crclient.MergeFrom(original)) + g.Expect(err).NotTo(HaveOccurred(), "failed to update NodePool image") + + // Wait for upgrade to start. + e2eutil.EventuallyObject(t, ctx, fmt.Sprintf("NodePool %s/%s to start the upgrade", nodePool.Namespace, nodePool.Name), + func(ctx context.Context) (*hyperv1.NodePool, error) { + np := &hyperv1.NodePool{} + err := ru.mgmtClient.Get(ctx, crclient.ObjectKeyFromObject(&nodePool), np) + return np, err + }, + []e2eutil.Predicate[*hyperv1.NodePool]{ + e2eutil.ConditionPredicate[*hyperv1.NodePool](e2eutil.Condition{ + Type: hyperv1.NodePoolUpdatingVersionConditionType, + Status: metav1.ConditionTrue, + }), + }, + ) + + // Wait for upgrade to complete. + upgradeTimeout := 30 * time.Minute + switch ru.hostedCluster.Spec.Platform.Type { + case hyperv1.AzurePlatform, hyperv1.KubevirtPlatform: + upgradeTimeout = 45 * time.Minute + } + + e2eutil.EventuallyObject(t, ctx, fmt.Sprintf("NodePool %s/%s to have version %s", nodePool.Namespace, nodePool.Name, latestReleaseInfo.Version()), + func(ctx context.Context) (*hyperv1.NodePool, error) { + np := &hyperv1.NodePool{} + err := ru.mgmtClient.Get(ctx, crclient.ObjectKeyFromObject(&nodePool), np) + return np, err + }, + []e2eutil.Predicate[*hyperv1.NodePool]{ + func(nodePool *hyperv1.NodePool) (done bool, reasons string, err error) { + want, got := latestReleaseInfo.Version(), nodePool.Status.Version + return want == got, fmt.Sprintf("wanted version %s, got %s", want, got), nil + }, + e2eutil.ConditionPredicate[*hyperv1.NodePool](e2eutil.Condition{ + Type: hyperv1.NodePoolUpdatingVersionConditionType, + Status: metav1.ConditionFalse, + }), + }, + e2eutil.WithTimeout(upgradeTimeout), + ) + + newNodes := e2eutil.WaitForReadyNodesByNodePool(t, ctx, ru.hostedClusterClient, &nodePool, ru.hostedCluster.Spec.Platform.Type) + e2eutil.EnsureNodesRuntime(t, newNodes, &nodePool) + + // Verify osImageStream is rhel-10 after major-version upgrade to OCP 5.0+. + expectedStream := string(hyperv1.OSImageStreamRHEL10) + t.Logf("Verifying osImageStream=%s after major-version upgrade to %s", expectedStream, latestReleaseInfo.Version()) + + e2eutil.EventuallyObject(t, ctx, + fmt.Sprintf("NodePool %s/%s status to report osImageStream=%s after major-version upgrade", nodePool.Namespace, nodePool.Name, expectedStream), + func(ctx context.Context) (*hyperv1.NodePool, error) { + np := &hyperv1.NodePool{} + err := ru.mgmtClient.Get(ctx, crclient.ObjectKeyFromObject(&nodePool), np) + return np, err + }, + []e2eutil.Predicate[*hyperv1.NodePool]{ + e2eutil.OSImageStreamPredicate(expectedStream), + }, + e2eutil.WithTimeout(5*time.Minute), + e2eutil.WithInterval(15*time.Second), + ) +} diff --git a/test/e2e/nodepool_test.go b/test/e2e/nodepool_test.go index f72452ab793d..24c839dab9f5 100644 --- a/test/e2e/nodepool_test.go +++ b/test/e2e/nodepool_test.go @@ -83,6 +83,11 @@ func TestNodePool(t *testing.T) { manifestBuilder: NewNodePoolInPlaceUpgradeTestManifest(hostedCluster, globalOpts.PreviousReleaseImage, globalOpts.LatestReleaseImage), }, + { + name: "TestNodePoolMajorVersionUpgrade", + test: NewNodePoolMajorVersionUpgradeTest(ctx, mgtClient, hostedCluster, hostedClusterClient, clusterOpts, globalOpts.PreviousReleaseImage, globalOpts.LatestReleaseImage), + }, + { name: "KubeVirtCacheTest", test: NewKubeVirtCacheTest(ctx, mgtClient, hostedCluster), diff --git a/test/e2e/nodepool_upgrade_test.go b/test/e2e/nodepool_upgrade_test.go index f96fe459dbd3..8bdd718ead68 100644 --- a/test/e2e/nodepool_upgrade_test.go +++ b/test/e2e/nodepool_upgrade_test.go @@ -254,7 +254,7 @@ func (ru *NodePoolUpgradeTest) Run(t *testing.T, nodePool hyperv1.NodePool, node e2eutil.WithTimeout(ru.getNodePoolUpgradeTimeout()), ) newNodes := e2eutil.WaitForReadyNodesByNodePool(t, ctx, ru.hostedClusterClient, &nodePool, ru.hostedCluster.Spec.Platform.Type) - e2eutil.EnsureNodesRuntime(t, newNodes) + e2eutil.EnsureNodesRuntime(t, newNodes, &nodePool) // Validate NodesInfo is populated with the latest version after upgrade. t.Logf("Validating NodesInfo is populated with version %s after upgrade", latestReleaseInfo.Version()) @@ -276,4 +276,13 @@ func (ru *NodePoolUpgradeTest) Run(t *testing.T, nodePool hyperv1.NodePool, node }, e2eutil.WithTimeout(2*time.Minute), ) + + // Verify osImageStream is populated after upgrade. + { + np := &hyperv1.NodePool{} + g.Expect(ru.mgmtClient.Get(ctx, crclient.ObjectKeyFromObject(&nodePool), np)).To(Succeed(), "failed to get NodePool for osImageStream validation") + if np.Status.OSImageStream.Name != "" { + t.Logf("Post-upgrade osImageStream: %s", np.Status.OSImageStream.Name) + } + } } diff --git a/test/e2e/util/util.go b/test/e2e/util/util.go index 2f9ce141193d..c086cbc6740c 100644 --- a/test/e2e/util/util.go +++ b/test/e2e/util/util.go @@ -1307,14 +1307,21 @@ func EnsureNetworkPolicies(t *testing.T, ctx context.Context, c crclient.Client, // EnsureNodesRuntime ensures that all nodes in the NodePool have the expected runtime handlers. // This is only supported on 4.18+ when the default runtime is changed to crun. -func EnsureNodesRuntime(t *testing.T, nodes []corev1.Node) { +// On OCP 5.0+ with RHEL-10, only crun is expected (runc is not shipped). +// RHEL-9 nodes (pre-5.0 or explicit spec.osImageStream.name=rhel-9) ship both runc and crun. +func EnsureNodesRuntime(t *testing.T, nodes []corev1.Node, nodePool *hyperv1.NodePool) { AtLeast(t, Version418) g := NewWithT(t) + isRHEL9 := IsLessThan(Version50) || + nodePool.Spec.OSImageStream.Name == string(hyperv1.OSImageStreamRHEL9) + validHandlers := map[string]bool{ - "runc": false, "crun": false, } + if isRHEL9 { + validHandlers["runc"] = false + } for _, node := range nodes { g.Expect(node.Status.RuntimeHandlers).NotTo(BeNil(), "node %s is missing runtime handlers", node.Name) diff --git a/test/e2e/v2/lifecycle/azure.go b/test/e2e/v2/lifecycle/azure.go index f2628b84df0a..4c8ac18ded01 100644 --- a/test/e2e/v2/lifecycle/azure.go +++ b/test/e2e/v2/lifecycle/azure.go @@ -327,14 +327,14 @@ func (a *AzurePlatformConfig) TestMatrix(releaseImage string) TestMatrix { { Name: "public", Variant: "public", - LabelFilter: "self-managed-azure-public || nodepool-lifecycle || secret-encryption || control-plane-workloads || hosted-cluster-security", + LabelFilter: "self-managed-azure-public || nodepool-lifecycle || secret-encryption || control-plane-workloads || hosted-cluster-security || nodepool-osimagestream", Skip: "KAS allowed CIDRs", JUnitFile: "junit_self_managed_azure_public.xml", }, { Name: "private", Variant: "private", - LabelFilter: "self-managed-azure-private || hosted-cluster-compliance || nodepool-osimagestream", + LabelFilter: "self-managed-azure-private || hosted-cluster-compliance", JUnitFile: "junit_self_managed_azure_private.xml", }, { diff --git a/test/e2e/v2/tests/nodepool_lifecycle_test.go b/test/e2e/v2/tests/nodepool_lifecycle_test.go index 32a0a3d8aa0c..43b6554f6f70 100644 --- a/test/e2e/v2/tests/nodepool_lifecycle_test.go +++ b/test/e2e/v2/tests/nodepool_lifecycle_test.go @@ -65,6 +65,7 @@ func RegisterNodePoolLifecycleTests(getTestCtx internal.TestContextGetter) { NodePoolNTOPerformanceProfileTest(getTestCtx) NodePoolAutoRepairTest(getTestCtx) NodePoolDiskEncryptionTest(getTestCtx) + NodePoolOSImageStreamUpgradeVerificationTest(getTestCtx) } var _ = Describe("[sig-hypershift][Jira:Hypershift][Feature:NodePoolLifecycle] NodePool Lifecycle", Label("lifecycle", "nodepool-lifecycle"), func() { @@ -1462,13 +1463,6 @@ func waitForDaemonSetRollout(ctx context.Context, client crclient.Client, ds *ap ) } -// TODO(CNTRLPLANE-3871): Add a dedicated osImageStream post-upgrade verification test -// in nodepool_osimagestream_test.go under the e2e-v2-aws-techpreview-osimagestream job. -// The verifyOSImageStreamAfterUpgrade function was removed from the upgrade tests because -// it requires TechPreview on the hosted cluster to work correctly. Once the OSStreams FG -// is graduated to Default (openshift/api#2950), the verification can be re-integrated -// into the standard upgrade tests. - // nodePoolUpgradeTimeout returns the appropriate timeout for NodePool upgrades // based on the platform type. func nodePoolUpgradeTimeout(platform hyperv1.PlatformType) time.Duration { diff --git a/test/e2e/v2/tests/nodepool_osimagestream_test.go b/test/e2e/v2/tests/nodepool_osimagestream_test.go index 04ff4cd7e85e..15b8ed3ac955 100644 --- a/test/e2e/v2/tests/nodepool_osimagestream_test.go +++ b/test/e2e/v2/tests/nodepool_osimagestream_test.go @@ -23,6 +23,7 @@ import ( "strings" "time" + "github.com/blang/semver" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" @@ -81,7 +82,7 @@ func osImageStreamBeforeEach(testCtx **internal.TestContext) { } } -var _ = Describe("[sig-hypershift][Jira:Hypershift][FeatureGate:OSStreams][Feature:NodePoolOSImageStream] NodePool OSImageStream Lifecycle", Label("lifecycle", "nodepool-osimagestream"), func() { +var _ = Describe("[sig-hypershift][Jira:Hypershift][Feature:OSStreams] NodePool OSImageStream Lifecycle", Label("lifecycle", "nodepool-osimagestream"), func() { var testCtx *internal.TestContext BeforeEach(func() { @@ -91,8 +92,7 @@ var _ = Describe("[sig-hypershift][Jira:Hypershift][FeatureGate:OSStreams][Featu RegisterNodePoolOSImageStreamLifecycleTests(func() *internal.TestContext { return testCtx }) }) -// TODO(jparrill): Remove "lifecycle" label after OSStreams FG graduates to Default (openshift/api#2950) -var _ = Describe("[sig-hypershift][Jira:Hypershift][FeatureGate:OSStreams][Feature:NodePoolOSImageStream] NodePool OSImageStream Status", Label("lifecycle", "nodepool-osimagestream"), func() { +var _ = Describe("[sig-hypershift][Jira:Hypershift][Feature:OSStreams] NodePool OSImageStream Status", Label("lifecycle", "nodepool-osimagestream"), func() { var testCtx *internal.TestContext BeforeEach(func() { @@ -303,7 +303,16 @@ func NodePoolOSImageStreamDefaultStatusTest(getTestCtx internal.TestContextGette ) By("verifying node OS images match the resolved osImageStream") - verifyNodeOSMatchesStream(testCtx, defaultNP, expectedStream) + // TODO(CNTRLPLANE-3871): Remove Azure skip when openshift/installer#10764 merges. + // The OCP 5.0 release payload does not include RHEL-10 Azure Marketplace images + // (no-purchase-plan is empty for rhel-10). Nodes boot with RHEL-9 images but + // status.osImageStream correctly reports rhel-10. Once the installer PR adds + // the aro_5-0 SKUs to the payload, this guard can be removed. + if hc.Spec.Platform.Type == hyperv1.AzurePlatform && expectedStream == hyperv1.OSImageStreamRHEL10 { + GinkgoWriter.Printf("Skipping default NodePool OS verification on Azure: RHEL-10 marketplace images not yet in release payload (openshift/installer#10764)\n") + } else { + verifyNodeOSMatchesStream(testCtx, defaultNP, expectedStream) + } }) } @@ -410,7 +419,20 @@ func NodePoolOSImageStreamNodeOSVerificationTest(getTestCtx internal.TestContext By(fmt.Sprintf("verifying the default NodePool (spec.osImageStream=%q, status.osImageStream=%s) runs the expected OS", defaultNP.Spec.OSImageStream.Name, defaultStream)) - verifyNodeOSMatchesStream(testCtx, defaultNP, defaultStream) + + // TODO(CNTRLPLANE-3871): Remove Azure guard when openshift/installer#10764 merges. + // The OCP 5.0 release payload does not include RHEL-10 Azure Marketplace images + // (no-purchase-plan is empty for rhel-10). The default NodePool boots with the + // CLI-provided RHEL-9 marketplace image, so OS verification would fail with a + // version mismatch (nodes=RHCOS 9 vs expected=RHCOS 10). Instead, we create a + // dedicated rhel-10 NodePool below with an explicit marketplace image to verify + // that RHEL-10 boots correctly on Azure. + isAzureRHEL10Gap := hc.Spec.Platform.Type == hyperv1.AzurePlatform && defaultStream == hyperv1.OSImageStreamRHEL10 + if isAzureRHEL10Gap { + GinkgoWriter.Printf("Skipping default NodePool OS verification on Azure: RHEL-10 marketplace images not yet in release payload (openshift/installer#10764)\n") + } else { + verifyNodeOSMatchesStream(testCtx, defaultNP, defaultStream) + } var alternateStream string switch defaultStream { @@ -438,6 +460,35 @@ func NodePoolOSImageStreamNodeOSVerificationTest(getTestCtx internal.TestContext By(fmt.Sprintf("verifying %s NodePool nodes run the correct OS", alternateStream)) verifyNodeOSMatchesStream(testCtx, npAlternate, alternateStream) + + // TODO(CNTRLPLANE-3871): Remove this block when openshift/installer#10764 merges. + // The release payload will then include RHEL-10 Azure Marketplace images and the + // default NodePool will boot with RHEL-10 natively, making this explicit NP unnecessary. + if isAzureRHEL10Gap { + By("creating a dedicated rhel-10 NodePool with explicit Azure Marketplace image") + npRHEL10 := buildTestNodePool(defaultNP, "osstream-rhel10-azure", func(pool *hyperv1.NodePool) { + pool.Spec.Replicas = &oneReplica + pool.Spec.OSImageStream = hyperv1.OSImageStreamReference{ + Name: hyperv1.OSImageStreamRHEL10, + } + pool.Spec.Platform.Azure.Image.Type = hyperv1.AzureMarketplace + pool.Spec.Platform.Azure.Image.AzureMarketplace = &hyperv1.AzureMarketplaceImage{ + Publisher: "azureopenshift", + Offer: "aro4", + SKU: "aro_5-0_x64_gen2", + Version: "10.2.20260423", + ImageGeneration: ptr.To(hyperv1.Gen2), + } + }) + Expect(testCtx.MgmtClient.Create(ctx, npRHEL10)).To(Succeed(), "failed to create RHEL-10 NodePool %s", npRHEL10.Name) + GinkgoWriter.Printf("Created RHEL-10 NodePool %s with explicit Azure Marketplace image aro_5-0_x64_gen2\n", npRHEL10.Name) + DeferCleanup(func() { + cleanupNodePool(ctx, testCtx.MgmtClient, npRHEL10) + }) + + By("verifying rhel-10 NodePool nodes run RHCOS 10 on Azure") + verifyNodeOSMatchesStream(testCtx, npRHEL10, hyperv1.OSImageStreamRHEL10) + } }) } @@ -620,9 +671,8 @@ func NodePoolOSImageStreamExplicitDefaultNoRolloutTest(getTestCtx internal.TestC // NodePoolOSImageStreamUpgradeVerificationTest creates a NodePool at a previous // release image, upgrades it to the latest, and verifies that status.osImageStream -// reports the correct version-derived stream after upgrade completes. -// TODO(CNTRLPLANE-3871): After OSStreams FG graduation (openshift/api#2950), -// move this verification back into the standard upgrade tests in nodepool_lifecycle_test.go. +// reports the version-derived stream after upgrade. The RHEL version follows the +// release version: upgrading to OCP 5.0+ results in rhel-10. func NodePoolOSImageStreamUpgradeVerificationTest(getTestCtx internal.TestContextGetter) { It("When a NodePool is upgraded, it should report the correct osImageStream in status", func() { testCtx := getTestCtx() @@ -690,12 +740,17 @@ func NodePoolOSImageStreamUpgradeVerificationTest(getTestCtx internal.TestContex e2eutil.WaitForReadyNodesByNodePool(GinkgoTB(), ctx, hcClient, np, hc.Spec.Platform.Type) // Verify osImageStream status after upgrade. - // An upgraded NodePool preserves its existing stream — the controller - // uses status.osImageStream (set from the pre-upgrade nodes) rather - // than the version-derived default. Since the NP was created at a - // pre-5.0 release, nodes booted with rhel-9 and the stream stays rhel-9 - // even after upgrading to 5.0. + // The RHEL version is dictated by the release version. After upgrading + // to OCP 5.0+, nodes get rhel-10 boot images and the stream updates + // accordingly. Only an explicit spec.osImageStream pin overrides this. + upgradedNP := &hyperv1.NodePool{} + Expect(testCtx.MgmtClient.Get(ctx, crclient.ObjectKeyFromObject(np), upgradedNP)).To(Succeed()) + upgradedVersion, err := semver.ParseTolerant(upgradedNP.Status.Version) + Expect(err).NotTo(HaveOccurred(), "failed to parse upgraded NodePool version %q", upgradedNP.Status.Version) expectedStream := hyperv1.OSImageStreamRHEL9 + if upgradedVersion.Major >= 5 { + expectedStream = hyperv1.OSImageStreamRHEL10 + } e2eutil.EventuallyObject[*hyperv1.NodePool]( GinkgoTB(), ctx, diff --git a/vendor/github.com/openshift/api/config/v1/types_infrastructure.go b/vendor/github.com/openshift/api/config/v1/types_infrastructure.go index a89377ef7d0c..00c5ad3097be 100644 --- a/vendor/github.com/openshift/api/config/v1/types_infrastructure.go +++ b/vendor/github.com/openshift/api/config/v1/types_infrastructure.go @@ -720,7 +720,7 @@ type AzureResourceTag struct { } // AzureCloudEnvironment is the name of the Azure cloud environment -// +kubebuilder:validation:Enum="";AzurePublicCloud;AzureUSGovernmentCloud;AzureChinaCloud;AzureGermanCloud;AzureStackCloud +// +kubebuilder:validation:Enum="";AzurePublicCloud;AzureUSGovernmentCloud;AzureChinaCloud;AzureGermanCloud;AzureStackCloud;AzureUSSecCloud type AzureCloudEnvironment string const ( @@ -738,6 +738,9 @@ const ( // AzureStackCloud is the Azure cloud environment used at the edge and on premises. AzureStackCloud AzureCloudEnvironment = "AzureStackCloud" + + // AzureUSSecCloud is the Azure cloud environment for US Government Secret (IL6) workloads. + AzureUSSecCloud AzureCloudEnvironment = "AzureUSSecCloud" ) // Start: TOMBSTONE diff --git a/vendor/github.com/openshift/api/config/v1alpha1/types_cluster_monitoring.go b/vendor/github.com/openshift/api/config/v1alpha1/types_cluster_monitoring.go index fa71f3377b10..98f8d7dc592f 100644 --- a/vendor/github.com/openshift/api/config/v1alpha1/types_cluster_monitoring.go +++ b/vendor/github.com/openshift/api/config/v1alpha1/types_cluster_monitoring.go @@ -481,6 +481,23 @@ type NodeExporterCollectorConfig struct { // Enable when you need visibility into kernel memory zone allocation and pressure. // +optional Zoneinfo NodeExporterCollectorZoneinfoConfig `json:"zoneinfo,omitzero"` + // nvmExpressSubsystem configures the nvmesubsystem collector, which + // collects statistics about NVM Express (NVMe) subsystem devices. + // nvmExpressSubsystem is optional. + // When omitted, this means no opinion and the platform is left to choose a reasonable default, + // which is subject to change over time. The current default is enabled. + // +optional + NVMExpressSubsystem NodeExporterCollectorNVMExpressSubsystemConfig `json:"nvmExpressSubsystem,omitzero"` + // interrupts configures the interrupts collector, which exposes interrupt counts + // from /proc/interrupts. + // interrupts is optional. + // When omitted, this means no opinion and the platform is left to choose a reasonable default, + // which is subject to change over time. The current default is disabled. + // The interrupts collector can produce a large number of metrics depending on the hardware + // and interrupt sources present. When enabled, the collect field with at least one include + // pattern is required to explicitly select which interrupt lines are collected. + // +optional + Interrupts NodeExporterCollectorInterruptsConfig `json:"interrupts,omitempty,omitzero"` } // NodeExporterCollectorCpufreqConfig provides configuration for the cpufreq collector @@ -541,7 +558,7 @@ type NodeExporterCollectorNetDevConfig struct { // such as network speed, MTU, and carrier status. // It is enabled by default. // When collectionPolicy is DoNotCollect, the collect field must not be set. -// +kubebuilder:validation:XValidation:rule="has(self.collectionPolicy) && self.collectionPolicy == 'Collect' ? true : !has(self.collect)",message="collect is forbidden when collectionPolicy is not Collect" +// +kubebuilder:validation:XValidation:rule="has(self.collectionPolicy) && self.collectionPolicy == 'Collect' ? true : !has(self.collect)",message="collect may be set when collectionPolicy is Collect, and forbidden otherwise" // +union type NodeExporterCollectorNetClassConfig struct { // collectionPolicy declares whether the netclass collector collects metrics. @@ -642,7 +659,7 @@ type NodeExporterCollectorProcessesConfig struct { // cardinality. If you enable this collector, closely monitor the prometheus-k8s deployment // for excessive memory usage. // When collectionPolicy is DoNotCollect, the collect field must not be set. -// +kubebuilder:validation:XValidation:rule="has(self.collectionPolicy) && self.collectionPolicy == 'Collect' ? true : !has(self.collect)",message="collect is forbidden when collectionPolicy is not Collect" +// +kubebuilder:validation:XValidation:rule="has(self.collectionPolicy) && self.collectionPolicy == 'Collect' ? true : !has(self.collect)",message="collect may be set when collectionPolicy is Collect, and forbidden otherwise" // +union type NodeExporterCollectorSystemdConfig struct { // collectionPolicy declares whether the systemd collector collects metrics. @@ -732,6 +749,83 @@ type NodeExporterCollectorZoneinfoConfig struct { CollectionPolicy NodeExporterCollectorCollectionPolicy `json:"collectionPolicy,omitempty"` } +// NodeExporterCollectorNVMExpressSubsystemConfig provides configuration for +// the nvmesubsystem collector of the node-exporter agent. The nvmesubsystem +// collector collects statistics about NVM Express (NVMe) subsystem devices. +// It is enabled by default. +type NodeExporterCollectorNVMExpressSubsystemConfig struct { + // collectionPolicy declares whether the nvmesubsystem collector collects metrics. + // This field is required. + // Valid values are "Collect" and "DoNotCollect". + // When set to "Collect", the nvmesubsystem collector is active and NVMe subsystem statistics are collected. + // When set to "DoNotCollect", the nvmesubsystem collector is inactive and the corresponding metrics become unavailable. + // +required + CollectionPolicy NodeExporterCollectorCollectionPolicy `json:"collectionPolicy,omitempty"` +} + +// NodeExporterCollectorInterruptsConfig provides configuration for the interrupts collector +// of the node-exporter agent. The interrupts collector exposes interrupt counts +// from /proc/interrupts. +// It is disabled by default. +// The interrupts collector can produce a large number of metrics depending on the hardware +// and interrupt sources present. When enabled, the collect field with at least one include +// pattern is required to explicitly select which interrupt lines are collected. +// When collectionPolicy is Collect, the collect field must be set with at least one include pattern. +// When collectionPolicy is DoNotCollect, the collect field must not be set. +// +kubebuilder:validation:XValidation:rule="has(self.collectionPolicy) && self.collectionPolicy == 'Collect' ? has(self.collect) : !has(self.collect)",message="collect is required when collectionPolicy is Collect, and forbidden otherwise" +// +union +type NodeExporterCollectorInterruptsConfig struct { + // collectionPolicy declares whether the interrupts collector collects metrics. + // This field is required. + // Valid values are "Collect" and "DoNotCollect". + // When set to "Collect", the interrupts collector is active and the collect field must be set + // with at least one include pattern to select which interrupt lines are collected. + // When set to "DoNotCollect", the interrupts collector is inactive and the collect field must not be set. + // +unionDiscriminator + // +required + CollectionPolicy NodeExporterCollectorCollectionPolicy `json:"collectionPolicy,omitempty"` + // collect contains configuration options that apply only when the interrupts collector is actively collecting metrics + // (i.e. when collectionPolicy is Collect). + // collect is required when collectionPolicy is Collect and must contain at least one include pattern + // to explicitly select which interrupt lines are collected. + // collect must not be set when collectionPolicy is DoNotCollect. + // When set, at least one field must be specified within collect. + // +unionMember + // +optional + Collect NodeExporterCollectorInterruptsCollectConfig `json:"collect,omitzero,omitempty"` +} + +// NodeExporterCollectorInterruptsCollectConfig holds configuration options for the interrupts collector +// when it is actively collecting metrics. At least one field must be specified. +// +kubebuilder:validation:MinProperties=1 +type NodeExporterCollectorInterruptsCollectConfig struct { + // include is a list of regular expression patterns that select which interrupt lines to collect. + // This field is required. + // Each line in /proc/interrupts is matched against the same string node-exporter uses: + // the IRQ name, info, and devices fields joined with ";", for example "LOC;77;IO-APIC 2-edge ...". + // Patterns are combined with OR into a single expression anchored on both ends, + // so each pattern must match the entire string (use ".*" where needed). + // Each entry must be at least 1 character, at most 1024 characters, and only contain printable ASCII characters. + // Maximum length for this list is 50. + // Minimum length for this list is 1. + // Entries in this list must be unique. + // +kubebuilder:validation:MaxItems=50 + // +kubebuilder:validation:MinItems=1 + // +listType=set + // +required + Include []NodeExporterInterruptsIncludePattern `json:"include,omitempty"` +} + +// NodeExporterInterruptsIncludePattern is a string that is interpreted as a Go regular expression +// pattern by the controller to match interrupt line names. +// Invalid regular expressions will cause a controller-level error at runtime. +// Must be at least 1 character and at most 1024 characters. +// Must contain only printable ASCII characters (no control characters). +// +kubebuilder:validation:MinLength=1 +// +kubebuilder:validation:MaxLength=1024 +// +kubebuilder:validation:XValidation:rule="self.matches('^[\\\\x20-\\\\x7E]+$')",message="must contain only printable ASCII characters (no control characters)" +type NodeExporterInterruptsIncludePattern string + // MonitoringPluginConfig provides configuration options for the monitoring plugin // that runs as a dynamic plugin of the OpenShift web console. // The monitoring plugin provides the monitoring UI in the OpenShift web console diff --git a/vendor/github.com/openshift/api/config/v1alpha1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/config/v1alpha1/zz_generated.deepcopy.go index 0815e0226023..598f38fc5de0 100644 --- a/vendor/github.com/openshift/api/config/v1alpha1/zz_generated.deepcopy.go +++ b/vendor/github.com/openshift/api/config/v1alpha1/zz_generated.deepcopy.go @@ -1026,6 +1026,8 @@ func (in *NodeExporterCollectorConfig) DeepCopyInto(out *NodeExporterCollectorCo out.Softirqs = in.Softirqs out.DeviceMapperMultipath = in.DeviceMapperMultipath out.Zoneinfo = in.Zoneinfo + out.NVMExpressSubsystem = in.NVMExpressSubsystem + in.Interrupts.DeepCopyInto(&out.Interrupts) return } @@ -1087,6 +1089,44 @@ func (in *NodeExporterCollectorEthtoolConfig) DeepCopy() *NodeExporterCollectorE return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NodeExporterCollectorInterruptsCollectConfig) DeepCopyInto(out *NodeExporterCollectorInterruptsCollectConfig) { + *out = *in + if in.Include != nil { + in, out := &in.Include, &out.Include + *out = make([]NodeExporterInterruptsIncludePattern, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeExporterCollectorInterruptsCollectConfig. +func (in *NodeExporterCollectorInterruptsCollectConfig) DeepCopy() *NodeExporterCollectorInterruptsCollectConfig { + if in == nil { + return nil + } + out := new(NodeExporterCollectorInterruptsCollectConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NodeExporterCollectorInterruptsConfig) DeepCopyInto(out *NodeExporterCollectorInterruptsConfig) { + *out = *in + in.Collect.DeepCopyInto(&out.Collect) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeExporterCollectorInterruptsConfig. +func (in *NodeExporterCollectorInterruptsConfig) DeepCopy() *NodeExporterCollectorInterruptsConfig { + if in == nil { + return nil + } + out := new(NodeExporterCollectorInterruptsConfig) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *NodeExporterCollectorKSMDConfig) DeepCopyInto(out *NodeExporterCollectorKSMDConfig) { *out = *in @@ -1119,6 +1159,22 @@ func (in *NodeExporterCollectorMountStatsConfig) DeepCopy() *NodeExporterCollect return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NodeExporterCollectorNVMExpressSubsystemConfig) DeepCopyInto(out *NodeExporterCollectorNVMExpressSubsystemConfig) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeExporterCollectorNVMExpressSubsystemConfig. +func (in *NodeExporterCollectorNVMExpressSubsystemConfig) DeepCopy() *NodeExporterCollectorNVMExpressSubsystemConfig { + if in == nil { + return nil + } + out := new(NodeExporterCollectorNVMExpressSubsystemConfig) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *NodeExporterCollectorNetClassCollectConfig) DeepCopyInto(out *NodeExporterCollectorNetClassCollectConfig) { *out = *in diff --git a/vendor/github.com/openshift/api/config/v1alpha1/zz_generated.model_name.go b/vendor/github.com/openshift/api/config/v1alpha1/zz_generated.model_name.go index 56960781c5ae..8159016737cd 100644 --- a/vendor/github.com/openshift/api/config/v1alpha1/zz_generated.model_name.go +++ b/vendor/github.com/openshift/api/config/v1alpha1/zz_generated.model_name.go @@ -240,6 +240,16 @@ func (in NodeExporterCollectorEthtoolConfig) OpenAPIModelName() string { return "com.github.openshift.api.config.v1alpha1.NodeExporterCollectorEthtoolConfig" } +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in NodeExporterCollectorInterruptsCollectConfig) OpenAPIModelName() string { + return "com.github.openshift.api.config.v1alpha1.NodeExporterCollectorInterruptsCollectConfig" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in NodeExporterCollectorInterruptsConfig) OpenAPIModelName() string { + return "com.github.openshift.api.config.v1alpha1.NodeExporterCollectorInterruptsConfig" +} + // OpenAPIModelName returns the OpenAPI model name for this type. func (in NodeExporterCollectorKSMDConfig) OpenAPIModelName() string { return "com.github.openshift.api.config.v1alpha1.NodeExporterCollectorKSMDConfig" @@ -250,6 +260,11 @@ func (in NodeExporterCollectorMountStatsConfig) OpenAPIModelName() string { return "com.github.openshift.api.config.v1alpha1.NodeExporterCollectorMountStatsConfig" } +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in NodeExporterCollectorNVMExpressSubsystemConfig) OpenAPIModelName() string { + return "com.github.openshift.api.config.v1alpha1.NodeExporterCollectorNVMExpressSubsystemConfig" +} + // OpenAPIModelName returns the OpenAPI model name for this type. func (in NodeExporterCollectorNetClassCollectConfig) OpenAPIModelName() string { return "com.github.openshift.api.config.v1alpha1.NodeExporterCollectorNetClassCollectConfig" diff --git a/vendor/github.com/openshift/api/config/v1alpha1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/config/v1alpha1/zz_generated.swagger_doc_generated.go index 3aa0ebaf1f8e..99d9b5a66f44 100644 --- a/vendor/github.com/openshift/api/config/v1alpha1/zz_generated.swagger_doc_generated.go +++ b/vendor/github.com/openshift/api/config/v1alpha1/zz_generated.swagger_doc_generated.go @@ -358,6 +358,8 @@ var map_NodeExporterCollectorConfig = map[string]string{ "softirqs": "softirqs configures the softirqs collector, which exposes detailed softirq statistics from /proc/softirqs. softirqs is optional. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is disabled. Enable when you need visibility into kernel softirq processing across CPUs.", "deviceMapperMultipath": "deviceMapperMultipath configures the dmmultipath collector, which collects statistics about DM-Multipath devices. deviceMapperMultipath is optional. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is enabled.", "zoneinfo": "zoneinfo configures the zoneinfo collector, which exposes per-zone memory page counts, watermarks, and protection thresholds from /proc/zoneinfo. zoneinfo is optional. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is to not collect zoneinfo metrics. Enable when you need visibility into kernel memory zone allocation and pressure.", + "nvmExpressSubsystem": "nvmExpressSubsystem configures the nvmesubsystem collector, which collects statistics about NVM Express (NVMe) subsystem devices. nvmExpressSubsystem is optional. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is enabled.", + "interrupts": "interrupts configures the interrupts collector, which exposes interrupt counts from /proc/interrupts. interrupts is optional. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is disabled. The interrupts collector can produce a large number of metrics depending on the hardware and interrupt sources present. When enabled, the collect field with at least one include pattern is required to explicitly select which interrupt lines are collected.", } func (NodeExporterCollectorConfig) SwaggerDoc() map[string]string { @@ -391,6 +393,25 @@ func (NodeExporterCollectorEthtoolConfig) SwaggerDoc() map[string]string { return map_NodeExporterCollectorEthtoolConfig } +var map_NodeExporterCollectorInterruptsCollectConfig = map[string]string{ + "": "NodeExporterCollectorInterruptsCollectConfig holds configuration options for the interrupts collector when it is actively collecting metrics. At least one field must be specified.", + "include": "include is a list of regular expression patterns that select which interrupt lines to collect. This field is required. Each line in /proc/interrupts is matched against the same string node-exporter uses: the IRQ name, info, and devices fields joined with \";\", for example \"LOC;77;IO-APIC 2-edge ...\". Patterns are combined with OR into a single expression anchored on both ends, so each pattern must match the entire string (use \".*\" where needed). Each entry must be at least 1 character, at most 1024 characters, and only contain printable ASCII characters. Maximum length for this list is 50. Minimum length for this list is 1. Entries in this list must be unique.", +} + +func (NodeExporterCollectorInterruptsCollectConfig) SwaggerDoc() map[string]string { + return map_NodeExporterCollectorInterruptsCollectConfig +} + +var map_NodeExporterCollectorInterruptsConfig = map[string]string{ + "": "NodeExporterCollectorInterruptsConfig provides configuration for the interrupts collector of the node-exporter agent. The interrupts collector exposes interrupt counts from /proc/interrupts. It is disabled by default. The interrupts collector can produce a large number of metrics depending on the hardware and interrupt sources present. When enabled, the collect field with at least one include pattern is required to explicitly select which interrupt lines are collected. When collectionPolicy is Collect, the collect field must be set with at least one include pattern. When collectionPolicy is DoNotCollect, the collect field must not be set.", + "collectionPolicy": "collectionPolicy declares whether the interrupts collector collects metrics. This field is required. Valid values are \"Collect\" and \"DoNotCollect\". When set to \"Collect\", the interrupts collector is active and the collect field must be set with at least one include pattern to select which interrupt lines are collected. When set to \"DoNotCollect\", the interrupts collector is inactive and the collect field must not be set.", + "collect": "collect contains configuration options that apply only when the interrupts collector is actively collecting metrics (i.e. when collectionPolicy is Collect). collect is required when collectionPolicy is Collect and must contain at least one include pattern to explicitly select which interrupt lines are collected. collect must not be set when collectionPolicy is DoNotCollect. When set, at least one field must be specified within collect.", +} + +func (NodeExporterCollectorInterruptsConfig) SwaggerDoc() map[string]string { + return map_NodeExporterCollectorInterruptsConfig +} + var map_NodeExporterCollectorKSMDConfig = map[string]string{ "": "NodeExporterCollectorKSMDConfig provides configuration for the ksmd collector of the node-exporter agent. The ksmd collector collects statistics from the kernel same-page merger daemon. It is disabled by default.", "collectionPolicy": "collectionPolicy declares whether the ksmd collector collects metrics. This field is required. Valid values are \"Collect\" and \"DoNotCollect\". When set to \"Collect\", the ksmd collector is active and kernel same-page merger statistics are collected. When set to \"DoNotCollect\", the ksmd collector is inactive.", @@ -409,6 +430,15 @@ func (NodeExporterCollectorMountStatsConfig) SwaggerDoc() map[string]string { return map_NodeExporterCollectorMountStatsConfig } +var map_NodeExporterCollectorNVMExpressSubsystemConfig = map[string]string{ + "": "NodeExporterCollectorNVMExpressSubsystemConfig provides configuration for the nvmesubsystem collector of the node-exporter agent. The nvmesubsystem collector collects statistics about NVM Express (NVMe) subsystem devices. It is enabled by default.", + "collectionPolicy": "collectionPolicy declares whether the nvmesubsystem collector collects metrics. This field is required. Valid values are \"Collect\" and \"DoNotCollect\". When set to \"Collect\", the nvmesubsystem collector is active and NVMe subsystem statistics are collected. When set to \"DoNotCollect\", the nvmesubsystem collector is inactive and the corresponding metrics become unavailable.", +} + +func (NodeExporterCollectorNVMExpressSubsystemConfig) SwaggerDoc() map[string]string { + return map_NodeExporterCollectorNVMExpressSubsystemConfig +} + var map_NodeExporterCollectorNetClassCollectConfig = map[string]string{ "": "NodeExporterCollectorNetClassCollectConfig holds configuration options for the netclass collector when it is actively collecting metrics. At least one field must be specified.", "statsGatherer": "statsGatherer selects which implementation the netclass collector uses to gather statistics (sysfs or netlink). statsGatherer is optional. Valid values are \"Sysfs\" and \"Netlink\". When set to \"Netlink\", the netlink implementation is used; when set to \"Sysfs\", the sysfs implementation is used. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is Netlink.", diff --git a/vendor/github.com/openshift/api/features.md b/vendor/github.com/openshift/api/features.md index cb391bda91b9..5740fc034fb9 100644 --- a/vendor/github.com/openshift/api/features.md +++ b/vendor/github.com/openshift/api/features.md @@ -19,7 +19,6 @@ | ClusterUpdatePreflight| | | Enabled | Enabled | | | | | | ConfidentialCluster| | | Enabled | Enabled | | | | | | Example2| | | Enabled | Enabled | | | | | -| GCPSovereignCloudInstall| | | Enabled | Enabled | | | | | | MachineAPIMigrationVSphere| | | Enabled | Enabled | | | | | | NetworkConnect| | | Enabled | Enabled | | | | | | NewOLMBoxCutterRuntime| | | | Enabled | | | | Enabled | @@ -30,7 +29,6 @@ | AWSClusterHostedDNS| | | Enabled | Enabled | | | Enabled | Enabled | | AWSDedicatedHosts| | | Enabled | Enabled | | | Enabled | Enabled | | AWSEuropeanSovereignCloudInstall| | | Enabled | Enabled | | | Enabled | Enabled | -| AdditionalStorageConfig| | | Enabled | Enabled | | | Enabled | Enabled | | AutomatedEtcdBackup| | | Enabled | Enabled | | | Enabled | Enabled | | AzureDedicatedHosts| | | Enabled | Enabled | | | Enabled | Enabled | | AzureDualStackInstall| | | Enabled | Enabled | | | Enabled | Enabled | @@ -55,18 +53,18 @@ | ConfigurablePKI| | | Enabled | Enabled | | | Enabled | Enabled | | DNSNameResolver| | | Enabled | Enabled | | | Enabled | Enabled | | DyanmicServiceEndpointIBMCloud| | | Enabled | Enabled | | | Enabled | Enabled | -| EtcdBackendQuota| | | Enabled | Enabled | | | Enabled | Enabled | | Example| | | Enabled | Enabled | | | Enabled | Enabled | | ExternalOIDCExternalClaimsSourcing| | | Enabled | Enabled | | | Enabled | Enabled | -| ExternalOIDCWithUpstreamParity| | | Enabled | Enabled | | | Enabled | Enabled | | ExternalSnapshotMetadata| | | Enabled | Enabled | | | Enabled | Enabled | | GCPCustomAPIEndpoints| | | Enabled | Enabled | | | Enabled | Enabled | | GCPCustomAPIEndpointsInstall| | | Enabled | Enabled | | | Enabled | Enabled | | GCPDualStackInstall| | | Enabled | Enabled | | | Enabled | Enabled | +| GCPSovereignCloudInstall| | | Enabled | Enabled | | | Enabled | Enabled | +| GatewayAPIManagementMode| | | Enabled | Enabled | | | Enabled | Enabled | +| GomaxprocsInjection| | | Enabled | Enabled | | | Enabled | Enabled | | HyperShiftOnlyDynamicResourceAllocation| Enabled | | Enabled | | Enabled | | Enabled | | | ImageModeStatusReporting| | | Enabled | Enabled | | | Enabled | Enabled | | IngressComponentRouteLabels| | | Enabled | Enabled | | | Enabled | Enabled | -| IrreconcilableMachineConfig| | | Enabled | Enabled | | | Enabled | Enabled | | KMSEncryption| | | Enabled | Enabled | | | Enabled | Enabled | | MachineAPIMigration| | | Enabled | Enabled | | | Enabled | Enabled | | MachineAPIMigrationAWS| | | Enabled | Enabled | | | Enabled | Enabled | @@ -85,37 +83,39 @@ | OVNObservability| | | Enabled | Enabled | | | Enabled | Enabled | | OnPremDNSRecords| | | Enabled | Enabled | | | Enabled | Enabled | | SELinuxMount| | | Enabled | Enabled | | | Enabled | Enabled | -| SELinuxMountGAReadiness| | | Enabled | Enabled | | | Enabled | Enabled | | SignatureStores| | | Enabled | Enabled | | | Enabled | Enabled | | TLSAdherence| | | Enabled | Enabled | | | Enabled | Enabled | | TLSGroupPreferences| | | Enabled | Enabled | | | Enabled | Enabled | | VSphereConfigurableMaxAllowedBlockVolumesPerNode| | | Enabled | Enabled | | | Enabled | Enabled | | VSphereMultiVCenterDay2| | | Enabled | Enabled | | | Enabled | Enabled | -| VolumeGroupSnapshot| | | Enabled | Enabled | | | Enabled | Enabled | -| OSStreams| | Enabled | Enabled | Enabled | | Enabled | Enabled | Enabled | | AWSClusterHostedDNSInstall| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | | AWSDualStackInstall| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | -| AWSServiceLBNetworkSecurityGroup| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | +| AdditionalStorageConfig| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | | AzureWorkloadIdentity| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | | BootImageSkewEnforcement| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | | BuildCSIVolumes| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | | DualReplica| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | | EVPN| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | +| EtcdBackendQuota| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | | EventTTL| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | | ExternalOIDC| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | | ExternalOIDCWithUIDAndExtraClaimMappings| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | +| ExternalOIDCWithUpstreamParity| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | | GatewayAPIWithoutOLM| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | | ImageStreamImportMode| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | | IngressControllerDynamicConfigurationManager| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | | IngressControllerMultipleHAProxyVersions| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | | InsightsConfig| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | | InsightsOnDemandDataGather| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | +| IrreconcilableMachineConfig| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | | KMSv1| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | | ManagedBootImagesCPMS| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | | MetricsCollectionProfiles| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | | MutableCSINodeAllocatableCount| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | | MutatingAdmissionPolicy| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | +| OSStreams| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | | OpenShiftPodSecurityAdmission| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | +| SELinuxMountGAReadiness| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | | ServiceAccountTokenNodeBinding| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | | SigstoreImageVerification| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | | SigstoreImageVerificationPKI| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | @@ -125,3 +125,4 @@ | VSphereMixedNodeEnv| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | | VSphereMultiDisk| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | | VSphereMultiNetworks| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | +| VolumeGroupSnapshot| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | diff --git a/vendor/github.com/openshift/api/machineconfiguration/v1/types.go b/vendor/github.com/openshift/api/machineconfiguration/v1/types.go index 5c4f6804eea7..7720ef3e3ba6 100644 --- a/vendor/github.com/openshift/api/machineconfiguration/v1/types.go +++ b/vendor/github.com/openshift/api/machineconfiguration/v1/types.go @@ -781,6 +781,21 @@ type KubeletConfigSpec struct { // When specified, the type field can be set to either "Old", "Intermediate", "Modern", "Custom" or omitted for backward compatibility. // +optional TLSSecurityProfile *configv1.TLSSecurityProfile `json:"tlsSecurityProfile,omitempty"` + + // systemGomaxprocsBehavior controls whether the kubelet-auto-node-size service automatically configures + // GOMAXPROCS for kubelet and CRI-O system services based on the system reserved CPU allocation. + // Valid values are "Autosize" and "Disabled". + // When set to "Autosize", the GOMAXPROCS environment variable for kubelet and CRI-O is set to + // max(ceil(system_reserved_cpu), 1). This optimizes the runtime parallelism of these Go-based system + // services based on their CPU allocation rather than total node capacity. + // When set to "Disabled", automatic GOMAXPROCS configuration is disabled and the system services + // use Go's default GOMAXPROCS behavior. + // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. + // The current default is "Disabled". + // + // +openshift:enable:FeatureGate=GomaxprocsInjection + // +optional + SystemGomaxprocsBehavior GomaxprocsBehaviorType `json:"systemGomaxprocsBehavior,omitempty"` } // KubeletConfigStatus defines the observed state of a KubeletConfig @@ -975,6 +990,26 @@ type ContainerRuntimeConfiguration struct { // +kubebuilder:validation:MaxItems=10 // +kubebuilder:validation:XValidation:rule="self.all(x, self.exists_one(y, x.path == y.path))",message="additionalArtifactStores must not contain duplicate paths" AdditionalArtifactStores []AdditionalArtifactStore `json:"additionalArtifactStores,omitempty"` + + // containerGomaxprocsBehavior controls whether CRI-O automatically injects the GOMAXPROCS environment variable into containers + // based on their CPU resource requests. + // Valid values are "Autosize" and "Disabled". + // When set to "Autosize", CRI-O will automatically set GOMAXPROCS proportional to the container's CPU request, + // calculated as max(ceil(cpu_request_in_cores * 2), 1). This helps Go applications optimize their runtime parallelism + // based on the allocated CPU resources rather than the total node capacity. + // When set to "Disabled", GOMAXPROCS injection is disabled and containers will use Go's default GOMAXPROCS behavior. + // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. + // The current default is "Disabled". + // + // Containers can override the injected GOMAXPROCS value by: + // - Setting GOMAXPROCS in the container image Dockerfile (ENV GOMAXPROCS=...) + // - Setting GOMAXPROCS in the pod spec (env or envFrom) + // - Calling runtime.GOMAXPROCS() programmatically in Go code + // - Adding the skip-gomaxprocs.crio.io annotation to the pod + // + // +openshift:enable:FeatureGate=GomaxprocsInjection + // +optional + ContainerGomaxprocsBehavior GomaxprocsBehaviorType `json:"containerGomaxprocsBehavior,omitempty"` } type ContainerRuntimeDefaultRuntime string @@ -987,6 +1022,17 @@ const ( ContainerRuntimeDefaultRuntimeDefault = ContainerRuntimeDefaultRuntimeCrun ) +// GomaxprocsBehaviorType specifies the GOMAXPROCS auto-sizing behavior +// +kubebuilder:validation:Enum=Autosize;Disabled +type GomaxprocsBehaviorType string + +const ( + // GomaxprocsBehaviorAutosize enables automatic GOMAXPROCS configuration + GomaxprocsBehaviorAutosize GomaxprocsBehaviorType = "Autosize" + // GomaxprocsBehaviorDisabled disables automatic GOMAXPROCS configuration + GomaxprocsBehaviorDisabled GomaxprocsBehaviorType = "Disabled" +) + // StorePath is an absolute filesystem path used by additional container storage configurations. // The path must be between 1 and 256 characters long, begin with a forward slash, and only contain // the characters a-z, A-Z, 0-9, '/', '.', '_', and '-'. Consecutive forward slashes are not permitted. diff --git a/vendor/github.com/openshift/api/machineconfiguration/v1/zz_generated.featuregated-crd-manifests.yaml b/vendor/github.com/openshift/api/machineconfiguration/v1/zz_generated.featuregated-crd-manifests.yaml index 7e977bb53b91..de128886a35b 100644 --- a/vendor/github.com/openshift/api/machineconfiguration/v1/zz_generated.featuregated-crd-manifests.yaml +++ b/vendor/github.com/openshift/api/machineconfiguration/v1/zz_generated.featuregated-crd-manifests.yaml @@ -6,6 +6,7 @@ containerruntimeconfigs.machineconfiguration.openshift.io: Category: "" FeatureGates: - AdditionalStorageConfig + - GomaxprocsInjection FilenameOperatorName: machine-config FilenameOperatorOrdering: "01" FilenameRunLevel: "0000_80" @@ -89,6 +90,7 @@ kubeletconfigs.machineconfiguration.openshift.io: Capability: "" Category: "" FeatureGates: + - GomaxprocsInjection - TLSGroupPreferences FilenameOperatorName: machine-config FilenameOperatorOrdering: "01" diff --git a/vendor/github.com/openshift/api/machineconfiguration/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/machineconfiguration/v1/zz_generated.swagger_doc_generated.go index 198c2b9a6deb..2e76f9a83a41 100644 --- a/vendor/github.com/openshift/api/machineconfiguration/v1/zz_generated.swagger_doc_generated.go +++ b/vendor/github.com/openshift/api/machineconfiguration/v1/zz_generated.swagger_doc_generated.go @@ -101,15 +101,16 @@ func (ContainerRuntimeConfigStatus) SwaggerDoc() map[string]string { } var map_ContainerRuntimeConfiguration = map[string]string{ - "": "ContainerRuntimeConfiguration defines the tuneables of the container runtime", - "pidsLimit": "pidsLimit specifies the maximum number of processes allowed in a container", - "logLevel": "logLevel specifies the verbosity of the logs based on the level it is set to. Options are fatal, panic, error, warn, info, and debug.", - "logSizeMax": "logSizeMax specifies the Maximum size allowed for the container log file. Negative numbers indicate that no size limit is imposed. If it is positive, it must be >= 8192 to match/exceed conmon's read buffer.", - "overlaySize": "overlaySize specifies the maximum size of a container image. This flag can be used to set quota on the size of container images. (default: 10GB)", - "defaultRuntime": "defaultRuntime is the name of the OCI runtime to be used as the default for containers. Allowed values are `runc` and `crun`. When set to `runc`, OpenShift will use runc to execute the container When set to `crun`, OpenShift will use crun to execute the container When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. Currently, the default is `crun`.", - "additionalLayerStores": "additionalLayerStores configures additional read-only container image layer store locations for Open Container Initiative (OCI) images.\n\nLayers are checked in order: additional stores first, then the default location. Stores are read-only. Maximum of 5 stores allowed. Each path must be unique.\n\nWhen omitted, only the default layer location is used. When specified, at least one store must be provided.", - "additionalImageStores": "additionalImageStores configures additional read-only container image store locations for Open Container Initiative (OCI) images.\n\nImages are checked in order: additional stores first, then the default location. Stores are read-only. Maximum of 10 stores allowed. Each path must be unique.\n\nWhen omitted, only the default image location is used. When specified, at least one store must be provided.", - "additionalArtifactStores": "additionalArtifactStores configures additional read-only artifact storage locations for Open Container Initiative (OCI) artifacts.\n\nArtifacts are checked in order: additional stores first, then the default location (/var/lib/containers/storage/artifacts). Stores are read-only. Maximum of 10 stores allowed. Each path must be unique.\n\nWhen omitted, only the default artifact location is used. When specified, at least one store must be provided.", + "": "ContainerRuntimeConfiguration defines the tuneables of the container runtime", + "pidsLimit": "pidsLimit specifies the maximum number of processes allowed in a container", + "logLevel": "logLevel specifies the verbosity of the logs based on the level it is set to. Options are fatal, panic, error, warn, info, and debug.", + "logSizeMax": "logSizeMax specifies the Maximum size allowed for the container log file. Negative numbers indicate that no size limit is imposed. If it is positive, it must be >= 8192 to match/exceed conmon's read buffer.", + "overlaySize": "overlaySize specifies the maximum size of a container image. This flag can be used to set quota on the size of container images. (default: 10GB)", + "defaultRuntime": "defaultRuntime is the name of the OCI runtime to be used as the default for containers. Allowed values are `runc` and `crun`. When set to `runc`, OpenShift will use runc to execute the container When set to `crun`, OpenShift will use crun to execute the container When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. Currently, the default is `crun`.", + "additionalLayerStores": "additionalLayerStores configures additional read-only container image layer store locations for Open Container Initiative (OCI) images.\n\nLayers are checked in order: additional stores first, then the default location. Stores are read-only. Maximum of 5 stores allowed. Each path must be unique.\n\nWhen omitted, only the default layer location is used. When specified, at least one store must be provided.", + "additionalImageStores": "additionalImageStores configures additional read-only container image store locations for Open Container Initiative (OCI) images.\n\nImages are checked in order: additional stores first, then the default location. Stores are read-only. Maximum of 10 stores allowed. Each path must be unique.\n\nWhen omitted, only the default image location is used. When specified, at least one store must be provided.", + "additionalArtifactStores": "additionalArtifactStores configures additional read-only artifact storage locations for Open Container Initiative (OCI) artifacts.\n\nArtifacts are checked in order: additional stores first, then the default location (/var/lib/containers/storage/artifacts). Stores are read-only. Maximum of 10 stores allowed. Each path must be unique.\n\nWhen omitted, only the default artifact location is used. When specified, at least one store must be provided.", + "containerGomaxprocsBehavior": "containerGomaxprocsBehavior controls whether CRI-O automatically injects the GOMAXPROCS environment variable into containers based on their CPU resource requests. Valid values are \"Autosize\" and \"Disabled\". When set to \"Autosize\", CRI-O will automatically set GOMAXPROCS proportional to the container's CPU request, calculated as max(ceil(cpu_request_in_cores * 2), 1). This helps Go applications optimize their runtime parallelism based on the allocated CPU resources rather than the total node capacity. When set to \"Disabled\", GOMAXPROCS injection is disabled and containers will use Go's default GOMAXPROCS behavior. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is \"Disabled\".\n\nContainers can override the injected GOMAXPROCS value by: - Setting GOMAXPROCS in the container image Dockerfile (ENV GOMAXPROCS=...) - Setting GOMAXPROCS in the pod spec (env or envFrom) - Calling runtime.GOMAXPROCS() programmatically in Go code - Adding the skip-gomaxprocs.crio.io annotation to the pod", } func (ContainerRuntimeConfiguration) SwaggerDoc() map[string]string { @@ -251,6 +252,7 @@ var map_KubeletConfigSpec = map[string]string{ "machineConfigPoolSelector": "machineConfigPoolSelector selects which pools the KubeletConfig should apply to. When omitted or set to an empty selector {}, no pools are selected, which is equivalent to not matching any MachineConfigPool.", "kubeletConfig": "kubeletConfig contains upstream Kubernetes kubelet configuration fields. Values are validated by the kubelet itself. Invalid values may render nodes unusable. Refer to OpenShift documentation for the Kubernetes version corresponding to your OpenShift release to find valid kubelet configuration options.", "tlsSecurityProfile": "tlsSecurityProfile configures TLS settings for the kubelet. When omitted, the TLS configuration defaults to the value from apiservers.config.openshift.io/cluster. When specified, the type field can be set to either \"Old\", \"Intermediate\", \"Modern\", \"Custom\" or omitted for backward compatibility.", + "systemGomaxprocsBehavior": "systemGomaxprocsBehavior controls whether the kubelet-auto-node-size service automatically configures GOMAXPROCS for kubelet and CRI-O system services based on the system reserved CPU allocation. Valid values are \"Autosize\" and \"Disabled\". When set to \"Autosize\", the GOMAXPROCS environment variable for kubelet and CRI-O is set to max(ceil(system_reserved_cpu), 1). This optimizes the runtime parallelism of these Go-based system services based on their CPU allocation rather than total node capacity. When set to \"Disabled\", automatic GOMAXPROCS configuration is disabled and the system services use Go's default GOMAXPROCS behavior. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is \"Disabled\".", } func (KubeletConfigSpec) SwaggerDoc() map[string]string { diff --git a/vendor/github.com/openshift/api/operator/v1alpha1/register.go b/vendor/github.com/openshift/api/operator/v1alpha1/register.go index ec19cba3a94d..099f1f7557db 100644 --- a/vendor/github.com/openshift/api/operator/v1alpha1/register.go +++ b/vendor/github.com/openshift/api/operator/v1alpha1/register.go @@ -43,6 +43,8 @@ func addKnownTypes(scheme *runtime.Scheme) error { &ClusterVersionOperatorList{}, &ClusterAPI{}, &ClusterAPIList{}, + &Ingress{}, + &IngressList{}, ) return nil diff --git a/vendor/github.com/openshift/api/operator/v1alpha1/types_ingress.go b/vendor/github.com/openshift/api/operator/v1alpha1/types_ingress.go new file mode 100644 index 000000000000..0dbf9ead8bfa --- /dev/null +++ b/vendor/github.com/openshift/api/operator/v1alpha1/types_ingress.go @@ -0,0 +1,146 @@ +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// Ingress contains configuration options specific to the Ingress Operator itself, +// including how it manages Gateway API integration. +// +// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. +// +openshift:compatibility-gen:level=4 +// +openshift:file-pattern=cvoRunLevel=0000_50,operatorName=ingress,operatorOrdering=02 +// +kubebuilder:object:root=true +// +kubebuilder:resource:path=ingresses,scope=Cluster +// +kubebuilder:subresource:status +// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/2890 +// +openshift:capability=Ingress +// +openshift:enable:FeatureGate=GatewayAPIManagementMode +// +kubebuilder:validation:XValidation:rule="self.metadata.name == 'cluster'",message="Ingress is a singleton; the .metadata.name field must be 'cluster'" +type Ingress struct { + metav1.TypeMeta `json:",inline"` + + // metadata is the standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +required + metav1.ObjectMeta `json:"metadata"` + + // spec holds user settable values for configuration. + // +required + Spec IngressSpec `json:"spec,omitzero"` + + // status holds observed values from the cluster. + // +optional + Status IngressStatus `json:"status,omitzero"` +} + +// IngressSpec is the specification of the desired behavior of the Ingress Operator. +// +kubebuilder:validation:MinProperties=1 +type IngressSpec struct { + // gatewayAPI holds configuration for Gateway API integration, including how the + // ingress operator manages Gateway API CRDs, the OpenShift Gateway API + // implementation, and its Gateway API controllers. + // + // +optional + GatewayAPI GatewayAPIIngressConfig `json:"gatewayAPI,omitzero"` +} + +// IngressStatus defines the observed status of the Ingress Operator. +// +kubebuilder:validation:MinProperties=1 +// +kubebuilder:validation:XValidation:rule="!has(oldSelf.observedGeneration) || (has(self.observedGeneration) && self.observedGeneration >= oldSelf.observedGeneration)",message="observedGeneration must remain set and only increase once set" +type IngressStatus struct { + // conditions is a list of conditions and their status. + // + // Gateway API CRD management conditions are reported here with the "GatewayAPI" prefix: + // + // * "GatewayAPICRDsManaged" indicates whether the ingress operator is actively + // managing Gateway API CRDs. + // * "GatewayAPICRDsPresent" indicates whether Gateway API CRDs exist on the + // cluster. + // * "GatewayAPICRDsCompliant" indicates whether the installed CRDs match the + // version expected by this ingress operator release. + // + // +listType=map + // +listMapKey=type + // +kubebuilder:validation:MinItems=1 + // +kubebuilder:validation:MaxItems=32 + // +optional + Conditions []metav1.Condition `json:"conditions,omitempty"` + + // observedGeneration represents the most recent generation observed by the operator and specifies the version of + // the spec field currently being synced. + // + // When omitted, the operator has not yet observed the resource. + // +optional + // +kubebuilder:validation:Minimum=1 + ObservedGeneration int64 `json:"observedGeneration,omitempty"` +} + +// GatewayAPIIngressConfig holds configuration for Gateway API integration in the +// Cluster Ingress Operator. +// +kubebuilder:validation:MinProperties=1 +type GatewayAPIIngressConfig struct { + // managementMode specifies how the Cluster Ingress Operator manages Gateway API + // Custom Resource Definitions (CRDs), the OpenShift Gateway API implementation, + // and its Gateway API controllers. + // + // Allowed values are "Managed" and "Unmanaged". + // + // When omitted or set to "Managed", the ingress operator installs, owns, and + // upgrades the Gateway API CRDs, protects them with a Validating Admission + // Policy, and deploys the OpenShift Gateway API implementation and its Gateway + // API controllers. + // + // When set to "Unmanaged", the ingress operator does not install or manage + // Gateway API CRDs and does not deploy the OpenShift Gateway API implementation + // or its Gateway API controllers. The cluster administrator or a third-party + // product is responsible for providing their own CRDs and Gateway controller. + // The ingress operator reports observational status only. + // + // +optional + ManagementMode GatewayAPIManagementMode `json:"managementMode,omitempty"` +} + +// GatewayAPIManagementMode describes how the Cluster Ingress Operator manages +// Gateway API Custom Resource Definitions. +// +kubebuilder:validation:Enum=Managed;Unmanaged +type GatewayAPIManagementMode string + +const ( + // GatewayAPIManagementModeManaged means the ingress operator installs, owns, + // protects (via a Validating Admission Policy), and upgrades the Gateway API + // CRDs, deploys the OpenShift Gateway API implementation, and runs its Gateway + // API controllers. This is the default mode and the only fully supported + // configuration. + GatewayAPIManagementModeManaged GatewayAPIManagementMode = "Managed" + + // GatewayAPIManagementModeUnmanaged means the ingress operator does not + // install or manage Gateway API CRDs, does not deploy the OpenShift Gateway + // API implementation, and does not run its Gateway API controllers. The + // cluster administrator or a third-party product is responsible for bringing + // their own CRDs and Gateway controller. The ingress operator reports + // observational status only. + GatewayAPIManagementModeUnmanaged GatewayAPIManagementMode = "Unmanaged" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// IngressList is a collection of Ingresses. +// +// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. +// +openshift:compatibility-gen:level=4 +type IngressList struct { + metav1.TypeMeta `json:",inline"` + + // metadata is the standard list's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + metav1.ListMeta `json:"metadata"` + + // items is a list of Ingresses. + // +optional + Items []Ingress `json:"items,omitempty"` +} diff --git a/vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.deepcopy.go index 3c3dc8e7a538..4d864f167e5c 100644 --- a/vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.deepcopy.go +++ b/vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.deepcopy.go @@ -469,6 +469,22 @@ func (in *EtcdBackupStatus) DeepCopy() *EtcdBackupStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GatewayAPIIngressConfig) DeepCopyInto(out *GatewayAPIIngressConfig) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GatewayAPIIngressConfig. +func (in *GatewayAPIIngressConfig) DeepCopy() *GatewayAPIIngressConfig { + if in == nil { + return nil + } + out := new(GatewayAPIIngressConfig) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *GenerationHistory) DeepCopyInto(out *GenerationHistory) { *out = *in @@ -597,6 +613,107 @@ func (in *ImageContentSourcePolicySpec) DeepCopy() *ImageContentSourcePolicySpec return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Ingress) DeepCopyInto(out *Ingress) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Ingress. +func (in *Ingress) DeepCopy() *Ingress { + if in == nil { + return nil + } + out := new(Ingress) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Ingress) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IngressList) DeepCopyInto(out *IngressList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Ingress, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressList. +func (in *IngressList) DeepCopy() *IngressList { + if in == nil { + return nil + } + out := new(IngressList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *IngressList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IngressSpec) DeepCopyInto(out *IngressSpec) { + *out = *in + out.GatewayAPI = in.GatewayAPI + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressSpec. +func (in *IngressSpec) DeepCopy() *IngressSpec { + if in == nil { + return nil + } + out := new(IngressSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IngressStatus) DeepCopyInto(out *IngressStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]v1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressStatus. +func (in *IngressStatus) DeepCopy() *IngressStatus { + if in == nil { + return nil + } + out := new(IngressStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *LoggingConfig) DeepCopyInto(out *LoggingConfig) { *out = *in diff --git a/vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.featuregated-crd-manifests.yaml b/vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.featuregated-crd-manifests.yaml index 3ad442d9d848..bb0d1025d499 100644 --- a/vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.featuregated-crd-manifests.yaml +++ b/vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.featuregated-crd-manifests.yaml @@ -90,6 +90,29 @@ imagecontentsourcepolicies.operator.openshift.io: TopLevelFeatureGates: [] Version: v1alpha1 +ingresses.operator.openshift.io: + Annotations: {} + ApprovedPRNumber: https://github.com/openshift/api/pull/2890 + CRDName: ingresses.operator.openshift.io + Capability: Ingress + Category: "" + FeatureGates: + - GatewayAPIManagementMode + FilenameOperatorName: ingress + FilenameOperatorOrdering: "02" + FilenameRunLevel: "0000_50" + GroupName: operator.openshift.io + HasStatus: true + KindName: Ingress + Labels: {} + PluralName: ingresses + PrinterColumns: [] + Scope: Cluster + ShortNames: null + TopLevelFeatureGates: + - GatewayAPIManagementMode + Version: v1alpha1 + olms.operator.openshift.io: Annotations: include.release.openshift.io/ibm-cloud-managed: "false" diff --git a/vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.model_name.go b/vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.model_name.go index e3fe9897ddca..cd4dbe030a23 100644 --- a/vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.model_name.go +++ b/vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.model_name.go @@ -105,6 +105,11 @@ func (in EtcdBackupStatus) OpenAPIModelName() string { return "com.github.openshift.api.operator.v1alpha1.EtcdBackupStatus" } +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in GatewayAPIIngressConfig) OpenAPIModelName() string { + return "com.github.openshift.api.operator.v1alpha1.GatewayAPIIngressConfig" +} + // OpenAPIModelName returns the OpenAPI model name for this type. func (in GenerationHistory) OpenAPIModelName() string { return "com.github.openshift.api.operator.v1alpha1.GenerationHistory" @@ -130,6 +135,26 @@ func (in ImageContentSourcePolicySpec) OpenAPIModelName() string { return "com.github.openshift.api.operator.v1alpha1.ImageContentSourcePolicySpec" } +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in Ingress) OpenAPIModelName() string { + return "com.github.openshift.api.operator.v1alpha1.Ingress" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in IngressList) OpenAPIModelName() string { + return "com.github.openshift.api.operator.v1alpha1.IngressList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in IngressSpec) OpenAPIModelName() string { + return "com.github.openshift.api.operator.v1alpha1.IngressSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in IngressStatus) OpenAPIModelName() string { + return "com.github.openshift.api.operator.v1alpha1.IngressStatus" +} + // OpenAPIModelName returns the OpenAPI model name for this type. func (in LoggingConfig) OpenAPIModelName() string { return "com.github.openshift.api.operator.v1alpha1.LoggingConfig" diff --git a/vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.swagger_doc_generated.go index bf4117768d19..57a7d19669fb 100644 --- a/vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.swagger_doc_generated.go +++ b/vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.swagger_doc_generated.go @@ -351,6 +351,55 @@ func (RepositoryDigestMirrors) SwaggerDoc() map[string]string { return map_RepositoryDigestMirrors } +var map_GatewayAPIIngressConfig = map[string]string{ + "": "GatewayAPIIngressConfig holds configuration for Gateway API integration in the Cluster Ingress Operator.", + "managementMode": "managementMode specifies how the Cluster Ingress Operator manages Gateway API Custom Resource Definitions (CRDs), the OpenShift Gateway API implementation, and its Gateway API controllers.\n\nAllowed values are \"Managed\" and \"Unmanaged\".\n\nWhen omitted or set to \"Managed\", the ingress operator installs, owns, and upgrades the Gateway API CRDs, protects them with a Validating Admission Policy, and deploys the OpenShift Gateway API implementation and its Gateway API controllers.\n\nWhen set to \"Unmanaged\", the ingress operator does not install or manage Gateway API CRDs and does not deploy the OpenShift Gateway API implementation or its Gateway API controllers. The cluster administrator or a third-party product is responsible for providing their own CRDs and Gateway controller. The ingress operator reports observational status only.", +} + +func (GatewayAPIIngressConfig) SwaggerDoc() map[string]string { + return map_GatewayAPIIngressConfig +} + +var map_Ingress = map[string]string{ + "": "Ingress contains configuration options specific to the Ingress Operator itself, including how it manages Gateway API integration.\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", + "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "spec": "spec holds user settable values for configuration.", + "status": "status holds observed values from the cluster.", +} + +func (Ingress) SwaggerDoc() map[string]string { + return map_Ingress +} + +var map_IngressList = map[string]string{ + "": "IngressList is a collection of Ingresses.\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", + "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "items": "items is a list of Ingresses.", +} + +func (IngressList) SwaggerDoc() map[string]string { + return map_IngressList +} + +var map_IngressSpec = map[string]string{ + "": "IngressSpec is the specification of the desired behavior of the Ingress Operator.", + "gatewayAPI": "gatewayAPI holds configuration for Gateway API integration, including how the ingress operator manages Gateway API CRDs, the OpenShift Gateway API implementation, and its Gateway API controllers.", +} + +func (IngressSpec) SwaggerDoc() map[string]string { + return map_IngressSpec +} + +var map_IngressStatus = map[string]string{ + "": "IngressStatus defines the observed status of the Ingress Operator.", + "conditions": "conditions is a list of conditions and their status.\n\nGateway API CRD management conditions are reported here with the \"GatewayAPI\" prefix:\n\n* \"GatewayAPICRDsManaged\" indicates whether the ingress operator is actively\n managing Gateway API CRDs.\n* \"GatewayAPICRDsPresent\" indicates whether Gateway API CRDs exist on the\n cluster.\n* \"GatewayAPICRDsCompliant\" indicates whether the installed CRDs match the\n version expected by this ingress operator release.", + "observedGeneration": "observedGeneration represents the most recent generation observed by the operator and specifies the version of the spec field currently being synced.\n\nWhen omitted, the operator has not yet observed the resource.", +} + +func (IngressStatus) SwaggerDoc() map[string]string { + return map_IngressStatus +} + var map_OLM = map[string]string{ "": "OLM provides information to configure an operator to manage the OLM controllers\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", diff --git a/vendor/modules.txt b/vendor/modules.txt index 7518f55a3a74..8bbcf7135758 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -997,7 +997,7 @@ github.com/opencontainers/image-spec/specs-go/v1 ## explicit; go 1.19 github.com/opencontainers/selinux/go-selinux github.com/opencontainers/selinux/pkg/pwalkdir -# github.com/openshift/api v0.0.0-20260805160557-b61243060d5f +# github.com/openshift/api v0.0.0-20260820183036-3db6c4b03286 ## explicit; go 1.26.0 github.com/openshift/api github.com/openshift/api/annotations