diff --git a/go.mod b/go.mod index d318180c0046..7d8198a62968 100644 --- a/go.mod +++ b/go.mod @@ -65,10 +65,10 @@ require ( github.com/opencontainers/go-digest v1.0.0 github.com/openshift-eng/openshift-tests-extension v0.0.0-20260707142426-572a3e9deb7a github.com/openshift-kni/commatrix v0.0.5-0.20251111204857-e5a931eff73f - github.com/openshift/api v0.0.0-20260715165912-72066cc9718b + github.com/openshift/api v0.0.0-20260810132456-8f52beb625b5 github.com/openshift/apiserver-library-go v0.0.0-20260715200723-42e5e402ca43 github.com/openshift/build-machinery-go v0.0.0-20250530140348-dc5b2804eeee - github.com/openshift/client-go v0.0.0-20260715172546-dac61734e0ec + github.com/openshift/client-go v0.0.0-20260810202730-ddca5e0b7146 github.com/openshift/library-go v0.0.0-20260716164659-7926d144f96a github.com/ovn-org/ovn-kubernetes/go-controller v0.0.0-20250118001652-a8b9c3c31417 github.com/pborman/uuid v1.2.0 diff --git a/go.sum b/go.sum index 67de7f3922f5..9fed63b1ea8e 100644 --- a/go.sum +++ b/go.sum @@ -893,12 +893,16 @@ github.com/openshift-kni/commatrix v0.0.5-0.20251111204857-e5a931eff73f h1:E72Zo github.com/openshift-kni/commatrix v0.0.5-0.20251111204857-e5a931eff73f/go.mod h1:cDVdp0eda7EHE6tLuSeo4IqPWdAX/KJK+ogBirIGtsI= github.com/openshift/api v0.0.0-20260715165912-72066cc9718b h1:gN3SihCYEwoIksD+f24wHhwiEgvaV0RxNjgmkDvBBeg= github.com/openshift/api v0.0.0-20260715165912-72066cc9718b/go.mod h1:k6qH5QOVa5GDln2VVm8Jz4NV3Z7R2SATHFLwGS6Wh3M= +github.com/openshift/api v0.0.0-20260810132456-8f52beb625b5 h1:/UAIG4kF4dXdamTuN9rL5kSjbQZ9wDES9O2q/wS8Bsk= +github.com/openshift/api v0.0.0-20260810132456-8f52beb625b5/go.mod h1:k6qH5QOVa5GDln2VVm8Jz4NV3Z7R2SATHFLwGS6Wh3M= github.com/openshift/apiserver-library-go v0.0.0-20260715200723-42e5e402ca43 h1:V9hWaBi9cnohNk1F0Ph6wpI0otMWqMHleJ3oj5603Bc= github.com/openshift/apiserver-library-go v0.0.0-20260715200723-42e5e402ca43/go.mod h1:ZuzfEq1ccZpHNx05xEUKlm2TcMHt2iXVutb79kAuTfM= github.com/openshift/build-machinery-go v0.0.0-20250530140348-dc5b2804eeee h1:+Sp5GGnjHDhT/a/nQ1xdp43UscBMr7G5wxsYotyhzJ4= github.com/openshift/build-machinery-go v0.0.0-20250530140348-dc5b2804eeee/go.mod h1:8jcm8UPtg2mCAsxfqKil1xrmRMI3a+XU2TZ9fF8A7TE= github.com/openshift/client-go v0.0.0-20260715172546-dac61734e0ec h1:UDjX+mot5IVLpcChyBqLXG1oSB29s4UkqFmgNb0Xsqc= github.com/openshift/client-go v0.0.0-20260715172546-dac61734e0ec/go.mod h1:iMHec0APKVjOH8GfL/RxddX8DuiuSvPlRe+s7KDqlyA= +github.com/openshift/client-go v0.0.0-20260810202730-ddca5e0b7146 h1:fX/gaOPiS2vrYGSAFSeqqoWjj32H+NbMmB5RDjwhCnU= +github.com/openshift/client-go v0.0.0-20260810202730-ddca5e0b7146/go.mod h1:bhbP5y308NNbImrgArOc9611HIDAMcNWdCCO4tq5ob4= github.com/openshift/kubernetes v1.30.1-0.20260719124805-0f7d1a1b66af h1:jdn7sNKevBHElUk/fgJNiM0QGJmKysgp+CdJWfRMTu4= github.com/openshift/kubernetes v1.30.1-0.20260719124805-0f7d1a1b66af/go.mod h1:bJ5h4TVP09ipVze5drR/0a1DQRP9Bbk+PKEU5/6Hvy4= github.com/openshift/kubernetes/staging/src/k8s.io/api v0.0.0-20260719124805-0f7d1a1b66af h1:twJGGZwzx1L4hiSP1Pdo6JdAWGhXaal0CL0XVaZABCg= diff --git a/test/e2e/upgrade/upgrade.go b/test/e2e/upgrade/upgrade.go index fd408beee0ed..5b5df092a4a0 100644 --- a/test/e2e/upgrade/upgrade.go +++ b/test/e2e/upgrade/upgrade.go @@ -72,6 +72,7 @@ func AllTests() []upgrades.Test { &prometheus.MetricsAvailableAfterUpgradeTest{}, &dns.UpgradeTest{}, &router.GatewayAPIUpgradeTest{}, + &router.GatewayAPIManagementModeUpgradeTest{}, } } diff --git a/test/extended/router/gatewayapi_management_mode.go b/test/extended/router/gatewayapi_management_mode.go new file mode 100644 index 000000000000..e2b37577768d --- /dev/null +++ b/test/extended/router/gatewayapi_management_mode.go @@ -0,0 +1,850 @@ +package router + +import ( + "context" + "fmt" + "strings" + "time" + + "github.com/google/uuid" + g "github.com/onsi/ginkgo/v2" + o "github.com/onsi/gomega" + + operatorv1alpha1 "github.com/openshift/api/operator/v1alpha1" + + "github.com/openshift/origin/pkg/monitortestlibrary/platformidentification" + promclient "github.com/openshift/origin/test/extended/prometheus/client" + exutil "github.com/openshift/origin/test/extended/util" + "github.com/prometheus/common/model" + + apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" + apierrors "k8s.io/apimachinery/pkg/api/errors" + condutils "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/wait" + e2e "k8s.io/kubernetes/test/e2e/framework" + admissionapi "k8s.io/pod-security-admission/api" + gatewayapiv1 "sigs.k8s.io/gateway-api/apis/v1" +) + +const ( + // ingressCRName is the singleton Ingress CR name + ingressCRName = "cluster" + + // bundleVersionAnnotation is the annotation key used for CRD compliance checking + bundleVersionAnnotation = "gateway.networking.k8s.io/bundle-version" + + // gwapiCRDVAPName is the ValidatingAdmissionPolicy protecting Gateway API CRDs + gwapiCRDVAPName = "gateway-api-crds.ingress.openshift.io" + + // Gateway API CRD names that should be installed + gatewayClassCRDName = "gatewayclasses.gateway.networking.k8s.io" + gatewayCRDName = "gateways.gateway.networking.k8s.io" + httpRouteCRDName = "httproutes.gateway.networking.k8s.io" + + // Default timeout for mode transitions (may be adjusted for slow architectures) + defaultModeTransitionTimeout = 3 * time.Minute +) + +var _ = g.Describe("[sig-network-edge][OCPFeatureGate:GatewayAPIManagementMode][Feature:Router][apigroup:operator.openshift.io][Serial]", func() { + defer g.GinkgoRecover() + var ( + oc = exutil.NewCLIWithPodSecurityLevel("gatewayapi-mgmt-mode", admissionapi.LevelBaseline) + loadBalancerSupported bool + managedDNS bool + ) + + g.BeforeEach(func(ctx context.Context) { + // Feature gate check is handled by [OCPFeatureGate:GatewayAPIManagementMode] label + + // Check platform support and skip conditions + skip, reason, err := shouldSkipGatewayAPITests(oc, true) // NoOLM is default/GA + o.Expect(err).NotTo(o.HaveOccurred()) + if skip { + g.Skip(reason) + } + + loadBalancerSupported, managedDNS = getPlatformCapabilities(oc) + }) + + g.It("should have default Managed state with CRDs, VAP, and Istio installed", func(ctx context.Context) { + g.By("Verifying Ingress CR exists with Managed mode") + ingress, err := getIngressCR(ctx, oc) + o.Expect(err).NotTo(o.HaveOccurred(), "Failed to get Ingress CR") + + mode := ingress.Spec.GatewayAPI.ManagementMode + if mode == "" { + mode = operatorv1alpha1.GatewayAPIManagementModeManaged + } + o.Expect(mode).To(o.Equal(operatorv1alpha1.GatewayAPIManagementModeManaged), + "Expected Ingress CR to have Managed mode by default") + + g.By("Verifying Gateway API CRDs are installed with bundle-version annotation") + assertGatewayAPICRDsInstalled(ctx, oc) + + g.By("Verifying ValidatingAdmissionPolicy is installed") + err = assertVAPExists(ctx, oc, gwapiCRDVAPName) + o.Expect(err).NotTo(o.HaveOccurred(), "VAP %s should exist in Managed mode", gwapiCRDVAPName) + + g.By("Verifying Istio control plane is running") + err = checkIstiodRunning(oc, 2*time.Minute) + o.Expect(err).NotTo(o.HaveOccurred(), "Istiod should be running in Managed mode") + + g.By("Verifying Ingress status conditions") + err = checkIngressCondition(ctx, oc, "GatewayAPICRDsManaged", metav1.ConditionTrue, "") + o.Expect(err).NotTo(o.HaveOccurred(), "GatewayAPICRDsManaged should be True") + + err = checkIngressCondition(ctx, oc, "GatewayAPICRDsPresent", metav1.ConditionTrue, "") + o.Expect(err).NotTo(o.HaveOccurred(), "GatewayAPICRDsPresent should be True") + + err = checkIngressCondition(ctx, oc, "GatewayAPICRDsCompliant", metav1.ConditionTrue, "") + o.Expect(err).NotTo(o.HaveOccurred(), "GatewayAPICRDsCompliant should be True") + + e2e.Logf("Successfully verified default Managed state") + }) + + g.It("should transition from Managed to Unmanaged and preserve Gateway resources", func(ctx context.Context) { + // Create Gateway first while in Managed mode + g.By("Creating GatewayClass and Gateway while in Managed mode") + gatewayClass := buildGatewayClass("test-unmanaged-transition", "openshift.io/gateway-controller/v1") + _, err := oc.AdminGatewayApiClient().GatewayV1().GatewayClasses().Create(ctx, gatewayClass, metav1.CreateOptions{}) + o.Expect(err).NotTo(o.HaveOccurred()) + g.DeferCleanup(func(ctx context.Context) { + _ = oc.AdminGatewayApiClient().GatewayV1().GatewayClasses().Delete(ctx, gatewayClass.Name, metav1.DeleteOptions{}) + }) + + err = checkGatewayClassCondition(oc, gatewayClass.Name, string(gatewayapiv1.GatewayClassConditionStatusAccepted), metav1.ConditionTrue) + o.Expect(err).NotTo(o.HaveOccurred()) + + defaultIngressDomain, err := getDefaultIngressClusterDomainName(oc, 1*time.Minute) + o.Expect(err).NotTo(o.HaveOccurred()) + customDomain := strings.Replace(defaultIngressDomain, "apps.", "gw-test-unmanaged.", 1) + + testGatewayName := "test-unmanaged-gateway-" + uuid.New().String()[:8] + _, err = createAndCheckGateway(oc, testGatewayName, gatewayClass.Name, customDomain, loadBalancerSupported) + o.Expect(err).NotTo(o.HaveOccurred()) + g.DeferCleanup(func(ctx context.Context) { + _ = oc.AdminGatewayApiClient().GatewayV1().Gateways(ingressNamespace).Delete(ctx, testGatewayName, metav1.DeleteOptions{}) + _ = waitForGatewayDeploymentDeletion(oc, testGatewayName) + }) + + // Restore Managed mode in cleanup + g.DeferCleanup(func(ctx context.Context) { + e2e.Logf("Cleanup: Restoring Managed mode") + err := setManagementMode(ctx, oc, operatorv1alpha1.GatewayAPIManagementModeManaged) + o.Expect(err).NotTo(o.HaveOccurred()) + err = waitForManagementModeTransition(ctx, oc, operatorv1alpha1.GatewayAPIManagementModeManaged, platformAwareTimeout(oc, defaultModeTransitionTimeout)) + o.Expect(err).NotTo(o.HaveOccurred()) + }) + + g.By("Transitioning to Unmanaged mode") + err = setManagementMode(ctx, oc, operatorv1alpha1.GatewayAPIManagementModeUnmanaged) + o.Expect(err).NotTo(o.HaveOccurred()) + + g.By("Waiting for transition to complete") + err = waitForManagementModeTransition(ctx, oc, operatorv1alpha1.GatewayAPIManagementModeUnmanaged, platformAwareTimeout(oc, defaultModeTransitionTimeout)) + o.Expect(err).NotTo(o.HaveOccurred()) + + g.By("Verifying Managed condition is False with reason Unmanaged") + err = checkIngressCondition(ctx, oc, "GatewayAPICRDsManaged", metav1.ConditionFalse, "Unmanaged") + o.Expect(err).NotTo(o.HaveOccurred()) + + g.By("Verifying VAP is deleted") + err = assertVAPDeleted(ctx, oc, gwapiCRDVAPName) + o.Expect(err).NotTo(o.HaveOccurred(), "VAP should be deleted in Unmanaged mode") + + g.By("Verifying Istio control plane is stopped") + waitForIstiodPodDeletion(oc) + + g.By("Verifying Gateway API CRDs are still present") + assertGatewayAPICRDsInstalled(ctx, oc) + + g.By("Verifying Gateway resource still exists") + _, err = oc.AdminGatewayApiClient().GatewayV1().Gateways(ingressNamespace).Get(ctx, testGatewayName, metav1.GetOptions{}) + o.Expect(err).NotTo(o.HaveOccurred(), "Gateway should still exist in Unmanaged mode") + + g.By("Verifying GatewayClass still exists") + _, err = oc.AdminGatewayApiClient().GatewayV1().GatewayClasses().Get(ctx, gatewayClass.Name, metav1.GetOptions{}) + o.Expect(err).NotTo(o.HaveOccurred(), "GatewayClass should still exist in Unmanaged mode") + + // Verify we can modify a Gateway API CRD without VAP protection + g.By("Verifying CRDs can be modified without VAP protection") + crd, err := oc.AdminApiextensionsClient().ApiextensionsV1().CustomResourceDefinitions().Get(ctx, httpRouteCRDName, metav1.GetOptions{}) + o.Expect(err).NotTo(o.HaveOccurred()) + + originalSpec := crd.Spec.DeepCopy() + + if crd.Annotations == nil { + crd.Annotations = make(map[string]string) + } + crd.Annotations["test.openshift.io/unmanaged"] = "true" + crd, err = oc.AdminApiextensionsClient().ApiextensionsV1().CustomResourceDefinitions().Update(ctx, crd, metav1.UpdateOptions{}) + o.Expect(err).NotTo(o.HaveOccurred(), "Should be able to modify CRD in Unmanaged mode") + + // Verify only annotations changed, not spec + o.Expect(crd.Spec).To(o.Equal(*originalSpec), "CRD Spec should not be modified, only annotations") + + // Clean up the test annotation + delete(crd.Annotations, "test.openshift.io/unmanaged") + _, _ = oc.AdminApiextensionsClient().ApiextensionsV1().CustomResourceDefinitions().Update(ctx, crd, metav1.UpdateOptions{}) + + e2e.Logf("Successfully transitioned to Unmanaged mode and verified Gateway resources preserved") + }) + + g.It("should transition from Unmanaged to Managed and deploy working Gateway with real workload", func(ctx context.Context) { + // Transition to Unmanaged first + g.By("Transitioning to Unmanaged mode") + err := setManagementMode(ctx, oc, operatorv1alpha1.GatewayAPIManagementModeUnmanaged) + o.Expect(err).NotTo(o.HaveOccurred()) + + err = waitForManagementModeTransition(ctx, oc, operatorv1alpha1.GatewayAPIManagementModeUnmanaged, platformAwareTimeout(oc, defaultModeTransitionTimeout)) + o.Expect(err).NotTo(o.HaveOccurred()) + + // Restore Managed mode in cleanup + g.DeferCleanup(func(ctx context.Context) { + e2e.Logf("Cleanup: Ensuring Managed mode for subsequent tests") + err := setManagementMode(ctx, oc, operatorv1alpha1.GatewayAPIManagementModeManaged) + o.Expect(err).NotTo(o.HaveOccurred()) + err = waitForManagementModeTransition(ctx, oc, operatorv1alpha1.GatewayAPIManagementModeManaged, platformAwareTimeout(oc, defaultModeTransitionTimeout)) + o.Expect(err).NotTo(o.HaveOccurred()) + }) + + g.By("Transitioning back to Managed mode") + err = setManagementMode(ctx, oc, operatorv1alpha1.GatewayAPIManagementModeManaged) + o.Expect(err).NotTo(o.HaveOccurred()) + + g.By("Waiting for transition to complete") + err = waitForManagementModeTransition(ctx, oc, operatorv1alpha1.GatewayAPIManagementModeManaged, 5*time.Minute) + o.Expect(err).NotTo(o.HaveOccurred()) + + g.By("Verifying VAP is recreated") + err = assertVAPExists(ctx, oc, gwapiCRDVAPName) + o.Expect(err).NotTo(o.HaveOccurred()) + + g.By("Verifying Istio control plane is restarted") + err = checkIstiodRunning(oc, platformAwareTimeout(oc, defaultModeTransitionTimeout)) + o.Expect(err).NotTo(o.HaveOccurred()) + + g.By("Creating GatewayClass and Gateway in Managed mode") + gatewayClass := buildGatewayClass("test-managed-workload", "openshift.io/gateway-controller/v1") + _, err = oc.AdminGatewayApiClient().GatewayV1().GatewayClasses().Create(ctx, gatewayClass, metav1.CreateOptions{}) + o.Expect(err).NotTo(o.HaveOccurred()) + g.DeferCleanup(func(ctx context.Context) { + _ = oc.AdminGatewayApiClient().GatewayV1().GatewayClasses().Delete(ctx, gatewayClass.Name, metav1.DeleteOptions{}) + }) + + err = checkGatewayClassCondition(oc, gatewayClass.Name, string(gatewayapiv1.GatewayClassConditionStatusAccepted), metav1.ConditionTrue) + o.Expect(err).NotTo(o.HaveOccurred()) + + defaultIngressDomain, err := getDefaultIngressClusterDomainName(oc, 1*time.Minute) + o.Expect(err).NotTo(o.HaveOccurred()) + customDomain := strings.Replace(defaultIngressDomain, "apps.", "gw-managed-workload.", 1) + + testGatewayName := "test-managed-workload-gateway-" + uuid.New().String()[:8] + _, err = createAndCheckGateway(oc, testGatewayName, gatewayClass.Name, customDomain, loadBalancerSupported) + o.Expect(err).NotTo(o.HaveOccurred()) + g.DeferCleanup(func(ctx context.Context) { + _ = oc.AdminGatewayApiClient().GatewayV1().Gateways(ingressNamespace).Delete(ctx, testGatewayName, metav1.DeleteOptions{}) + _ = waitForGatewayDeploymentDeletion(oc, testGatewayName) + }) + + if loadBalancerSupported { + g.By("Verifying LoadBalancer service is created") + assertGatewayLoadbalancerReady(oc, testGatewayName, testGatewayName+"-openshift-default") + } + + if managedDNS { + g.By("Verifying DNS controller creates DNSRecord") + assertDNSRecordStatus(oc, testGatewayName) + } + + g.By("Creating HTTPRoute with backend pod") + hostname := "test-workload." + customDomain + routeName := "test-workload-route" + backendName := "echo-backend-" + testGatewayName + createHttpRoute(oc, testGatewayName, routeName, hostname, backendName) + g.DeferCleanup(func(ctx context.Context) { + _ = oc.AdminGatewayApiClient().GatewayV1().HTTPRoutes(oc.Namespace()).Delete(ctx, routeName, metav1.DeleteOptions{}) + }) + + g.By("Waiting for HTTPRoute to be accepted") + _, err = assertHttpRouteSuccessful(oc, testGatewayName, routeName) + o.Expect(err).NotTo(o.HaveOccurred()) + + if loadBalancerSupported && managedDNS { + g.By("Verifying HTTP connectivity works end-to-end") + assertHttpRouteConnection(hostname) + } + + e2e.Logf("Successfully transitioned to Managed mode and deployed working Gateway with real workload") + }) + + g.It("should block takeover when non-compliant CRDs exist - bundle-version mismatch", func(ctx context.Context) { + // Ensure we start in Managed mode, then go to Unmanaged + g.By("Ensuring Managed mode first") + err := setManagementMode(ctx, oc, operatorv1alpha1.GatewayAPIManagementModeManaged) + o.Expect(err).NotTo(o.HaveOccurred()) + err = waitForManagementModeTransition(ctx, oc, operatorv1alpha1.GatewayAPIManagementModeManaged, platformAwareTimeout(oc, defaultModeTransitionTimeout)) + o.Expect(err).NotTo(o.HaveOccurred()) + + g.By("Transitioning to Unmanaged mode") + err = setManagementMode(ctx, oc, operatorv1alpha1.GatewayAPIManagementModeUnmanaged) + o.Expect(err).NotTo(o.HaveOccurred()) + err = waitForManagementModeTransition(ctx, oc, operatorv1alpha1.GatewayAPIManagementModeUnmanaged, platformAwareTimeout(oc, defaultModeTransitionTimeout)) + o.Expect(err).NotTo(o.HaveOccurred()) + + // Cleanup: restore Managed mode + g.DeferCleanup(func(ctx context.Context) { + e2e.Logf("Cleanup: Restoring Managed mode") + // First, restore CRD compliance by deleting if needed + crd, err := oc.AdminApiextensionsClient().ApiextensionsV1().CustomResourceDefinitions().Get(ctx, httpRouteCRDName, metav1.GetOptions{}) + if err == nil { + if bundleVer := crd.Annotations[bundleVersionAnnotation]; bundleVer == "v0.0.0-takeover-test" { + e2e.Logf("Cleanup: Deleting non-compliant CRD") + _ = oc.AdminApiextensionsClient().ApiextensionsV1().CustomResourceDefinitions().Delete(ctx, httpRouteCRDName, metav1.DeleteOptions{}) + + // Wait for CRD to be recreated + o.Eventually(func() bool { + crd, err := oc.AdminApiextensionsClient().ApiextensionsV1().CustomResourceDefinitions().Get(ctx, httpRouteCRDName, metav1.GetOptions{}) + if err != nil { + return false + } + bundleVersion, found := crd.Annotations[bundleVersionAnnotation] + return found && bundleVersion != "v0.0.0-takeover-test" + }).WithTimeout(3 * time.Minute).WithPolling(5 * time.Second).Should(o.BeTrue()) + } + } + + err = setManagementMode(ctx, oc, operatorv1alpha1.GatewayAPIManagementModeManaged) + o.Expect(err).NotTo(o.HaveOccurred()) + err = waitForManagementModeTransition(ctx, oc, operatorv1alpha1.GatewayAPIManagementModeManaged, platformAwareTimeout(oc, defaultModeTransitionTimeout)) + o.Expect(err).NotTo(o.HaveOccurred()) + }) + + g.By("Modifying Gateway API CRD bundle-version to make it non-compliant") + var originalBundleVersion string + o.Eventually(func() error { + crd, err := oc.AdminApiextensionsClient().ApiextensionsV1().CustomResourceDefinitions().Get(ctx, httpRouteCRDName, metav1.GetOptions{}) + if err != nil { + return err + } + + originalBundleVersion = crd.Annotations[bundleVersionAnnotation] + if originalBundleVersion == "" { + return fmt.Errorf("CRD missing bundle-version annotation") + } + + crd.Annotations[bundleVersionAnnotation] = "v0.0.0-takeover-test" + _, err = oc.AdminApiextensionsClient().ApiextensionsV1().CustomResourceDefinitions().Update(ctx, crd, metav1.UpdateOptions{}) + return err + }).WithTimeout(30 * time.Second).WithPolling(2 * time.Second).Should(o.Succeed()) + + e2e.Logf("Modified CRD bundle-version from %s to v0.0.0-takeover-test", originalBundleVersion) + + g.By("Attempting to switch to Managed mode (should be blocked)") + err = setManagementMode(ctx, oc, operatorv1alpha1.GatewayAPIManagementModeManaged) + o.Expect(err).NotTo(o.HaveOccurred()) + + g.By("Verifying takeover is blocked (Managed=False, reason=TakeoverBlocked)") + o.Eventually(func() error { + return checkIngressCondition(ctx, oc, "GatewayAPICRDsManaged", metav1.ConditionFalse, "TakeoverBlocked") + }).WithTimeout(2 * time.Minute).WithPolling(5 * time.Second).Should(o.Succeed()) + + err = checkIngressCondition(ctx, oc, "GatewayAPICRDsCompliant", metav1.ConditionFalse, "") + o.Expect(err).NotTo(o.HaveOccurred(), "Compliant condition should be False") + + g.By("Deleting non-compliant CRD to allow CIO to recreate it") + err = oc.AdminApiextensionsClient().ApiextensionsV1().CustomResourceDefinitions().Delete(ctx, httpRouteCRDName, metav1.DeleteOptions{}) + o.Expect(err).NotTo(o.HaveOccurred()) + + g.By("Waiting for CIO to recreate compliant CRD") + o.Eventually(func() bool { + crd, err := oc.AdminApiextensionsClient().ApiextensionsV1().CustomResourceDefinitions().Get(ctx, httpRouteCRDName, metav1.GetOptions{}) + if err != nil { + return false + } + bundleVersion, found := crd.Annotations[bundleVersionAnnotation] + return found && bundleVersion != "v0.0.0-takeover-test" + }).WithTimeout(3 * time.Minute).WithPolling(5 * time.Second).Should(o.BeTrue()) + + g.By("Verifying takeover succeeds after restoring compliance") + o.Eventually(func() error { + return checkIngressCondition(ctx, oc, "GatewayAPICRDsManaged", metav1.ConditionTrue, "") + }).WithTimeout(3 * time.Minute).WithPolling(5 * time.Second).Should(o.Succeed()) + + err = checkIngressCondition(ctx, oc, "GatewayAPICRDsCompliant", metav1.ConditionTrue, "") + o.Expect(err).NotTo(o.HaveOccurred()) + + g.By("Verifying VAP is recreated") + err = assertVAPExists(ctx, oc, gwapiCRDVAPName) + o.Expect(err).NotTo(o.HaveOccurred()) + + e2e.Logf("Successfully blocked takeover with non-compliant CRD and recovered after fixing compliance") + }) + + g.It("should block takeover when unknown Gateway API CRDs exist", func(ctx context.Context) { + // Ensure we start in Managed mode, then go to Unmanaged + g.By("Ensuring Managed mode first") + err := setManagementMode(ctx, oc, operatorv1alpha1.GatewayAPIManagementModeManaged) + o.Expect(err).NotTo(o.HaveOccurred()) + err = waitForManagementModeTransition(ctx, oc, operatorv1alpha1.GatewayAPIManagementModeManaged, platformAwareTimeout(oc, defaultModeTransitionTimeout)) + o.Expect(err).NotTo(o.HaveOccurred()) + + g.By("Transitioning to Unmanaged mode") + err = setManagementMode(ctx, oc, operatorv1alpha1.GatewayAPIManagementModeUnmanaged) + o.Expect(err).NotTo(o.HaveOccurred()) + err = waitForManagementModeTransition(ctx, oc, operatorv1alpha1.GatewayAPIManagementModeUnmanaged, platformAwareTimeout(oc, defaultModeTransitionTimeout)) + o.Expect(err).NotTo(o.HaveOccurred()) + + // Create a mock unknown Gateway API CRD + mockCRDName := "invalid.gateway.networking.k8s.io" + g.By(fmt.Sprintf("Creating mock unknown Gateway API CRD: %s", mockCRDName)) + mockCRD := &apiextensionsv1.CustomResourceDefinition{ + ObjectMeta: metav1.ObjectMeta{ + Name: mockCRDName, + Annotations: map[string]string{ + bundleVersionAnnotation: "v99.99.99-unknown", + }, + }, + Spec: apiextensionsv1.CustomResourceDefinitionSpec{ + Group: "gateway.networking.k8s.io", + Names: apiextensionsv1.CustomResourceDefinitionNames{ + Plural: "invalids", + Singular: "invalid", + Kind: "Invalid", + ListKind: "InvalidList", + }, + Scope: apiextensionsv1.ClusterScoped, + Versions: []apiextensionsv1.CustomResourceDefinitionVersion{ + { + Name: "v1", + Served: true, + Storage: true, + Schema: &apiextensionsv1.CustomResourceValidation{ + OpenAPIV3Schema: &apiextensionsv1.JSONSchemaProps{ + Type: "object", + Properties: map[string]apiextensionsv1.JSONSchemaProps{ + "spec": { + Type: "object", + XPreserveUnknownFields: boolPtr(true), + }, + }, + }, + }, + }, + }, + }, + } + + _, err = oc.AdminApiextensionsClient().ApiextensionsV1().CustomResourceDefinitions().Create(ctx, mockCRD, metav1.CreateOptions{}) + o.Expect(err).NotTo(o.HaveOccurred()) + + // Cleanup: restore Managed mode + g.DeferCleanup(func(ctx context.Context) { + e2e.Logf("Cleanup: Restoring Managed mode") + err := setManagementMode(ctx, oc, operatorv1alpha1.GatewayAPIManagementModeManaged) + o.Expect(err).NotTo(o.HaveOccurred()) + err = waitForManagementModeTransition(ctx, oc, operatorv1alpha1.GatewayAPIManagementModeManaged, platformAwareTimeout(oc, defaultModeTransitionTimeout)) + o.Expect(err).NotTo(o.HaveOccurred()) + }) + + g.DeferCleanup(func(ctx context.Context) { + e2e.Logf("Cleanup: Deleting mock CRD %s", mockCRDName) + _ = oc.AdminApiextensionsClient().ApiextensionsV1().CustomResourceDefinitions().Delete(ctx, mockCRDName, metav1.DeleteOptions{}) + }) + + g.By("Attempting to switch to Managed mode (should be blocked)") + err = setManagementMode(ctx, oc, operatorv1alpha1.GatewayAPIManagementModeManaged) + o.Expect(err).NotTo(o.HaveOccurred()) + + g.By("Verifying takeover is blocked due to unknown CRD") + o.Eventually(func() error { + return checkIngressCondition(ctx, oc, "GatewayAPICRDsManaged", metav1.ConditionFalse, "TakeoverBlocked") + }).WithTimeout(2 * time.Minute).WithPolling(5 * time.Second).Should(o.Succeed()) + + g.By("Deleting mock unknown CRD") + err = oc.AdminApiextensionsClient().ApiextensionsV1().CustomResourceDefinitions().Delete(ctx, mockCRDName, metav1.DeleteOptions{}) + o.Expect(err).NotTo(o.HaveOccurred()) + + g.By("Verifying takeover succeeds after removing unknown CRD") + o.Eventually(func() error { + return checkIngressCondition(ctx, oc, "GatewayAPICRDsManaged", metav1.ConditionTrue, "") + }).WithTimeout(3 * time.Minute).WithPolling(5 * time.Second).Should(o.Succeed()) + + err = checkIngressCondition(ctx, oc, "GatewayAPICRDsCompliant", metav1.ConditionTrue, "") + o.Expect(err).NotTo(o.HaveOccurred()) + + e2e.Logf("Successfully blocked takeover with unknown Gateway API CRD and recovered after deletion") + }) + + g.It("should detect CRD compliance violations in Managed mode", func(ctx context.Context) { + g.By("Ensuring Managed mode") + err := setManagementMode(ctx, oc, operatorv1alpha1.GatewayAPIManagementModeManaged) + o.Expect(err).NotTo(o.HaveOccurred()) + err = waitForManagementModeTransition(ctx, oc, operatorv1alpha1.GatewayAPIManagementModeManaged, platformAwareTimeout(oc, defaultModeTransitionTimeout)) + o.Expect(err).NotTo(o.HaveOccurred()) + + g.By("Getting original bundle-version from Gateway CRD") + crd, err := oc.AdminApiextensionsClient().ApiextensionsV1().CustomResourceDefinitions().Get(ctx, gatewayCRDName, metav1.GetOptions{}) + o.Expect(err).NotTo(o.HaveOccurred()) + + originalBundleVersion, found := crd.Annotations[bundleVersionAnnotation] + o.Expect(found).To(o.BeTrue(), "CRD should have bundle-version annotation") + e2e.Logf("Original bundle-version: %s", originalBundleVersion) + + g.By("Temporarily disabling VAP to modify CRD") + vapBinding, err := oc.AdminKubeClient().AdmissionregistrationV1().ValidatingAdmissionPolicyBindings().Get(ctx, gwapiCRDVAPName, metav1.GetOptions{}) + o.Expect(err).NotTo(o.HaveOccurred()) + + err = oc.AdminKubeClient().AdmissionregistrationV1().ValidatingAdmissionPolicyBindings().Delete(ctx, gwapiCRDVAPName, metav1.DeleteOptions{}) + o.Expect(err).NotTo(o.HaveOccurred()) + + g.DeferCleanup(func(ctx context.Context) { + e2e.Logf("Cleanup: Restoring VAP binding") + // VAP binding should be recreated by CIO, but restore just in case + _, err := oc.AdminKubeClient().AdmissionregistrationV1().ValidatingAdmissionPolicyBindings().Get(ctx, gwapiCRDVAPName, metav1.GetOptions{}) + if apierrors.IsNotFound(err) { + vapBinding.ResourceVersion = "" + _, _ = oc.AdminKubeClient().AdmissionregistrationV1().ValidatingAdmissionPolicyBindings().Create(ctx, vapBinding, metav1.CreateOptions{}) + } + }) + + g.By("Waiting for VAP binding deletion to propagate") + o.Eventually(func() bool { + _, err := oc.AdminKubeClient().AdmissionregistrationV1().ValidatingAdmissionPolicyBindings().Get(ctx, gwapiCRDVAPName, metav1.GetOptions{}) + return apierrors.IsNotFound(err) + }).WithTimeout(30 * time.Second).WithPolling(1 * time.Second).Should(o.BeTrue()) + + g.By("Modifying CRD bundle-version annotation to trigger non-compliance") + var updatedCRD *apiextensionsv1.CustomResourceDefinition + o.Eventually(func() error { + crd, err := oc.AdminApiextensionsClient().ApiextensionsV1().CustomResourceDefinitions().Get(ctx, gatewayCRDName, metav1.GetOptions{}) + if err != nil { + return err + } + + originalSpec := crd.Spec.DeepCopy() + + crd.Annotations[bundleVersionAnnotation] = "v0.0.0-test-mismatch" + updatedCRD, err = oc.AdminApiextensionsClient().ApiextensionsV1().CustomResourceDefinitions().Update(ctx, crd, metav1.UpdateOptions{}) + if err == nil { + o.Expect(updatedCRD.Spec).To(o.Equal(*originalSpec), "CRD Spec should not be modified, only annotations") + } + return err + }).WithTimeout(30 * time.Second).WithPolling(2 * time.Second).Should(o.Succeed()) + + g.DeferCleanup(func(ctx context.Context) { + e2e.Logf("Cleanup: Restoring original bundle-version") + o.Eventually(func() error { + crd, err := oc.AdminApiextensionsClient().ApiextensionsV1().CustomResourceDefinitions().Get(ctx, gatewayCRDName, metav1.GetOptions{}) + if err != nil { + return err + } + crd.Annotations[bundleVersionAnnotation] = originalBundleVersion + _, err = oc.AdminApiextensionsClient().ApiextensionsV1().CustomResourceDefinitions().Update(ctx, crd, metav1.UpdateOptions{}) + return err + }).WithTimeout(30 * time.Second).WithPolling(2 * time.Second).Should(o.Succeed()) + + // Wait for Compliant to become True + o.Eventually(func() error { + return checkIngressCondition(ctx, oc, "GatewayAPICRDsCompliant", metav1.ConditionTrue, "") + }).WithTimeout(2 * time.Minute).WithPolling(5 * time.Second).Should(o.Succeed()) + }) + + g.By("Waiting for Compliant condition to become False") + o.Eventually(func() error { + ingress, err := getIngressCR(ctx, oc) + if err != nil { + return err + } + + compliantCond := condutils.FindStatusCondition(ingress.Status.Conditions, "GatewayAPICRDsCompliant") + if compliantCond == nil { + return fmt.Errorf("Compliant condition not found") + } + + if compliantCond.Status != metav1.ConditionFalse { + return fmt.Errorf("Compliant condition not False yet: %v", compliantCond.Status) + } + + if !strings.Contains(compliantCond.Message, "bundle-version") { + return fmt.Errorf("Compliant message doesn't mention bundle-version: %s", compliantCond.Message) + } + + return nil + }).WithTimeout(2 * time.Minute).WithPolling(5 * time.Second).Should(o.Succeed()) + + e2e.Logf("Successfully detected CRD compliance violation") + }) + + g.It("should report correct metrics for management mode", func(ctx context.Context) { + g.By("Ensuring Managed mode") + err := setManagementMode(ctx, oc, operatorv1alpha1.GatewayAPIManagementModeManaged) + o.Expect(err).NotTo(o.HaveOccurred()) + err = waitForManagementModeTransition(ctx, oc, operatorv1alpha1.GatewayAPIManagementModeManaged, platformAwareTimeout(oc, defaultModeTransitionTimeout)) + o.Expect(err).NotTo(o.HaveOccurred()) + + g.By("Creating Prometheus client") + prometheusClient, err := promclient.NewE2EPrometheusRouterClient(ctx, oc) + o.Expect(err).NotTo(o.HaveOccurred()) + + g.By("Verifying management_mode metric shows Managed=1 and Unmanaged=0") + o.Eventually(func() error { + result, _, err := prometheusClient.Query(ctx, `ingress_controller_gateway_api_management_mode{mode="Managed"}`, time.Now()) + if err != nil { + return err + } + vector, ok := result.(model.Vector) + if !ok || len(vector) == 0 { + return fmt.Errorf("metric not found") + } + if float64(vector[0].Value) != 1 { + return fmt.Errorf("expected Managed=1, got %v", vector[0].Value) + } + return nil + }).WithTimeout(2 * time.Minute).WithPolling(5 * time.Second).Should(o.Succeed()) + + o.Eventually(func() error { + result, _, err := prometheusClient.Query(ctx, `ingress_controller_gateway_api_management_mode{mode="Unmanaged"}`, time.Now()) + if err != nil { + return err + } + vector, ok := result.(model.Vector) + if !ok || len(vector) == 0 { + return fmt.Errorf("metric not found") + } + if float64(vector[0].Value) != 0 { + return fmt.Errorf("expected Unmanaged=0, got %v", vector[0].Value) + } + return nil + }).WithTimeout(2 * time.Minute).WithPolling(5 * time.Second).Should(o.Succeed()) + + g.By("Verifying gateway_api_info metric is present with version labels") + o.Eventually(func() error { + result, _, err := prometheusClient.Query(ctx, `ingress_controller_gateway_api_info`, time.Now()) + if err != nil { + return err + } + vector, ok := result.(model.Vector) + if !ok || len(vector) == 0 { + return fmt.Errorf("info metric not found") + } + + metric := vector[0].Metric + if _, hasGatewayAPIVersion := metric["gateway_api_version"]; !hasGatewayAPIVersion { + return fmt.Errorf("info metric missing gateway_api_version label") + } + if _, hasOSSMVersion := metric["ossm_version"]; !hasOSSMVersion { + return fmt.Errorf("info metric missing ossm_version label") + } + if float64(vector[0].Value) != 1 { + return fmt.Errorf("info metric should have value 1") + } + return nil + }).WithTimeout(2 * time.Minute).WithPolling(5 * time.Second).Should(o.Succeed()) + + // Transition to Unmanaged and verify metrics change + g.DeferCleanup(func(ctx context.Context) { + e2e.Logf("Cleanup: Restoring Managed mode") + err := setManagementMode(ctx, oc, operatorv1alpha1.GatewayAPIManagementModeManaged) + o.Expect(err).NotTo(o.HaveOccurred()) + err = waitForManagementModeTransition(ctx, oc, operatorv1alpha1.GatewayAPIManagementModeManaged, platformAwareTimeout(oc, defaultModeTransitionTimeout)) + o.Expect(err).NotTo(o.HaveOccurred()) + }) + + g.By("Transitioning to Unmanaged mode") + err = setManagementMode(ctx, oc, operatorv1alpha1.GatewayAPIManagementModeUnmanaged) + o.Expect(err).NotTo(o.HaveOccurred()) + err = waitForManagementModeTransition(ctx, oc, operatorv1alpha1.GatewayAPIManagementModeUnmanaged, platformAwareTimeout(oc, defaultModeTransitionTimeout)) + o.Expect(err).NotTo(o.HaveOccurred()) + + g.By("Verifying metrics show Unmanaged=1 and Managed=0 after transition") + o.Eventually(func() error { + result, _, err := prometheusClient.Query(ctx, `ingress_controller_gateway_api_management_mode{mode="Unmanaged"}`, time.Now()) + if err != nil { + return err + } + vector, ok := result.(model.Vector) + if !ok || len(vector) == 0 { + return fmt.Errorf("metric not found") + } + if float64(vector[0].Value) != 1 { + return fmt.Errorf("expected Unmanaged=1, got %v", vector[0].Value) + } + return nil + }).WithTimeout(2 * time.Minute).WithPolling(5 * time.Second).Should(o.Succeed()) + + o.Eventually(func() error { + result, _, err := prometheusClient.Query(ctx, `ingress_controller_gateway_api_management_mode{mode="Managed"}`, time.Now()) + if err != nil { + return err + } + vector, ok := result.(model.Vector) + if !ok || len(vector) == 0 { + return fmt.Errorf("metric not found") + } + if float64(vector[0].Value) != 0 { + return fmt.Errorf("expected Managed=0, got %v", vector[0].Value) + } + return nil + }).WithTimeout(2 * time.Minute).WithPolling(5 * time.Second).Should(o.Succeed()) + + g.By("Verifying info metric is removed in Unmanaged mode") + o.Eventually(func() bool { + result, _, err := prometheusClient.Query(ctx, `ingress_controller_gateway_api_info`, time.Now()) + if err != nil { + return false + } + vector, ok := result.(model.Vector) + return ok && len(vector) == 0 + }).WithTimeout(2 * time.Minute).WithPolling(5 * time.Second).Should(o.BeTrue()) + + e2e.Logf("Successfully verified management mode metrics") + }) +}) + +// Helper functions + +func getIngressCR(ctx context.Context, oc *exutil.CLI) (*operatorv1alpha1.Ingress, error) { + ingressClient := oc.AdminOperatorClient().OperatorV1alpha1().Ingresses() + return ingressClient.Get(ctx, ingressCRName, metav1.GetOptions{}) +} + +func setManagementMode(ctx context.Context, oc *exutil.CLI, mode operatorv1alpha1.GatewayAPIManagementMode) error { + ingressClient := oc.AdminOperatorClient().OperatorV1alpha1().Ingresses() + + return wait.PollUntilContextTimeout(ctx, 2*time.Second, 30*time.Second, true, func(ctx context.Context) (bool, error) { + ingress, err := ingressClient.Get(ctx, ingressCRName, metav1.GetOptions{}) + if err != nil { + return false, err + } + + ingress.Spec.GatewayAPI.ManagementMode = mode + + _, err = ingressClient.Update(ctx, ingress, metav1.UpdateOptions{}) + if err != nil { + if apierrors.IsConflict(err) { + return false, nil + } + return false, err + } + return true, nil + }) +} + +func waitForManagementModeTransition(ctx context.Context, oc *exutil.CLI, expectedMode operatorv1alpha1.GatewayAPIManagementMode, timeout time.Duration) error { + ingressClient := oc.AdminOperatorClient().OperatorV1alpha1().Ingresses() + + var expectedConditionStatus metav1.ConditionStatus + var expectedReason string + + if expectedMode == operatorv1alpha1.GatewayAPIManagementModeManaged { + expectedConditionStatus = metav1.ConditionTrue + expectedReason = "" // Any reason is acceptable for True + } else { + expectedConditionStatus = metav1.ConditionFalse + expectedReason = "Unmanaged" + } + + return wait.PollUntilContextTimeout(ctx, 5*time.Second, timeout, true, func(ctx context.Context) (bool, error) { + ingress, err := ingressClient.Get(ctx, ingressCRName, metav1.GetOptions{}) + if err != nil { + return false, err + } + + managedCond := condutils.FindStatusCondition(ingress.Status.Conditions, "GatewayAPICRDsManaged") + if managedCond == nil { + return false, nil + } + + if managedCond.Status != expectedConditionStatus { + return false, nil + } + + if expectedReason != "" && managedCond.Reason != expectedReason { + return false, nil + } + + return true, nil + }) +} + +func checkIngressCondition(ctx context.Context, oc *exutil.CLI, conditionType string, expectedStatus metav1.ConditionStatus, expectedReason string) error { + ingress, err := getIngressCR(ctx, oc) + if err != nil { + return err + } + + cond := condutils.FindStatusCondition(ingress.Status.Conditions, conditionType) + if cond == nil { + return fmt.Errorf("condition %s not found", conditionType) + } + + if cond.Status != expectedStatus { + return fmt.Errorf("condition %s has status %v, expected %v", conditionType, cond.Status, expectedStatus) + } + + if expectedReason != "" && cond.Reason != expectedReason { + return fmt.Errorf("condition %s has reason %s, expected %s", conditionType, cond.Reason, expectedReason) + } + + return nil +} + +func assertVAPExists(ctx context.Context, oc *exutil.CLI, vapName string) error { + _, err := oc.AdminKubeClient().AdmissionregistrationV1().ValidatingAdmissionPolicies().Get(ctx, vapName, metav1.GetOptions{}) + if err != nil { + return fmt.Errorf("VAP %s not found: %w", vapName, err) + } + return nil +} + +func assertVAPDeleted(ctx context.Context, oc *exutil.CLI, vapName string) error { + return wait.PollUntilContextTimeout(ctx, 5*time.Second, 2*time.Minute, true, func(ctx context.Context) (bool, error) { + _, err := oc.AdminKubeClient().AdmissionregistrationV1().ValidatingAdmissionPolicies().Get(ctx, vapName, metav1.GetOptions{}) + if apierrors.IsNotFound(err) { + return true, nil + } + if err != nil { + return false, err + } + return false, nil + }) +} + +func assertGatewayAPICRDsInstalled(ctx context.Context, oc *exutil.CLI) { + expectedCRDs := []string{ + gatewayClassCRDName, + gatewayCRDName, + httpRouteCRDName, + } + + for _, crdName := range expectedCRDs { + crd, err := oc.AdminApiextensionsClient().ApiextensionsV1().CustomResourceDefinitions().Get(ctx, crdName, metav1.GetOptions{}) + o.Expect(err).NotTo(o.HaveOccurred(), "CRD %s should be installed", crdName) + + bundleVersion, found := crd.Annotations[bundleVersionAnnotation] + o.Expect(found).To(o.BeTrue(), "CRD %s should have bundle-version annotation", crdName) + o.Expect(bundleVersion).NotTo(o.BeEmpty(), "CRD %s bundle-version should not be empty", crdName) + } +} + +func boolPtr(b bool) *bool { + return &b +} + +// platformAwareTimeout adjusts timeout for slow architectures +func platformAwareTimeout(oc *exutil.CLI, baseTimeout time.Duration) time.Duration { + platformType, err := platformidentification.GetJobType(context.Background(), oc.AdminConfig()) + if err != nil { + return baseTimeout + } + + // Double timeout on slow IBM architectures (Power and Z) + if platformType.Architecture == platformidentification.ArchitecturePPC64le || + platformType.Architecture == platformidentification.ArchitectureS390 { + return baseTimeout * 2 + } + + return baseTimeout +} diff --git a/test/extended/router/gatewayapi_management_mode_upgrade.go b/test/extended/router/gatewayapi_management_mode_upgrade.go new file mode 100644 index 000000000000..42a6c15ef5d8 --- /dev/null +++ b/test/extended/router/gatewayapi_management_mode_upgrade.go @@ -0,0 +1,320 @@ +package router + +import ( + "context" + "fmt" + "strings" + "time" + + g "github.com/onsi/ginkgo/v2" + o "github.com/onsi/gomega" + + operatorv1alpha1 "github.com/openshift/api/operator/v1alpha1" + + exutil "github.com/openshift/origin/test/extended/util" + + apierrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + e2e "k8s.io/kubernetes/test/e2e/framework" + "k8s.io/kubernetes/test/e2e/upgrades" + gatewayv1 "sigs.k8s.io/gateway-api/apis/v1" +) + +// GatewayAPIManagementModeUpgradeTest verifies that Gateway API management mode +// transitions work correctly during upgrades and resources remain functional +type GatewayAPIManagementModeUpgradeTest struct { + oc *exutil.CLI + namespace string + gatewayClassName string + gatewayName string + routeName string + hostname string + startMode operatorv1alpha1.GatewayAPIManagementMode + loadBalancerSupported bool + managedDNS bool +} + +func (t *GatewayAPIManagementModeUpgradeTest) Name() string { + return "gateway-api-management-mode-upgrade" +} + +func (t *GatewayAPIManagementModeUpgradeTest) DisplayName() string { + return "[sig-network-edge][OCPFeatureGate:GatewayAPIManagementMode][Feature:Router][apigroup:operator.openshift.io] Verify Gateway API management mode transitions during upgrade" +} + +// Skip checks if this upgrade test should be skipped +func (t *GatewayAPIManagementModeUpgradeTest) Skip(_ upgrades.UpgradeContext) bool { + oc := exutil.NewCLIForMonitorTest("gateway-api-mgmt-mode-upgrade-skip").AsAdmin() + + // Check if feature gate is enabled + if !exutil.IsTechPreviewNoUpgrade(context.Background(), oc.AdminConfigClient()) { + e2e.Logf("Skipping: GatewayAPIManagementMode feature is not in TechPreviewNoUpgrade") + return true + } + + skip, reason, err := shouldSkipGatewayAPITests(oc, true) // NoOLM is default/GA + if err != nil { + e2e.Logf("Failed to check Gateway API skip conditions: %v", err) + return true + } + if skip { + e2e.Logf("Skipping test: %s", reason) + return true + } + + return false +} + +// Setup creates Gateway resources and records initial management mode +func (t *GatewayAPIManagementModeUpgradeTest) Setup(ctx context.Context, f *e2e.Framework) { + g.By("Setting up Gateway API management mode upgrade test") + + t.oc = exutil.NewCLIWithFramework(f).AsAdmin() + t.namespace = f.Namespace.Name + + // Get platform capabilities + t.loadBalancerSupported, t.managedDNS = getPlatformCapabilities(t.oc) + + g.By("Recording initial management mode before upgrade") + ingress, err := getIngressCR(ctx, t.oc) + o.Expect(err).NotTo(o.HaveOccurred()) + + t.startMode = ingress.Spec.GatewayAPI.ManagementMode + if t.startMode == "" { + t.startMode = operatorv1alpha1.GatewayAPIManagementModeManaged + } + e2e.Logf("Starting with management mode: %s", t.startMode) + + // Ensure we're in Managed mode for test setup + if t.startMode != operatorv1alpha1.GatewayAPIManagementModeManaged { + g.By("Transitioning to Managed mode for setup") + err = setManagementMode(ctx, t.oc, operatorv1alpha1.GatewayAPIManagementModeManaged) + o.Expect(err).NotTo(o.HaveOccurred()) + err = waitForManagementModeTransition(ctx, t.oc, operatorv1alpha1.GatewayAPIManagementModeManaged, 5*time.Minute) + o.Expect(err).NotTo(o.HaveOccurred()) + } + + g.By("Creating GatewayClass") + t.gatewayClassName = "upgrade-test-mgmt-mode" + gatewayClass := buildGatewayClass(t.gatewayClassName, "openshift.io/gateway-controller/v1") + _, err = t.oc.AdminGatewayApiClient().GatewayV1().GatewayClasses().Create(ctx, gatewayClass, metav1.CreateOptions{}) + if err != nil && !apierrors.IsAlreadyExists(err) { + e2e.Failf("Failed to create GatewayClass: %v", err) + } + + err = checkGatewayClassCondition(t.oc, t.gatewayClassName, string(gatewayv1.GatewayClassConditionStatusAccepted), metav1.ConditionTrue) + o.Expect(err).NotTo(o.HaveOccurred()) + + g.By("Creating Gateway") + defaultIngressDomain, err := getDefaultIngressClusterDomainName(t.oc, 1*time.Minute) + o.Expect(err).NotTo(o.HaveOccurred()) + customDomain := strings.Replace(defaultIngressDomain, "apps.", "gw-upgrade-mgmt.", 1) + + t.gatewayName = "upgrade-mgmt-mode-gateway" + t.hostname = "test-upgrade-mgmt." + customDomain + + _, err = createAndCheckGateway(t.oc, t.gatewayName, t.gatewayClassName, customDomain, t.loadBalancerSupported) + o.Expect(err).NotTo(o.HaveOccurred()) + + if t.loadBalancerSupported { + g.By("Verifying LoadBalancer service is ready") + assertGatewayLoadbalancerReady(t.oc, t.gatewayName, t.gatewayName+"-openshift-default") + } + + if t.managedDNS { + g.By("Verifying DNS controller creates DNSRecord") + assertDNSRecordStatus(t.oc, t.gatewayName) + } + + g.By("Creating HTTPRoute with backend") + t.routeName = "test-upgrade-mgmt-route" + backendName := "echo-backend-" + t.gatewayName + createHttpRoute(t.oc, t.gatewayName, t.routeName, t.hostname, backendName) + + g.By("Waiting for HTTPRoute to be accepted") + _, err = assertHttpRouteSuccessful(t.oc, t.gatewayName, t.routeName) + o.Expect(err).NotTo(o.HaveOccurred()) + + if t.loadBalancerSupported && t.managedDNS { + g.By("Verifying HTTP connectivity before upgrade") + assertHttpRouteConnection(t.hostname) + e2e.Logf("HTTPRoute connectivity verified before upgrade") + } + + e2e.Logf("Setup complete: Gateway and HTTPRoute created in %s mode", t.startMode) +} + +// Test validates resources after upgrade and tests mode transitions +func (t *GatewayAPIManagementModeUpgradeTest) Test(ctx context.Context, f *e2e.Framework, done <-chan struct{}, _ upgrades.UpgradeType) { + g.By("Validating Gateway API management mode functionality after upgrade") + + // Block until upgrade completes + g.By("Waiting for upgrade to complete") + <-done + + g.By("Verifying Gateway still exists and is programmed") + _, err := checkGatewayStatus(t.oc, t.gatewayName, ingressNamespace, t.loadBalancerSupported) + o.Expect(err).NotTo(o.HaveOccurred()) + + g.By("Verifying HTTPRoute still exists and is accepted") + _, err = assertHttpRouteSuccessful(t.oc, t.gatewayName, t.routeName) + o.Expect(err).NotTo(o.HaveOccurred()) + + if t.loadBalancerSupported && t.managedDNS { + g.By("Verifying HTTP connectivity after upgrade") + assertHttpRouteConnection(t.hostname) + } + + g.By("Checking current management mode after upgrade") + ingress, err := getIngressCR(ctx, t.oc) + o.Expect(err).NotTo(o.HaveOccurred()) + + currentMode := ingress.Spec.GatewayAPI.ManagementMode + if currentMode == "" { + currentMode = operatorv1alpha1.GatewayAPIManagementModeManaged + } + e2e.Logf("Current management mode after upgrade: %s", currentMode) + + // Test mode transitions in both directions + g.By("Testing mode transitions after upgrade") + + // Transition 1: Current mode → Opposite mode + var targetMode1 operatorv1alpha1.GatewayAPIManagementMode + if currentMode == operatorv1alpha1.GatewayAPIManagementModeManaged { + targetMode1 = operatorv1alpha1.GatewayAPIManagementModeUnmanaged + } else { + targetMode1 = operatorv1alpha1.GatewayAPIManagementModeManaged + } + + g.By(fmt.Sprintf("Transitioning from %s to %s", currentMode, targetMode1)) + err = setManagementMode(ctx, t.oc, targetMode1) + o.Expect(err).NotTo(o.HaveOccurred()) + + err = waitForManagementModeTransition(ctx, t.oc, targetMode1, 5*time.Minute) + o.Expect(err).NotTo(o.HaveOccurred()) + + t.validateModeState(ctx, targetMode1) + + g.By("Verifying Gateway and HTTPRoute remain functional after first transition") + _, err = checkGatewayStatus(t.oc, t.gatewayName, ingressNamespace, t.loadBalancerSupported) + o.Expect(err).NotTo(o.HaveOccurred()) + + _, err = assertHttpRouteSuccessful(t.oc, t.gatewayName, t.routeName) + o.Expect(err).NotTo(o.HaveOccurred()) + + // Transition 2: Opposite mode → Original mode + targetMode2 := currentMode + + g.By(fmt.Sprintf("Transitioning from %s back to %s", targetMode1, targetMode2)) + err = setManagementMode(ctx, t.oc, targetMode2) + o.Expect(err).NotTo(o.HaveOccurred()) + + err = waitForManagementModeTransition(ctx, t.oc, targetMode2, 5*time.Minute) + o.Expect(err).NotTo(o.HaveOccurred()) + + t.validateModeState(ctx, targetMode2) + + g.By("Verifying Gateway and HTTPRoute remain functional after second transition") + _, err = checkGatewayStatus(t.oc, t.gatewayName, ingressNamespace, t.loadBalancerSupported) + o.Expect(err).NotTo(o.HaveOccurred()) + + _, err = assertHttpRouteSuccessful(t.oc, t.gatewayName, t.routeName) + o.Expect(err).NotTo(o.HaveOccurred()) + + if t.loadBalancerSupported && t.managedDNS { + g.By("Verifying HTTP connectivity still works after both transitions") + assertHttpRouteConnection(t.hostname) + } + + // Verify DNS and controller reconciliation if in Managed mode + if targetMode2 == operatorv1alpha1.GatewayAPIManagementModeManaged { + g.By("Verifying controllers are actively reconciling in Managed mode") + + if t.managedDNS { + g.By("Verifying DNS controller is reconciling DNSRecords") + assertDNSRecordStatus(t.oc, t.gatewayName) + } + + g.By("Verifying gateway-status controller is updating Gateway status") + _, err = checkGatewayStatus(t.oc, t.gatewayName, ingressNamespace, t.loadBalancerSupported) + o.Expect(err).NotTo(o.HaveOccurred()) + } + + e2e.Logf("Successfully tested management mode transitions after upgrade: %s → %s → %s", + currentMode, targetMode1, targetMode2) +} + +// validateModeState verifies the cluster state matches the expected management mode +func (t *GatewayAPIManagementModeUpgradeTest) validateModeState(ctx context.Context, expectedMode operatorv1alpha1.GatewayAPIManagementMode) { + if expectedMode == operatorv1alpha1.GatewayAPIManagementModeManaged { + g.By("Validating Managed mode state") + + err := checkIngressCondition(ctx, t.oc, "GatewayAPICRDsManaged", metav1.ConditionTrue, "") + o.Expect(err).NotTo(o.HaveOccurred()) + + err = assertVAPExists(ctx, t.oc, gwapiCRDVAPName) + o.Expect(err).NotTo(o.HaveOccurred(), "VAP should exist in Managed mode") + + err = checkIstiodRunning(t.oc, 5*time.Minute) + o.Expect(err).NotTo(o.HaveOccurred(), "Istiod should be running in Managed mode") + + e2e.Logf("Validated Managed mode state: VAP and Istiod are present") + } else { + g.By("Validating Unmanaged mode state") + + err := checkIngressCondition(ctx, t.oc, "GatewayAPICRDsManaged", metav1.ConditionFalse, "Unmanaged") + o.Expect(err).NotTo(o.HaveOccurred()) + + err = assertVAPDeleted(ctx, t.oc, gwapiCRDVAPName) + o.Expect(err).NotTo(o.HaveOccurred(), "VAP should be deleted in Unmanaged mode") + + waitForIstiodPodDeletion(t.oc) + + e2e.Logf("Validated Unmanaged mode state: VAP and Istiod are removed") + } + + // CRDs should always be present regardless of mode + g.By("Verifying Gateway API CRDs are still present") + assertGatewayAPICRDsInstalled(ctx, t.oc) +} + +// Teardown cleans up Gateway API resources +func (t *GatewayAPIManagementModeUpgradeTest) Teardown(ctx context.Context, f *e2e.Framework) { + if t.oc == nil || t.gatewayName == "" { + e2e.Logf("Skipping cleanup because setup did not initialize resources") + return + } + + g.By("Ensuring Managed mode for cleanup") + err := setManagementMode(ctx, t.oc, operatorv1alpha1.GatewayAPIManagementModeManaged) + if err != nil { + e2e.Logf("Failed to set Managed mode during cleanup: %v", err) + } else { + _ = waitForManagementModeTransition(ctx, t.oc, operatorv1alpha1.GatewayAPIManagementModeManaged, 5*time.Minute) + } + + g.By("Deleting HTTPRoute") + err = t.oc.AdminGatewayApiClient().GatewayV1().HTTPRoutes(t.namespace).Delete(ctx, t.routeName, metav1.DeleteOptions{}) + if err != nil && !apierrors.IsNotFound(err) { + e2e.Logf("Failed to delete HTTPRoute: %v", err) + } + + g.By("Deleting Gateway") + err = t.oc.AdminGatewayApiClient().GatewayV1().Gateways(ingressNamespace).Delete(ctx, t.gatewayName, metav1.DeleteOptions{}) + if err != nil && !apierrors.IsNotFound(err) { + e2e.Logf("Failed to delete Gateway: %v", err) + } + + g.By("Waiting for Gateway deployment to be deleted") + if err := waitForGatewayDeploymentDeletion(t.oc, t.gatewayName); err != nil { + e2e.Logf("Gateway deployment was not cleaned up: %v", err) + } + + g.By("Deleting GatewayClass") + err = t.oc.AdminGatewayApiClient().GatewayV1().GatewayClasses().Delete(ctx, t.gatewayClassName, metav1.DeleteOptions{}) + if err != nil && !apierrors.IsNotFound(err) { + e2e.Logf("Failed to delete GatewayClass: %v", err) + } + + e2e.Logf("Gateway API management mode upgrade test cleanup complete") +} diff --git a/vendor/github.com/openshift/api/config/v1/types_authentication.go b/vendor/github.com/openshift/api/config/v1/types_authentication.go index 348ee040107c..ab591284d96e 100644 --- a/vendor/github.com/openshift/api/config/v1/types_authentication.go +++ b/vendor/github.com/openshift/api/config/v1/types_authentication.go @@ -1087,7 +1087,7 @@ type SourceURL struct { // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=259 // +kubebuilder:validation:XValidation:rule="isURL('https://'+self)",message="hostname must be a valid hostname" - // +kubebuilder:validation:XValidation:rule="!format.dns1123Subdomain().validate(self.split(':')[0]).hasValue()",message="hostname before port must start and end with a lowercase alphanumeric character, and must only contain lowercase alphanumeric characters, '-' or '.'" + // +kubebuilder:validation:XValidation:rule="self.split(':')[0].matches('^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$')",message="hostname before port must start and end with a lowercase alphanumeric character, and must only contain lowercase alphanumeric characters, '-' or '.'" // +kubebuilder:validation:XValidation:rule="self.split(':').size() > 1 ? int(self.split(':')[1]) <= 65535 : true",message="port must not exceed 65535" Hostname string `json:"hostname,omitempty"` @@ -1194,7 +1194,7 @@ type ExternalSourceCertificateAuthorityConfigMapReference struct { // +required // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=253 - // +kubebuilder:validation:XValidation:rule="!format.dns1123Subdomain().validate(self).hasValue()",message="name must start and end with a lowercase alphanumeric character, and must only contain lowercase alphanumeric characters, '-' or '.'" + // +kubebuilder:validation:XValidation:rule="self.matches('^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$')",message="name must start and end with a lowercase alphanumeric character, and must only contain lowercase alphanumeric characters, '-' or '.'" Name string `json:"name,omitempty"` } @@ -1211,6 +1211,6 @@ type ClientSecretSecretReference struct { // +required // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=253 - // +kubebuilder:validation:XValidation:rule="!format.dns1123Subdomain().validate(self).hasValue()",message="name must start and end with a lowercase alphanumeric character, and must only contain lowercase alphanumeric characters, '-' or '.'" + // +kubebuilder:validation:XValidation:rule="self.matches('^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$')",message="name must start and end with a lowercase alphanumeric character, and must only contain lowercase alphanumeric characters, '-' or '.'" Name string `json:"name,omitempty"` } 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 5d9f10374eb7..a89377ef7d0c 100644 --- a/vendor/github.com/openshift/api/config/v1/types_infrastructure.go +++ b/vendor/github.com/openshift/api/config/v1/types_infrastructure.go @@ -210,6 +210,21 @@ const ( DNSRecordsTypeInternal DNSRecordsType = "Internal" ) +// VIPManagementType defines which mechanism manages the API and Ingress +// VIPs on an on-premise cluster. +// +kubebuilder:validation:Enum=Keepalived;BGP +// +enum +type VIPManagementType string + +const ( + // VIPManagementTypeKeepalived means the VIPs are managed by the default + // keepalived/VRRP mechanism. + VIPManagementTypeKeepalived VIPManagementType = "Keepalived" + // VIPManagementTypeBGP means the VIPs are advertised via BGP by kube-vip + // (Routing Table Mode) and frr-k8s running as static pods. + VIPManagementTypeBGP VIPManagementType = "BGP" +) + // PlatformType is a specific supported infrastructure provider. // +kubebuilder:validation:Enum="";AWS;Azure;BareMetal;GCP;Libvirt;OpenStack;None;VSphere;oVirt;IBMCloud;KubeVirt;EquinixMetal;PowerVS;AlibabaCloud;Nutanix;External type PlatformType string @@ -586,6 +601,15 @@ type AWSPlatformStatus struct { // IPv4-only, or dual-stack networking with IPv4 or IPv6 as the primary // protocol family. // + // Valid values are: + // * "IPv4" (default): Cloud platform resources use IPv4 addressing only. + // * "DualStackIPv6Primary": Cloud platform resources use dual-stack networking with IPv6 as the primary protocol family. + // * "DualStackIPv4Primary": Cloud platform resources use dual-stack networking with IPv4 as the primary protocol family. + // + // When omitted, this field defaults to "IPv4". + // + // This field is immutable and cannot be changed once set. + // // +default="IPv4" // +kubebuilder:default="IPv4" // +kubebuilder:validation:XValidation:rule="oldSelf == '' || self == oldSelf",message="ipFamily is immutable once set" @@ -807,6 +831,25 @@ type GCPPlatformStatus struct { // +nullable CloudLoadBalancerConfig *CloudLoadBalancerConfig `json:"cloudLoadBalancerConfig,omitempty"` + // universeDomain is the GCP universe domain for the cluster, detected from + // the installer credentials. Components with their own GCP credentials should + // read the universe domain from those credentials, as they are the authoritative + // source. This field is provided for components that do not have GCP credentials + // and for general observability. + // + // When omitted, standard public GCP (googleapis.com) is assumed. + // + // universeDomain is an optional field that, when specified, must be non-empty and at most + // 253 characters. It must be a valid DNS subdomain: containing only lowercase alphanumeric + // characters, '-' or '.', and starting and ending with an alphanumeric character. + // + // +kubebuilder:validation:MinLength=1 + // +kubebuilder:validation:MaxLength=253 + // +kubebuilder:validation:XValidation:rule="!format.dns1123Subdomain().validate(self).hasValue()",message="universeDomain must be a valid DNS subdomain: contain no more than 253 characters, contain only lowercase alphanumeric characters, '-' or '.', and start and end with an alphanumeric character" + // +optional + // +openshift:enable:FeatureGate=GCPSovereignCloudInstall + UniverseDomain string `json:"universeDomain,omitempty"` + // This field was introduced and removed under tech preview. // serviceEndpoints specifies endpoints that override the default endpoints // used when creating clients to interact with GCP services. @@ -1074,6 +1117,21 @@ type BareMetalPlatformStatus struct { // +optional LoadBalancer *BareMetalPlatformLoadBalancer `json:"loadBalancer,omitempty"` + // vipManagement indicates which VIP management mechanism is active + // on this cluster. + // Allowed values are `Keepalived`, `BGP`, and omitted. + // Once set to a non-empty value, this field is immutable. + // When set to `BGP`, kube-vip (Routing Table Mode) and frr-k8s are + // deployed as static pods to advertise VIPs via BGP, replacing the + // default keepalived/VRRP mechanism. + // When set to `Keepalived`, the default keepalived-based VIP + // management is used. + // When omitted, the default keepalived-based VIP management is used. + // +kubebuilder:validation:XValidation:rule="oldSelf == '' || self == oldSelf",message="vipManagement is immutable once set" + // +openshift:enable:FeatureGate=BGPBasedVIPManagement + // +optional + VIPManagement VIPManagementType `json:"vipManagement,omitempty"` + // dnsRecordsType determines whether records for api, api-int, and ingress // are provided by the internal DNS service or externally. // Allowed values are `Internal`, `External`, and omitted. @@ -1423,6 +1481,9 @@ type VSpherePlatformFailureDomainSpec struct { ZoneAffinity *VSphereFailureDomainZoneAffinity `json:"zoneAffinity,omitempty"` // server is the fully-qualified domain name or the IP address of the vCenter server. + // This must match the server field of an entry in the vcenters list. + // The match is case-sensitive; the value must be specified exactly as it appears in the vcenters entry. + // The value must be between 1 and 255 characters long. // +required // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=255 @@ -1657,6 +1718,7 @@ type VSpherePlatformNodeNetworking struct { // use these fields for configuration. // +kubebuilder:validation:XValidation:rule="!has(oldSelf.apiServerInternalIPs) || has(self.apiServerInternalIPs)",message="apiServerInternalIPs list is required once set" // +kubebuilder:validation:XValidation:rule="!has(oldSelf.ingressIPs) || has(self.ingressIPs)",message="ingressIPs list is required once set" +// +openshift:validation:FeatureGateAwareXValidation:featureGate=VSphereMultiVCenterDay2,rule="!has(self.failureDomains) || size(self.failureDomains) == 0 || (has(self.vcenters) && self.failureDomains.all(fd, self.vcenters.exists(vc, vc.server == fd.server)))",message="all failure domains must have a corresponding vCenter entry" type VSpherePlatformSpec struct { // vcenters holds the connection details for services to communicate with vCenter. // Up to 3 vCenters are supported. @@ -1681,6 +1743,7 @@ type VSpherePlatformSpec struct { // failureDomains contains the definition of region, zone and the vCenter topology. // If this is omitted failure domains (regions and zones) will not be used. + // Each failure domain's server must match the server field of an entry in the vcenters list. // +listType=map // +listMapKey=name // +optional diff --git a/vendor/github.com/openshift/api/config/v1/types_ingress.go b/vendor/github.com/openshift/api/config/v1/types_ingress.go index bb461e2f3e24..622bce0345d3 100644 --- a/vendor/github.com/openshift/api/config/v1/types_ingress.go +++ b/vendor/github.com/openshift/api/config/v1/types_ingress.go @@ -171,7 +171,8 @@ const ( // alphanumeric characters, '-', '_', or '.', starting and ending with // an alphanumeric character. // +kubebuilder:validation:MaxLength=63 -// +kubebuilder:validation:XValidation:rule="!format.labelValue().validate(self).hasValue()",message="label values must be valid Kubernetes label values (at most 63 characters, alphanumeric, '-', '_', or '.', must start and end with alphanumeric)" +// +kubebuilder:validation:MinLength=0 +// +kubebuilder:validation:XValidation:rule="self == \"\" || self.matches('^[a-zA-Z0-9]([a-zA-Z0-9._-]*[a-zA-Z0-9])?$')",message="label values must be valid Kubernetes label values (at most 63 characters, alphanumeric, '-', '_', or '.', must start and end with alphanumeric)" type LabelValue string // ConsumingUser is an alias for string which we add validation to. Currently only service accounts are supported. @@ -278,7 +279,8 @@ type ComponentRouteSpec struct { // +mapType=granular // +kubebuilder:validation:MinProperties=1 // +kubebuilder:validation:MaxProperties=8 - // +kubebuilder:validation:XValidation:rule="self.all(key, !format.qualifiedName().validate(key).hasValue())",message="label keys must be valid qualified names, consisting of an optional DNS subdomain prefix of up to 253 characters followed by a slash and a name segment of 1-63 characters, that consists only of alphanumeric characters, dashes, underscores, and dots, and must start and end with an alphanumeric character" + // +kubebuilder:validation:XValidation:rule="self.all(key, key.size() <= 63 && key.size() > 0)",message="label keys must be between 1 and 63 characters in length" + // +kubebuilder:validation:XValidation:rule="self.all(key, key.matches('^([a-z0-9]([a-z0-9\\\\-]*[a-z0-9])?(\\\\.[a-z0-9]([a-z0-9\\\\-]*[a-z0-9])?)*\\\\/)?[a-zA-Z0-9]([a-zA-Z0-9._-]*[a-zA-Z0-9])?$') && key.size() <= 253)",message="label keys must be valid qualified names, consisting of an optional DNS subdomain prefix of up to 253 characters followed by a slash and a name segment of 1-63 characters, that consists only of alphanumeric characters, dashes, underscores, and dots, and must start and end with an alphanumeric character" // +kubebuilder:validation:XValidation:rule="self.all(key, !key.startsWith('kubernetes.io/') && !key.startsWith('k8s.io/') && !key.startsWith('openshift.io/'))",message="kubernetes.io/, k8s.io/, and openshift.io/ prefixed label keys are reserved and may not be used" Labels map[string]LabelValue `json:"labels,omitempty"` } diff --git a/vendor/github.com/openshift/api/config/v1/types_kmsencryption.go b/vendor/github.com/openshift/api/config/v1/types_kmsencryption.go index 6b58d9da49ba..e2f94ae1f37d 100644 --- a/vendor/github.com/openshift/api/config/v1/types_kmsencryption.go +++ b/vendor/github.com/openshift/api/config/v1/types_kmsencryption.go @@ -63,7 +63,7 @@ type VaultSecretReference struct { // // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=253 - // +kubebuilder:validation:XValidation:rule="!format.dns1123Subdomain().validate(self).hasValue()",message="name must be a valid DNS subdomain name: contain no more than 253 characters, contain only lowercase alphanumeric characters, '-' or '.', and start and end with an alphanumeric character" + // +kubebuilder:validation:XValidation:rule="self.matches('^[a-z0-9]([a-z0-9\\\\-]*[a-z0-9])?(\\\\.[a-z0-9]([a-z0-9\\\\-]*[a-z0-9])?)*$')",message="name must be a valid DNS subdomain name: contain no more than 253 characters, contain only lowercase alphanumeric characters, '-' or '.', and start and end with an alphanumeric character" // +required Name string `json:"name,omitempty"` } @@ -76,7 +76,7 @@ type VaultConfigMapReference struct { // // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=253 - // +kubebuilder:validation:XValidation:rule="!format.dns1123Subdomain().validate(self).hasValue()",message="name must be a valid DNS subdomain name: contain no more than 253 characters, contain only lowercase alphanumeric characters, '-' or '.', and start and end with an alphanumeric character" + // +kubebuilder:validation:XValidation:rule="self.matches('^[a-z0-9]([a-z0-9\\\\-]*[a-z0-9])?(\\\\.[a-z0-9]([a-z0-9\\\\-]*[a-z0-9])?)*$')",message="name must be a valid DNS subdomain name: contain no more than 253 characters, contain only lowercase alphanumeric characters, '-' or '.', and start and end with an alphanumeric character" // +required Name string `json:"name,omitempty"` } @@ -181,6 +181,23 @@ type VaultKMSPluginConfig struct { // +optional VaultNamespace string `json:"vaultNamespace,omitempty"` + // vaultAuthNamespace specifies the Vault namespace to use for authentication. + // This is only applicable for Vault Enterprise installations where authentication + // and Transit operations may be in different namespaces. + // When this field is not set, the value of vaultNamespace is used for both + // authentication and Transit key operations. + // + // The value must be between 1 and 4096 characters. + // The namespace cannot end with a forward slash, cannot contain spaces, and cannot be one of the reserved strings: root, sys, audit, auth, cubbyhole, or identity. + // + // +kubebuilder:validation:MinLength=1 + // +kubebuilder:validation:MaxLength=4096 + // +kubebuilder:validation:XValidation:rule="!self.endsWith('/')",message="vaultAuthNamespace cannot end with a forward slash" + // +kubebuilder:validation:XValidation:rule="!self.contains(' ')",message="vaultAuthNamespace cannot contain spaces" + // +kubebuilder:validation:XValidation:rule="!(self in ['root', 'sys', 'audit', 'auth', 'cubbyhole', 'identity'])",message="vaultAuthNamespace cannot be a reserved string (root, sys, audit, auth, cubbyhole, identity)" + // +optional + VaultAuthNamespace string `json:"vaultAuthNamespace,omitempty"` + // tls contains the TLS configuration for connecting to the Vault server. // When this field is not set, system default TLS settings are used. // +optional @@ -191,7 +208,32 @@ type VaultKMSPluginConfig struct { // +required Authentication VaultAuthentication `json:"authentication,omitzero"` + // vaultKeyPath specifies the full path to the encryption key in Vault's Transit secrets engine, + // combining the Transit engine mount path and the key name separated by "/keys/". + // Format: /keys/ (e.g., transit/keys/my-key, myteam/transit/keys/production-key). + // + // The total path length must be between 8 and 1542 characters. + // The path cannot start or end with a forward slash, cannot contain consecutive forward slashes, + // must only contain RFC 3986 unreserved characters (alphanumeric, hyphen, period, underscore, tilde) + // and forward slashes as path separators, and must not contain "." or ".." path segments. + // The key name must start and end with an alphanumeric character or underscore, and may contain + // alphanumeric characters, underscores, hyphens, and periods in the middle. + // + // +kubebuilder:validation:MinLength=8 + // +kubebuilder:validation:MaxLength=1542 + // +kubebuilder:validation:XValidation:rule="!self.startsWith('/')",message="vaultKeyPath cannot start with a forward slash" + // +kubebuilder:validation:XValidation:rule="!self.endsWith('/')",message="vaultKeyPath cannot end with a forward slash" + // +kubebuilder:validation:XValidation:rule="!self.contains('//')",message="vaultKeyPath cannot contain consecutive forward slashes" + // +kubebuilder:validation:XValidation:rule="self.matches('^[a-zA-Z0-9._~/-]+$')",message="vaultKeyPath must only contain RFC 3986 unreserved characters (alphanumeric, hyphen, period, underscore, tilde) and forward slashes" + // +kubebuilder:validation:XValidation:rule="self.split('/').filter(s, s == '.' || s == '..').size() == 0",message="vaultKeyPath must not contain '.' or '..' path segments" + // +kubebuilder:validation:XValidation:rule=`self.matches('^[a-zA-Z0-9._~-]+(/[a-zA-Z0-9._~-]+)*/keys/[a-zA-Z0-9_]([a-zA-Z0-9_.-]*[a-zA-Z0-9_])?$')`,message="vaultKeyPath must follow the format /keys/ where the key name starts and ends with an alphanumeric character or underscore and may contain alphanumeric characters, underscores, hyphens, and periods" + // +required + VaultKeyPath string `json:"vaultKeyPath,omitempty"` + + // --- TOMBSTONE --- // transitMount specifies the mount path of the Vault Transit engine. + // It has been replaced by vaultKeyPath which combines the mount and key into a single path. + // The field name is reserved to prevent reuse. // // The transit mount must be between 1 and 1024 characters, cannot start or // end with a forward slash, cannot contain consecutive forward slashes, and @@ -205,10 +247,13 @@ type VaultKMSPluginConfig struct { // +kubebuilder:validation:XValidation:rule="!self.contains('//')",message="transitMount cannot contain consecutive forward slashes" // +kubebuilder:validation:XValidation:rule="self.matches('^[a-zA-Z0-9._~/-]+$')",message="transitMount must only contain RFC 3986 unreserved characters (alphanumeric, hyphen, period, underscore, tilde) and forward slashes" // +required - TransitMount string `json:"transitMount,omitempty"` + // TransitMount string `json:"transitMount,omitempty"` + // --- TOMBSTONE --- // transitKey specifies the name of the encryption key in Vault's Transit engine. // This key is used to encrypt and decrypt data. + // It has been replaced by vaultKeyPath which combines the mount and key into a single path. + // The field name is reserved to prevent reuse. // // The transit key must be between 1 and 512 characters, cannot contain forward slashes, // and must only contain alphanumeric characters, hyphens, periods, and underscores. @@ -218,7 +263,7 @@ type VaultKMSPluginConfig struct { // +kubebuilder:validation:XValidation:rule="!self.contains('/')",message="transitKey cannot contain forward slashes" // +kubebuilder:validation:XValidation:rule="self.matches('^[a-zA-Z0-9._-]+$')",message="transitKey must only contain alphanumeric characters, hyphens, periods, and underscores" // +required - TransitKey string `json:"transitKey,omitempty"` + // TransitKey string `json:"transitKey,omitempty"` } // VaultTLSConfig contains TLS configuration for connecting to Vault. @@ -255,7 +300,7 @@ type VaultTLSConfig struct { // // +kubebuilder:validation:MaxLength=253 // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:XValidation:rule="!format.dns1123Subdomain().validate(self).hasValue()",message="serverName must be a valid DNS hostname: contain no more than 253 characters, contain only lowercase alphanumeric characters, '-' or '.', and start and end with an alphanumeric character" + // +kubebuilder:validation:XValidation:rule="self.matches('^[a-z0-9]([a-z0-9\\\\-]*[a-z0-9])?(\\\\.[a-z0-9]([a-z0-9\\\\-]*[a-z0-9])?)*$')",message="serverName must be a valid DNS hostname: contain no more than 253 characters, contain only lowercase alphanumeric characters, '-' or '.', and start and end with an alphanumeric character" // +optional ServerName string `json:"serverName,omitempty"` } diff --git a/vendor/github.com/openshift/api/config/v1/zz_generated.featuregated-crd-manifests.yaml b/vendor/github.com/openshift/api/config/v1/zz_generated.featuregated-crd-manifests.yaml index 76f78df82d1d..6e9daaae518c 100644 --- a/vendor/github.com/openshift/api/config/v1/zz_generated.featuregated-crd-manifests.yaml +++ b/vendor/github.com/openshift/api/config/v1/zz_generated.featuregated-crd-manifests.yaml @@ -397,8 +397,10 @@ infrastructures.config.openshift.io: - AWSClusterHostedDNSInstall - AWSDualStackInstall - AzureDualStackInstall + - BGPBasedVIPManagement - DualReplica - DyanmicServiceEndpointIBMCloud + - GCPSovereignCloudInstall - MutableTopology - NutanixMultiSubnets - OnPremDNSRecords diff --git a/vendor/github.com/openshift/api/config/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/config/v1/zz_generated.swagger_doc_generated.go index 631f11a1b292..0519119af442 100644 --- a/vendor/github.com/openshift/api/config/v1/zz_generated.swagger_doc_generated.go +++ b/vendor/github.com/openshift/api/config/v1/zz_generated.swagger_doc_generated.go @@ -1581,7 +1581,7 @@ var map_AWSPlatformStatus = map[string]string{ "serviceEndpoints": "serviceEndpoints list contains custom endpoints which will override default service endpoint of AWS Services. There must be only one ServiceEndpoint for a service.", "resourceTags": "resourceTags is a list of additional tags to apply to AWS resources created for the cluster. See https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html for information on tagging AWS resources. AWS supports a maximum of 50 tags per resource. OpenShift reserves 25 tags for its use, leaving 25 tags available for the user.", "cloudLoadBalancerConfig": "cloudLoadBalancerConfig holds configuration related to DNS and cloud load balancers. It allows configuration of in-cluster DNS as an alternative to the platform default DNS implementation. When using the ClusterHosted DNS type, Load Balancer IP addresses must be provided for the API and internal API load balancers as well as the ingress load balancer.", - "ipFamily": "ipFamily specifies the IP protocol family that should be used for AWS network resources. This controls whether AWS resources are created with IPv4-only, or dual-stack networking with IPv4 or IPv6 as the primary protocol family.", + "ipFamily": "ipFamily specifies the IP protocol family that should be used for AWS network resources. This controls whether AWS resources are created with IPv4-only, or dual-stack networking with IPv4 or IPv6 as the primary protocol family.\n\nValid values are: * \"IPv4\" (default): Cloud platform resources use IPv4 addressing only. * \"DualStackIPv6Primary\": Cloud platform resources use dual-stack networking with IPv6 as the primary protocol family. * \"DualStackIPv4Primary\": Cloud platform resources use dual-stack networking with IPv4 as the primary protocol family.\n\nWhen omitted, this field defaults to \"IPv4\".\n\nThis field is immutable and cannot be changed once set.", } func (AWSPlatformStatus) SwaggerDoc() map[string]string { @@ -1698,6 +1698,7 @@ var map_BareMetalPlatformStatus = map[string]string{ "ingressIPs": "ingressIPs are the external IPs which route to the default ingress controller. The IPs are suitable targets of a wildcard DNS record used to resolve default route host names. In dual stack clusters this list contains two IPs otherwise only one.", "nodeDNSIP": "nodeDNSIP is the IP address for the internal DNS used by the nodes. Unlike the one managed by the DNS operator, `NodeDNSIP` provides name resolution for the nodes themselves. There is no DNS-as-a-service for BareMetal deployments. In order to minimize necessary changes to the datacenter DNS, a DNS service is hosted as a static pod to serve those hostnames to the nodes in the cluster.", "loadBalancer": "loadBalancer defines how the load balancer used by the cluster is configured.", + "vipManagement": "vipManagement indicates which VIP management mechanism is active on this cluster. Allowed values are `Keepalived`, `BGP`, and omitted. Once set to a non-empty value, this field is immutable. When set to `BGP`, kube-vip (Routing Table Mode) and frr-k8s are deployed as static pods to advertise VIPs via BGP, replacing the default keepalived/VRRP mechanism. When set to `Keepalived`, the default keepalived-based VIP management is used. When omitted, the default keepalived-based VIP management is used.", "dnsRecordsType": "dnsRecordsType determines whether records for api, api-int, and ingress are provided by the internal DNS service or externally. Allowed values are `Internal`, `External`, and omitted. When set to `Internal`, records are provided by the internal infrastructure and no additional user configuration is required for the cluster to function. When set to `External`, records are not provided by the internal infrastructure and must be configured by the user on a DNS server outside the cluster. Cluster nodes must use this external server for their upstream DNS requests. This value may only be set when loadBalancer.type is set to UserManaged. When omitted, this means the user has no opinion and the platform is left to choose reasonable defaults. These defaults are subject to change over time. The current default is `Internal`.", "machineNetworks": "machineNetworks are IP networks used to connect all the OpenShift cluster nodes.", } @@ -1787,6 +1788,7 @@ var map_GCPPlatformStatus = map[string]string{ "resourceLabels": "resourceLabels is a list of additional labels to apply to GCP resources created for the cluster. See https://cloud.google.com/compute/docs/labeling-resources for information on labeling GCP resources. GCP supports a maximum of 64 labels per resource. OpenShift reserves 32 labels for internal use, allowing 32 labels for user configuration.", "resourceTags": "resourceTags is a list of additional tags to apply to GCP resources created for the cluster. See https://cloud.google.com/resource-manager/docs/tags/tags-overview for information on tagging GCP resources. GCP supports a maximum of 50 tags per resource.", "cloudLoadBalancerConfig": "cloudLoadBalancerConfig holds configuration related to DNS and cloud load balancers. It allows configuration of in-cluster DNS as an alternative to the platform default DNS implementation. When using the ClusterHosted DNS type, Load Balancer IP addresses must be provided for the API and internal API load balancers as well as the ingress load balancer.", + "universeDomain": "universeDomain is the GCP universe domain for the cluster, detected from the installer credentials. Components with their own GCP credentials should read the universe domain from those credentials, as they are the authoritative source. This field is provided for components that do not have GCP credentials and for general observability.\n\nWhen omitted, standard public GCP (googleapis.com) is assumed.\n\nuniverseDomain is an optional field that, when specified, must be non-empty and at most 253 characters. It must be a valid DNS subdomain: containing only lowercase alphanumeric characters, '-' or '.', and starting and ending with an alphanumeric character.", } func (GCPPlatformStatus) SwaggerDoc() map[string]string { @@ -2174,7 +2176,7 @@ var map_VSpherePlatformFailureDomainSpec = map[string]string{ "zone": "zone defines the name of a zone tag that will be attached to a vCenter cluster. The tag category in vCenter must be named openshift-zone.", "regionAffinity": "regionAffinity holds the type of region, Datacenter or ComputeCluster. When set to Datacenter, this means the region is a vCenter Datacenter as defined in topology. When set to ComputeCluster, this means the region is a vCenter Cluster as defined in topology.", "zoneAffinity": "zoneAffinity holds the type of the zone and the hostGroup which vmGroup and the hostGroup names in vCenter corresponds to a vm-host group of type Virtual Machine and Host respectively. Is also contains the vmHostRule which is an affinity vm-host rule in vCenter.", - "server": "server is the fully-qualified domain name or the IP address of the vCenter server.", + "server": "server is the fully-qualified domain name or the IP address of the vCenter server. This must match the server field of an entry in the vcenters list. The match is case-sensitive; the value must be specified exactly as it appears in the vcenters entry. The value must be between 1 and 255 characters long.", "topology": "topology describes a given failure domain using vSphere constructs", } @@ -2215,7 +2217,7 @@ func (VSpherePlatformNodeNetworkingSpec) SwaggerDoc() map[string]string { var map_VSpherePlatformSpec = map[string]string{ "": "VSpherePlatformSpec holds the desired state of the vSphere infrastructure provider. In the future the cloud provider operator, storage operator and machine operator will use these fields for configuration.", "vcenters": "vcenters holds the connection details for services to communicate with vCenter. Up to 3 vCenters are supported. Once the cluster has been installed, you are unable to change the current number of defined vCenters except when 1.) the cluster has been upgraded from a version of OpenShift where the vsphere platform spec was not present or 2.) in TechPreview you are able to add and remove vCenters but may not remove all vCenters. You may make modifications to the existing vCenters that are defined in the vcenters list in order to match with any added or modified failure domains.", - "failureDomains": "failureDomains contains the definition of region, zone and the vCenter topology. If this is omitted failure domains (regions and zones) will not be used.", + "failureDomains": "failureDomains contains the definition of region, zone and the vCenter topology. If this is omitted failure domains (regions and zones) will not be used. Each failure domain's server must match the server field of an entry in the vcenters list.", "nodeNetworking": "nodeNetworking contains the definition of internal and external network constraints for assigning the node's networking. If this field is omitted, networking defaults to the legacy address selection behavior which is to only support a single address and return the first one found.", "apiServerInternalIPs": "apiServerInternalIPs are the IP addresses to contact the Kubernetes API server that can be used by components inside the cluster, like kubelets using the infrastructure rather than Kubernetes networking. These are the IPs for a self-hosted load balancer in front of the API servers. In dual stack clusters this list contains two IP addresses, one from IPv4 family and one from IPv6. In single stack clusters a single IP address is expected. When omitted, values from the status.apiServerInternalIPs will be used. Once set, the list cannot be completely removed (but its second entry can).", "ingressIPs": "ingressIPs are the external IPs which route to the default ingress controller. The IPs are suitable targets of a wildcard DNS record used to resolve default route host names. In dual stack clusters this list contains two IP addresses, one from IPv4 family and one from IPv6. In single stack clusters a single IP address is expected. When omitted, values from the status.ingressIPs will be used. Once set, the list cannot be completely removed (but its second entry can).", @@ -2501,14 +2503,14 @@ func (VaultConfigMapReference) SwaggerDoc() map[string]string { } var map_VaultKMSPluginConfig = map[string]string{ - "": "VaultKMSPluginConfig defines the KMS plugin configuration specific to Vault KMS", - "kmsPluginImage": "kmsPluginImage specifies the container image for the HashiCorp Vault KMS plugin.\n\nThe image must be a fully qualified OCI image pull spec with a SHA256 digest. The format is: host[:port][/namespace]/name@sha256: where the digest must be 64 characters long and consist only of lowercase hexadecimal characters, a-f and 0-9. The total length must be between 75 and 447 characters.\n\nShort names (e.g., \"vault-plugin\" or \"hashicorp/vault-plugin\") are not allowed. The registry hostname must be included and must contain at least one dot. Image tags (e.g., \":latest\", \":v1.0.0\") are not allowed.\n\nConsult the OpenShift documentation for compatible plugin versions with your cluster version, then obtain the image digest for that version from HashiCorp's container registry.\n\nFor disconnected environments, mirror the plugin image to an accessible registry and reference the mirrored location with its digest.", - "vaultAddress": "vaultAddress specifies the address of the HashiCorp Vault instance. The value must be a valid HTTPS URL containing only scheme, host, and optional port. Paths, user info, query parameters, and fragments are not allowed.\n\nFormat: https://hostname[:port] Example: https://vault.example.com:8200\n\nThe value must be between 1 and 512 characters.", - "vaultNamespace": "vaultNamespace specifies the Vault namespace where the Transit secrets engine is mounted. This is only applicable for Vault Enterprise installations. When this field is not set, no namespace is used.\n\nThe value must be between 1 and 4096 characters. The namespace cannot end with a forward slash, cannot contain spaces, and cannot be one of the reserved strings: root, sys, audit, auth, cubbyhole, or identity.", - "tls": "tls contains the TLS configuration for connecting to the Vault server. When this field is not set, system default TLS settings are used.", - "authentication": "authentication defines the authentication method used to authenticate with Vault.", - "transitMount": "transitMount specifies the mount path of the Vault Transit engine.\n\nThe transit mount must be between 1 and 1024 characters, cannot start or end with a forward slash, cannot contain consecutive forward slashes, and must only contain RFC 3986 unreserved characters (alphanumeric, hyphen, period, underscore, tilde) and forward slashes as path separators.", - "transitKey": "transitKey specifies the name of the encryption key in Vault's Transit engine. This key is used to encrypt and decrypt data.\n\nThe transit key must be between 1 and 512 characters, cannot contain forward slashes, and must only contain alphanumeric characters, hyphens, periods, and underscores.", + "": "VaultKMSPluginConfig defines the KMS plugin configuration specific to Vault KMS", + "kmsPluginImage": "kmsPluginImage specifies the container image for the HashiCorp Vault KMS plugin.\n\nThe image must be a fully qualified OCI image pull spec with a SHA256 digest. The format is: host[:port][/namespace]/name@sha256: where the digest must be 64 characters long and consist only of lowercase hexadecimal characters, a-f and 0-9. The total length must be between 75 and 447 characters.\n\nShort names (e.g., \"vault-plugin\" or \"hashicorp/vault-plugin\") are not allowed. The registry hostname must be included and must contain at least one dot. Image tags (e.g., \":latest\", \":v1.0.0\") are not allowed.\n\nConsult the OpenShift documentation for compatible plugin versions with your cluster version, then obtain the image digest for that version from HashiCorp's container registry.\n\nFor disconnected environments, mirror the plugin image to an accessible registry and reference the mirrored location with its digest.", + "vaultAddress": "vaultAddress specifies the address of the HashiCorp Vault instance. The value must be a valid HTTPS URL containing only scheme, host, and optional port. Paths, user info, query parameters, and fragments are not allowed.\n\nFormat: https://hostname[:port] Example: https://vault.example.com:8200\n\nThe value must be between 1 and 512 characters.", + "vaultNamespace": "vaultNamespace specifies the Vault namespace where the Transit secrets engine is mounted. This is only applicable for Vault Enterprise installations. When this field is not set, no namespace is used.\n\nThe value must be between 1 and 4096 characters. The namespace cannot end with a forward slash, cannot contain spaces, and cannot be one of the reserved strings: root, sys, audit, auth, cubbyhole, or identity.", + "vaultAuthNamespace": "vaultAuthNamespace specifies the Vault namespace to use for authentication. This is only applicable for Vault Enterprise installations where authentication and Transit operations may be in different namespaces. When this field is not set, the value of vaultNamespace is used for both authentication and Transit key operations.\n\nThe value must be between 1 and 4096 characters. The namespace cannot end with a forward slash, cannot contain spaces, and cannot be one of the reserved strings: root, sys, audit, auth, cubbyhole, or identity.", + "tls": "tls contains the TLS configuration for connecting to the Vault server. When this field is not set, system default TLS settings are used.", + "authentication": "authentication defines the authentication method used to authenticate with Vault.", + "vaultKeyPath": "vaultKeyPath specifies the full path to the encryption key in Vault's Transit secrets engine, combining the Transit engine mount path and the key name separated by \"/keys/\". Format: /keys/ (e.g., transit/keys/my-key, myteam/transit/keys/production-key).\n\nThe total path length must be between 8 and 1542 characters. The path cannot start or end with a forward slash, cannot contain consecutive forward slashes, must only contain RFC 3986 unreserved characters (alphanumeric, hyphen, period, underscore, tilde) and forward slashes as path separators, and must not contain \".\" or \"..\" path segments. The key name must start and end with an alphanumeric character or underscore, and may contain alphanumeric characters, underscores, hyphens, and periods in the middle.", } func (VaultKMSPluginConfig) SwaggerDoc() map[string]string { 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 d4846fd1cdb7..7692fe21b4fd 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 @@ -466,6 +466,28 @@ type NodeExporterCollectorConfig struct { // Enable when you need visibility into kernel softirq processing across CPUs. // +optional Softirqs NodeExporterCollectorSoftirqsConfig `json:"softirqs,omitempty,omitzero"` + // 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. + // +optional + DeviceMapperMultipath NodeExporterCollectorDeviceMapperMultipathConfig `json:"deviceMapperMultipath,omitzero"` + // 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. + // +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"` } // NodeExporterCollectorCpufreqConfig provides configuration for the cpufreq collector @@ -689,6 +711,48 @@ type NodeExporterCollectorSoftirqsConfig struct { CollectionPolicy NodeExporterCollectorCollectionPolicy `json:"collectionPolicy,omitempty"` } +// NodeExporterCollectorDeviceMapperMultipathConfig provides configuration for the dmmultipath collector +// of the node-exporter agent. The dmmultipath collector collects statistics about +// DM-Multipath devices. +// It is enabled by default. +type NodeExporterCollectorDeviceMapperMultipathConfig struct { + // collectionPolicy declares whether the dmmultipath collector collects metrics. + // This field is required. + // Valid values are "Collect" and "DoNotCollect". + // When set to "Collect", the dmmultipath collector is active and DM-Multipath device statistics are collected. + // When set to "DoNotCollect", the dmmultipath collector is inactive and the corresponding metrics become unavailable. + // +required + CollectionPolicy NodeExporterCollectorCollectionPolicy `json:"collectionPolicy,omitempty"` +} + +// NodeExporterCollectorZoneinfoConfig provides configuration for the zoneinfo collector +// of the node-exporter agent. The zoneinfo collector exposes per-zone memory page counts, +// watermarks, and protection thresholds from /proc/zoneinfo. +// By default, the zoneinfo collector does not collect metrics. +type NodeExporterCollectorZoneinfoConfig struct { + // collectionPolicy declares whether the zoneinfo collector collects metrics. + // This field is required. + // Valid values are "Collect" and "DoNotCollect". + // When set to "Collect", the zoneinfo collector is active and zone memory statistics are collected. + // When set to "DoNotCollect", the zoneinfo collector is inactive. + // +required + 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"` +} + // 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 @@ -1550,6 +1614,13 @@ type RemoteWriteSpec struct { // +kubebuilder:validation:MaxLength=63 // +kubebuilder:validation:XValidation:rule="self.matches('^[a-zA-Z0-9_-]+$')",message="must contain only alphanumeric characters, hyphens, and underscores" Name string `json:"name,omitempty"` + // messageVersion defines the Remote Write message's version to use when writing to the endpoint. + // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. + // The default value is "V1.0". + // When set to "V1.0", Prometheus uses the `prometheus.WriteRequest` protobuf message introduced in Remote Write 1.0. + // When set to "V2.0", Prometheus uses the `io.prometheus.write.v2.Request` protobuf message introduced in Remote Write 2.0. + // +optional + MessageVersion RemoteWriteMessageVersion `json:"messageVersion,omitempty,omitzero"` // authorization defines the authorization method for the remote write endpoint. // When omitted, no authorization is performed. // When set, type must be one of Authorization, BasicAuth, OAuth2, SigV4, or ServiceAccount; the corresponding nested config must be set (ServiceAccount has no config). @@ -1747,6 +1818,17 @@ type RemoteWriteAuthorization struct { // SafeAuthorization *v1.SecretKeySelector `json:"safeAuthorization,omitempty"` } +// RemoteWriteMessageVersion defines the version of the remote-write protocol. +// +kubebuilder:validation:Enum=V1.0;V2.0 +type RemoteWriteMessageVersion string + +const ( + // RemoteWriteMessageVersion1_0 indicates the version 1.0 of the remote-write protocol. + RemoteWriteMessageVersion1_0 RemoteWriteMessageVersion = "V1.0" + // RemoteWriteMessageVersion2_0 indicates the version 2.0 of the remote-write protocol. + RemoteWriteMessageVersion2_0 RemoteWriteMessageVersion = "V2.0" +) + // MetadataConfigSendPolicy defines whether to send metadata with platform defaults or with custom settings. // +kubebuilder:validation:Enum=Default;Custom type MetadataConfigSendPolicy string 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 12dd0cd31274..660e2931a7b3 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 @@ -1024,6 +1024,9 @@ func (in *NodeExporterCollectorConfig) DeepCopyInto(out *NodeExporterCollectorCo out.Processes = in.Processes in.Systemd.DeepCopyInto(&out.Systemd) out.Softirqs = in.Softirqs + out.DeviceMapperMultipath = in.DeviceMapperMultipath + out.Zoneinfo = in.Zoneinfo + out.NVMExpressSubsystem = in.NVMExpressSubsystem return } @@ -1053,6 +1056,22 @@ func (in *NodeExporterCollectorCpufreqConfig) DeepCopy() *NodeExporterCollectorC return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NodeExporterCollectorDeviceMapperMultipathConfig) DeepCopyInto(out *NodeExporterCollectorDeviceMapperMultipathConfig) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeExporterCollectorDeviceMapperMultipathConfig. +func (in *NodeExporterCollectorDeviceMapperMultipathConfig) DeepCopy() *NodeExporterCollectorDeviceMapperMultipathConfig { + if in == nil { + return nil + } + out := new(NodeExporterCollectorDeviceMapperMultipathConfig) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *NodeExporterCollectorEthtoolConfig) DeepCopyInto(out *NodeExporterCollectorEthtoolConfig) { *out = *in @@ -1101,6 +1120,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 @@ -1236,6 +1271,22 @@ func (in *NodeExporterCollectorTcpStatConfig) DeepCopy() *NodeExporterCollectorT return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NodeExporterCollectorZoneinfoConfig) DeepCopyInto(out *NodeExporterCollectorZoneinfoConfig) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeExporterCollectorZoneinfoConfig. +func (in *NodeExporterCollectorZoneinfoConfig) DeepCopy() *NodeExporterCollectorZoneinfoConfig { + if in == nil { + return nil + } + out := new(NodeExporterCollectorZoneinfoConfig) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *NodeExporterConfig) DeepCopyInto(out *NodeExporterConfig) { *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 36a7803bf2f7..e7e61f445045 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 @@ -230,6 +230,11 @@ func (in NodeExporterCollectorCpufreqConfig) OpenAPIModelName() string { return "com.github.openshift.api.config.v1alpha1.NodeExporterCollectorCpufreqConfig" } +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in NodeExporterCollectorDeviceMapperMultipathConfig) OpenAPIModelName() string { + return "com.github.openshift.api.config.v1alpha1.NodeExporterCollectorDeviceMapperMultipathConfig" +} + // OpenAPIModelName returns the OpenAPI model name for this type. func (in NodeExporterCollectorEthtoolConfig) OpenAPIModelName() string { return "com.github.openshift.api.config.v1alpha1.NodeExporterCollectorEthtoolConfig" @@ -245,6 +250,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" @@ -285,6 +295,11 @@ func (in NodeExporterCollectorTcpStatConfig) OpenAPIModelName() string { return "com.github.openshift.api.config.v1alpha1.NodeExporterCollectorTcpStatConfig" } +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in NodeExporterCollectorZoneinfoConfig) OpenAPIModelName() string { + return "com.github.openshift.api.config.v1alpha1.NodeExporterCollectorZoneinfoConfig" +} + // OpenAPIModelName returns the OpenAPI model name for this type. func (in NodeExporterConfig) OpenAPIModelName() string { return "com.github.openshift.api.config.v1alpha1.NodeExporterConfig" 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 8f6cda1915a8..2c20659cac14 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 @@ -344,18 +344,21 @@ func (NodeExporterCollectorBuddyInfoConfig) SwaggerDoc() map[string]string { } var map_NodeExporterCollectorConfig = map[string]string{ - "": "NodeExporterCollectorConfig defines settings for individual collectors of the node-exporter agent. Each collector can be individually set to collect or not collect metrics. At least one collector must be specified.", - "cpuFreq": "cpuFreq configures the cpufreq collector, which collects CPU frequency statistics. cpuFreq 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. Consider enabling when you need to observe CPU frequency scaling; expect higher CPU usage on many-core nodes when collectionPolicy is Collect.", - "tcpStat": "tcpStat configures the tcpstat collector, which collects TCP connection statistics. tcpStat 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 debugging TCP connection behavior or capacity at the node level.", - "ethtool": "ethtool configures the ethtool collector, which collects ethernet device statistics. ethtool 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 NIC driver-level ethtool metrics beyond generic netdev counters.", - "netDev": "netDev configures the netdev collector, which collects network device statistics. netDev 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. Turn off if you must reduce per-interface metric cardinality on hosts with many virtual interfaces.", - "netClass": "netClass configures the netclass collector, which collects information about network devices. netClass 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 with netlink mode active. Use statsGatherer when sysfs vs netlink implementation matters or when matching node_exporter tuning.", - "buddyInfo": "buddyInfo configures the buddyinfo collector, which collects statistics about memory fragmentation from the node_buddyinfo_blocks metric. This metric collects data from /proc/buddyinfo. buddyInfo 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 investigating kernel memory fragmentation; typically for advanced troubleshooting only.", - "mountStats": "mountStats configures the mountstats collector, which collects statistics about NFS volume I/O activities. mountStats 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. Enabling this collector may produce metrics with high cardinality. If you enable this collector, closely monitor the prometheus-k8s deployment for excessive memory usage. Enable when you care about per-mount NFS client statistics.", - "ksmd": "ksmd configures the ksmd collector, which collects statistics from the kernel same-page merger daemon. ksmd 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 on nodes where KSM is in use and you want visibility into merging activity.", - "processes": "processes configures the processes collector, which collects statistics from processes and threads running in the system. processes 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 for process/thread-level insight; can be expensive on busy nodes.", - "systemd": "systemd configures the systemd collector, which collects statistics on the systemd daemon and its managed services. systemd 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. Enabling this collector with a long list of selected units may produce metrics with high cardinality. If you enable this collector, closely monitor the prometheus-k8s deployment for excessive memory usage. Enable when you need metrics for specific units; scope units carefully.", - "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.", + "": "NodeExporterCollectorConfig defines settings for individual collectors of the node-exporter agent. Each collector can be individually set to collect or not collect metrics. At least one collector must be specified.", + "cpuFreq": "cpuFreq configures the cpufreq collector, which collects CPU frequency statistics. cpuFreq 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. Consider enabling when you need to observe CPU frequency scaling; expect higher CPU usage on many-core nodes when collectionPolicy is Collect.", + "tcpStat": "tcpStat configures the tcpstat collector, which collects TCP connection statistics. tcpStat 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 debugging TCP connection behavior or capacity at the node level.", + "ethtool": "ethtool configures the ethtool collector, which collects ethernet device statistics. ethtool 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 NIC driver-level ethtool metrics beyond generic netdev counters.", + "netDev": "netDev configures the netdev collector, which collects network device statistics. netDev 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. Turn off if you must reduce per-interface metric cardinality on hosts with many virtual interfaces.", + "netClass": "netClass configures the netclass collector, which collects information about network devices. netClass 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 with netlink mode active. Use statsGatherer when sysfs vs netlink implementation matters or when matching node_exporter tuning.", + "buddyInfo": "buddyInfo configures the buddyinfo collector, which collects statistics about memory fragmentation from the node_buddyinfo_blocks metric. This metric collects data from /proc/buddyinfo. buddyInfo 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 investigating kernel memory fragmentation; typically for advanced troubleshooting only.", + "mountStats": "mountStats configures the mountstats collector, which collects statistics about NFS volume I/O activities. mountStats 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. Enabling this collector may produce metrics with high cardinality. If you enable this collector, closely monitor the prometheus-k8s deployment for excessive memory usage. Enable when you care about per-mount NFS client statistics.", + "ksmd": "ksmd configures the ksmd collector, which collects statistics from the kernel same-page merger daemon. ksmd 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 on nodes where KSM is in use and you want visibility into merging activity.", + "processes": "processes configures the processes collector, which collects statistics from processes and threads running in the system. processes 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 for process/thread-level insight; can be expensive on busy nodes.", + "systemd": "systemd configures the systemd collector, which collects statistics on the systemd daemon and its managed services. systemd 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. Enabling this collector with a long list of selected units may produce metrics with high cardinality. If you enable this collector, closely monitor the prometheus-k8s deployment for excessive memory usage. Enable when you need metrics for specific units; scope units carefully.", + "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.", } func (NodeExporterCollectorConfig) SwaggerDoc() map[string]string { @@ -371,6 +374,15 @@ func (NodeExporterCollectorCpufreqConfig) SwaggerDoc() map[string]string { return map_NodeExporterCollectorCpufreqConfig } +var map_NodeExporterCollectorDeviceMapperMultipathConfig = map[string]string{ + "": "NodeExporterCollectorDeviceMapperMultipathConfig provides configuration for the dmmultipath collector of the node-exporter agent. The dmmultipath collector collects statistics about DM-Multipath devices. It is enabled by default.", + "collectionPolicy": "collectionPolicy declares whether the dmmultipath collector collects metrics. This field is required. Valid values are \"Collect\" and \"DoNotCollect\". When set to \"Collect\", the dmmultipath collector is active and DM-Multipath device statistics are collected. When set to \"DoNotCollect\", the dmmultipath collector is inactive and the corresponding metrics become unavailable.", +} + +func (NodeExporterCollectorDeviceMapperMultipathConfig) SwaggerDoc() map[string]string { + return map_NodeExporterCollectorDeviceMapperMultipathConfig +} + var map_NodeExporterCollectorEthtoolConfig = map[string]string{ "": "NodeExporterCollectorEthtoolConfig provides configuration for the ethtool collector of the node-exporter agent. The ethtool collector collects ethernet device statistics. It is disabled by default.", "collectionPolicy": "collectionPolicy declares whether the ethtool collector collects metrics. This field is required. Valid values are \"Collect\" and \"DoNotCollect\". When set to \"Collect\", the ethtool collector is active and ethernet device statistics are collected. When set to \"DoNotCollect\", the ethtool collector is inactive.", @@ -398,6 +410,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.", @@ -472,6 +493,15 @@ func (NodeExporterCollectorTcpStatConfig) SwaggerDoc() map[string]string { return map_NodeExporterCollectorTcpStatConfig } +var map_NodeExporterCollectorZoneinfoConfig = map[string]string{ + "": "NodeExporterCollectorZoneinfoConfig provides configuration for the zoneinfo collector of the node-exporter agent. The zoneinfo collector exposes per-zone memory page counts, watermarks, and protection thresholds from /proc/zoneinfo. By default, the zoneinfo collector does not collect metrics.", + "collectionPolicy": "collectionPolicy declares whether the zoneinfo collector collects metrics. This field is required. Valid values are \"Collect\" and \"DoNotCollect\". When set to \"Collect\", the zoneinfo collector is active and zone memory statistics are collected. When set to \"DoNotCollect\", the zoneinfo collector is inactive.", +} + +func (NodeExporterCollectorZoneinfoConfig) SwaggerDoc() map[string]string { + return map_NodeExporterCollectorZoneinfoConfig +} + var map_NodeExporterConfig = map[string]string{ "": "NodeExporterConfig provides configuration options for the node-exporter agent that runs as a DaemonSet in the `openshift-monitoring` namespace. The node-exporter agent collects hardware and OS-level metrics from every node in the cluster, including CPU, memory, disk, and network statistics. At least one field must be specified.", "resources": "resources defines the compute resource requests and limits for the node-exporter container. This includes CPU, memory and HugePages constraints to help control scheduling and resource usage. When not specified, defaults are used by the platform. Requests cannot exceed limits. This field is optional. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ This is a simplified API that maps to Kubernetes ResourceRequirements. The current default values are:\n resources:\n - name: cpu\n request: 8m\n limit: null\n - name: memory\n request: 32Mi\n limit: null", @@ -635,6 +665,7 @@ var map_RemoteWriteSpec = map[string]string{ "": "RemoteWriteSpec represents configuration for remote write endpoints.", "url": "url is the URL of the remote write endpoint. Must be a valid URL with http or https scheme and a non-empty hostname. Query parameters, fragments, and user information (e.g. user:password@host) are not allowed. Empty string is invalid. Must be between 1 and 2048 characters in length.", "name": "name is a required identifier for this remote write configuration (name is the list key for the remoteWrite list). This name is used in metrics and logging to differentiate remote write queues. Must contain only alphanumeric characters, hyphens, and underscores. Must be between 1 and 63 characters in length.", + "messageVersion": "messageVersion defines the Remote Write message's version to use when writing to the endpoint. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The default value is \"V1.0\". When set to \"V1.0\", Prometheus uses the `prometheus.WriteRequest` protobuf message introduced in Remote Write 1.0. When set to \"V2.0\", Prometheus uses the `io.prometheus.write.v2.Request` protobuf message introduced in Remote Write 2.0.", "authorization": "authorization defines the authorization method for the remote write endpoint. When omitted, no authorization is performed. When set, type must be one of Authorization, BasicAuth, OAuth2, SigV4, or ServiceAccount; the corresponding nested config must be set (ServiceAccount has no config).", "headers": "headers specifies the custom HTTP headers to be sent along with each remote write request. Sending custom headers makes the configuration of a proxy in between optional and helps the receiver recognize the given source better. Clients MAY allow users to send custom HTTP headers; they MUST NOT allow users to configure them in such a way as to send reserved headers. Headers set by Prometheus cannot be overwritten. When omitted, no custom headers are sent. Maximum of 50 headers can be specified. Each header name must be unique. Each header name must contain only alphanumeric characters, hyphens, and underscores, and must not be a reserved Prometheus header (Host, Authorization, Content-Encoding, Content-Type, X-Prometheus-Remote-Write-Version, User-Agent, Connection, Keep-Alive, Proxy-Authenticate, Proxy-Authorization, WWW-Authenticate).", "metadataConfig": "metadataConfig configures the sending of series metadata to remote storage. When omitted, no metadata is sent. When set to sendPolicy: Default, metadata is sent using platform-chosen defaults (e.g. send interval 30 seconds). When set to sendPolicy: Custom, metadata is sent using the settings in the custom field (e.g. custom.sendIntervalSeconds).", diff --git a/vendor/github.com/openshift/api/envtest-releases.yaml b/vendor/github.com/openshift/api/envtest-releases.yaml index ea376ded55eb..4705c327e0be 100644 --- a/vendor/github.com/openshift/api/envtest-releases.yaml +++ b/vendor/github.com/openshift/api/envtest-releases.yaml @@ -116,3 +116,16 @@ releases: envtest-v1.35.1-linux-arm64.tar.gz: hash: 309308f9c66f9e2e5192c65a333a388faaaa903841f26f8a96b8f13a5eb3039bcbb818ef6ddbb5803a9cfa9b25e37249a0aed5d472badb25539696569923f87f selfLink: https://storage.googleapis.com/openshift-kubebuilder-tools/envtest-v1.35.1-linux-arm64.tar.gz + v1.36.2: + envtest-v1.36.2-darwin-amd64.tar.gz: + hash: ca924b4435784f12ac3c2513a78d9c6527bb83f2cece48e07d017616843cb67d2ec5836b7a83818f8817c3e0b4de1319c55ead061f3e41c05553a40bf240017a + selfLink: https://storage.googleapis.com/openshift-kubebuilder-tools/envtest-v1.36.2-darwin-amd64.tar.gz + envtest-v1.36.2-darwin-arm64.tar.gz: + hash: f5e45f660fb2abb05a55093bfd3f9594ca91b074a86126112b4645d463bc4b0e0b10261da26420c4dfbef18d189ab92da6c881c347159541481185e157d37d92 + selfLink: https://storage.googleapis.com/openshift-kubebuilder-tools/envtest-v1.36.2-darwin-arm64.tar.gz + envtest-v1.36.2-linux-amd64.tar.gz: + hash: 4322b73b1d43c7a16fb46819d2e8a95e34ab2412bcc502c75231c61bdd799a2b43916e12c11f5f0251573260e60a641e34f67e81da37d2726abfcca1720b1e73 + selfLink: https://storage.googleapis.com/openshift-kubebuilder-tools/envtest-v1.36.2-linux-amd64.tar.gz + envtest-v1.36.2-linux-arm64.tar.gz: + hash: bbe6810d76c91349cdee6daf65a6a9289010d48ddc2c42d9e163897a927b6ff7de9d0addc75bd54721cfa5048f8aafcac06a950efa59f4a686f037d1386811de + selfLink: https://storage.googleapis.com/openshift-kubebuilder-tools/envtest-v1.36.2-linux-arm64.tar.gz diff --git a/vendor/github.com/openshift/api/features.md b/vendor/github.com/openshift/api/features.md index c78d402696af..c89925276f6d 100644 --- a/vendor/github.com/openshift/api/features.md +++ b/vendor/github.com/openshift/api/features.md @@ -13,26 +13,23 @@ | KarpenterOperator| | | | Enabled | | | | | | MutableTopology| | | | Enabled | | | | | | AuthenticationComponentProxy| | | | Enabled | | | | Enabled | +| BGPBasedVIPManagement| | | Enabled | Enabled | | | | | | ClusterAPIComputeInstall| | | Enabled | Enabled | | | | | | ClusterAPIControlPlaneInstall| | | Enabled | Enabled | | | | | | ClusterUpdatePreflight| | | Enabled | Enabled | | | | | | ConfidentialCluster| | | Enabled | Enabled | | | | | | Example2| | | Enabled | Enabled | | | | | +| GCPSovereignCloudInstall| | | Enabled | Enabled | | | | | | MachineAPIMigrationVSphere| | | Enabled | Enabled | | | | | | NetworkConnect| | | Enabled | Enabled | | | | | | NewOLMBoxCutterRuntime| | | | Enabled | | | | Enabled | | NewOLMCatalogdAPIV1Metas| | | | Enabled | | | | Enabled | | NewOLMConfigAPI| | | | Enabled | | | | Enabled | | NewOLMOwnSingleNamespace| | | | Enabled | | | | Enabled | -| NewOLMPreflightPermissionChecks| | | | Enabled | | | | Enabled | -| NoRegistryClusterInstall| | | | Enabled | | | | Enabled | -| OLMLifecycleAndCompatibility| | | | Enabled | | | | Enabled | | ProvisioningRequestAvailable| | | Enabled | Enabled | | | | | | AWSClusterHostedDNS| | | Enabled | Enabled | | | Enabled | Enabled | | AWSDedicatedHosts| | | Enabled | Enabled | | | Enabled | Enabled | -| AWSDualStackInstall| | | 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 | @@ -40,7 +37,7 @@ | BootcNodeManagement| | | Enabled | Enabled | | | Enabled | Enabled | | CBORServingAndStorage| | | Enabled | Enabled | | | Enabled | Enabled | | CRDCompatibilityRequirementOperator| | | Enabled | Enabled | | | Enabled | Enabled | -| CRIOCredentialProviderConfig| | | Enabled | Enabled | | | Enabled | Enabled | +| CRIOCredentialProviderConfig| | Enabled | | Enabled | | Enabled | | Enabled | | ClientsPreferCBOR| | | Enabled | Enabled | | | Enabled | Enabled | | ClusterAPIInstallIBMCloud| | | Enabled | Enabled | | | Enabled | Enabled | | ClusterAPIMachineManagement| | | Enabled | Enabled | | | Enabled | Enabled | @@ -65,12 +62,10 @@ | GCPCustomAPIEndpoints| | | Enabled | Enabled | | | Enabled | Enabled | | GCPCustomAPIEndpointsInstall| | | Enabled | Enabled | | | Enabled | Enabled | | GCPDualStackInstall| | | Enabled | Enabled | | | Enabled | Enabled | +| GatewayAPIManagementMode| | | Enabled | Enabled | | | Enabled | Enabled | | HyperShiftOnlyDynamicResourceAllocation| Enabled | | Enabled | | Enabled | | Enabled | | | ImageModeStatusReporting| | | Enabled | Enabled | | | Enabled | Enabled | | IngressComponentRouteLabels| | | Enabled | Enabled | | | Enabled | Enabled | -| IngressControllerDynamicConfigurationManager| | | Enabled | Enabled | | | Enabled | Enabled | -| IngressControllerMultipleHAProxyVersions| | | Enabled | Enabled | | | Enabled | Enabled | -| IrreconcilableMachineConfig| | | Enabled | Enabled | | | Enabled | Enabled | | KMSEncryption| | | Enabled | Enabled | | | Enabled | Enabled | | MachineAPIMigration| | | Enabled | Enabled | | | Enabled | Enabled | | MachineAPIMigrationAWS| | | Enabled | Enabled | | | Enabled | Enabled | @@ -83,7 +78,9 @@ | NewOLM| | Enabled | | Enabled | | Enabled | | Enabled | | NewOLMWebhookProviderOpenshiftServiceCA| | Enabled | | Enabled | | Enabled | | Enabled | | NoOverlayMode| | | Enabled | Enabled | | | Enabled | Enabled | +| NoRegistryClusterInstall| | Enabled | | Enabled | | Enabled | | Enabled | | NutanixMultiSubnets| | | Enabled | Enabled | | | Enabled | Enabled | +| OLMLifecycleAndCompatibility| | Enabled | | Enabled | | Enabled | | Enabled | | OVNObservability| | | Enabled | Enabled | | | Enabled | Enabled | | OnPremDNSRecords| | | Enabled | Enabled | | | Enabled | Enabled | | SELinuxMount| | | Enabled | Enabled | | | Enabled | Enabled | @@ -96,7 +93,9 @@ | 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 | @@ -107,15 +106,17 @@ | ExternalOIDCWithUIDAndExtraClaimMappings| 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 | | OpenShiftPodSecurityAdmission| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | -| RouteExternalCertificate| 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 | diff --git a/vendor/github.com/openshift/api/features/features.go b/vendor/github.com/openshift/api/features/features.go index b45bef770563..591b6147b1b0 100644 --- a/vendor/github.com/openshift/api/features/features.go +++ b/vendor/github.com/openshift/api/features/features.go @@ -159,7 +159,7 @@ var ( contactPerson("QiWang"). productScope(ocpSpecific). enhancementPR("https://github.com/openshift/enhancements/pull/1861"). - enable(inDevPreviewNoUpgrade(), inTechPreviewNoUpgrade()). + enable(inClusterProfile(SelfManaged), inDefault(), inOKD(), inDevPreviewNoUpgrade(), inTechPreviewNoUpgrade()). mustRegister() FeatureGateVSphereHostVMGroupZonal = newFeatureGate("VSphereHostVMGroupZonal"). @@ -178,14 +178,6 @@ var ( enable(inDefault(), inOKD(), inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). mustRegister() - FeatureGateRouteExternalCertificate = newFeatureGate("RouteExternalCertificate"). - reportProblemsToJiraComponent("router"). - contactPerson("chiragkyal"). - productScope(ocpSpecific). - enhancementPR(legacyFeatureGateWithoutEnhancement). - enable(inDefault(), inOKD(), inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - FeatureGateNetworkConnect = newFeatureGate("NetworkConnect"). reportProblemsToJiraComponent("Networking/ovn-kubernetes"). contactPerson("tssurya"). @@ -325,7 +317,7 @@ var ( contactPerson("saschagrunert"). productScope(ocpSpecific). enhancementPR("https://github.com/openshift/enhancements/pull/1934"). - enable(inDevPreviewNoUpgrade(), inTechPreviewNoUpgrade()). + enable(inDefault(), inOKD(), inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). mustRegister() FeatureGateUpgradeStatus = newFeatureGate("UpgradeStatus"). @@ -424,14 +416,6 @@ var ( enable(inClusterProfile(SelfManaged), inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). mustRegister() - FeatureGateNewOLMPreflightPermissionChecks = newFeatureGate("NewOLMPreflightPermissionChecks"). - reportProblemsToJiraComponent("olm"). - contactPerson("tshort"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1768"). - enable(inClusterProfile(SelfManaged), inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - FeatureGateNewOLMOwnSingleNamespace = newFeatureGate("NewOLMOwnSingleNamespace"). reportProblemsToJiraComponent("olm"). contactPerson("nschieder"). @@ -469,7 +453,7 @@ var ( contactPerson("joelanford"). productScope(ocpSpecific). enhancementPR("https://github.com/openshift/enhancements/pull/1991"). - enable(inClusterProfile(SelfManaged), inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). + enable(inDefault(), inOKD(), inClusterProfile(SelfManaged), inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). mustRegister() FeatureGateInsightsOnDemandDataGather = newFeatureGate("InsightsOnDemandDataGather"). @@ -663,7 +647,7 @@ var ( contactPerson("miciah"). productScope(ocpSpecific). enhancementPR("https://github.com/openshift/enhancements/pull/1687"). - enable(inDevPreviewNoUpgrade(), inTechPreviewNoUpgrade()). + enable(inDefault(), inOKD(), inDevPreviewNoUpgrade(), inTechPreviewNoUpgrade()). mustRegister() FeatureGateIngressComponentRouteLabels = newFeatureGate("IngressComponentRouteLabels"). @@ -679,7 +663,7 @@ var ( contactPerson("miciah"). productScope(ocpSpecific). enhancementPR("https://github.com/openshift/enhancements/pull/1965"). - enable(inDevPreviewNoUpgrade(), inTechPreviewNoUpgrade()). + enable(inDefault(), inOKD(), inDevPreviewNoUpgrade(), inTechPreviewNoUpgrade()). mustRegister() FeatureGateMinimumKubeletVersion = newFeatureGate("MinimumKubeletVersion"). @@ -838,7 +822,7 @@ var ( contactPerson("andfasano"). productScope(ocpSpecific). enhancementPR("https://github.com/openshift/enhancements/pull/1821"). - enable(inClusterProfile(SelfManaged), inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). + enable(inDefault(), inOKD(), inClusterProfile(SelfManaged), inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). mustRegister() FeatureGateAWSClusterHostedDNSInstall = newFeatureGate("AWSClusterHostedDNSInstall"). @@ -862,14 +846,14 @@ var ( contactPerson("pabrodri"). productScope(ocpSpecific). enhancementPR("https://github.com/openshift/enhancements/pull/1785"). - enable(inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). + enable(inDefault(), inOKD(), inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). mustRegister() FeatureGateAWSDualStackInstall = newFeatureGate("AWSDualStackInstall"). reportProblemsToJiraComponent("Installer"). contactPerson("sadasu"). productScope(ocpSpecific). enhancementPR("https://github.com/openshift/enhancements/pull/1806"). - enable(inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). + enable(inDefault(), inOKD(), inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). mustRegister() FeatureGateAzureDualStackInstall = newFeatureGate("AzureDualStackInstall"). @@ -888,6 +872,14 @@ var ( enable(inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). mustRegister() + FeatureGateGCPSovereignCloudInstall = newFeatureGate("GCPSovereignCloudInstall"). + reportProblemsToJiraComponent("Installer"). + contactPerson("barbacbd"). + productScope(ocpSpecific). + enhancementPR("https://github.com/openshift/enhancements/pull/1977"). + enable(inDevPreviewNoUpgrade()). + mustRegister() + FeatureCBORServingAndStorage = newFeatureGate("CBORServingAndStorage"). reportProblemsToJiraComponent("kube-apiserver"). contactPerson("benluddy"). @@ -950,6 +942,14 @@ var ( enable(inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). mustRegister() + FeatureGateBGPBasedVIPManagement = newFeatureGate("BGPBasedVIPManagement"). + reportProblemsToJiraComponent("Networking / On-Prem Networking"). + contactPerson("mkowalski"). + productScope(ocpSpecific). + enhancementPR("https://github.com/openshift/enhancements/pull/1982"). + enable(inDevPreviewNoUpgrade()). + mustRegister() + FeatureGateProvisioningRequestAvailable = newFeatureGate("ProvisioningRequestAvailable"). reportProblemsToJiraComponent("Cluster Autoscaler"). contactPerson("elmiko"). @@ -1006,6 +1006,14 @@ var ( enable(inDefault(), inOKD(), inDevPreviewNoUpgrade(), inTechPreviewNoUpgrade()). mustRegister() + FeatureGateGatewayAPIManagementMode = newFeatureGate("GatewayAPIManagementMode"). + reportProblemsToJiraComponent("Routing"). + contactPerson("miciah"). + productScope(ocpSpecific). + enhancementPR("https://github.com/openshift/enhancements/pull/2023"). + enable(inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). + mustRegister() + FeatureGateTLSAdherence = newFeatureGate("TLSAdherence"). reportProblemsToJiraComponent("HPCASE / TLS Adherence"). contactPerson("joelanford"). diff --git a/vendor/github.com/openshift/api/features/legacyfeaturegates.go b/vendor/github.com/openshift/api/features/legacyfeaturegates.go index a82089b9f720..53b8962a282a 100644 --- a/vendor/github.com/openshift/api/features/legacyfeaturegates.go +++ b/vendor/github.com/openshift/api/features/legacyfeaturegates.go @@ -83,8 +83,6 @@ var legacyFeatureGates = sets.New( // never add to this list, if you think you have an exception ask @deads2k "PrivateHostedZoneAWS", // never add to this list, if you think you have an exception ask @deads2k - "RouteExternalCertificate", - // never add to this list, if you think you have an exception ask @deads2k "SetEIPForNLBIngressController", // never add to this list, if you think you have an exception ask @deads2k "SignatureStores", diff --git a/vendor/github.com/openshift/api/machineconfiguration/v1/types.go b/vendor/github.com/openshift/api/machineconfiguration/v1/types.go index 33c12be92355..5c4f6804eea7 100644 --- a/vendor/github.com/openshift/api/machineconfiguration/v1/types.go +++ b/vendor/github.com/openshift/api/machineconfiguration/v1/types.go @@ -113,6 +113,19 @@ type ControllerConfigSpec struct { // +required Images map[string]string `json:"images"` + // bgpVIPPeersJSON carries the BGP VIP peer configuration (the config.json + // payload of the bgp-vip-config ConfigMap) for rendering the frr-k8s + // static pod peer file on control plane nodes. Only set when BGP-based + // VIP management is enabled. + // When omitted, BGP-based VIP management is not configured and no + // frr-k8s peer file is rendered. + // When set, the value must be between 1 and 65536 characters long. + // +openshift:enable:FeatureGate=BGPBasedVIPManagement + // +kubebuilder:validation:MinLength=1 + // +kubebuilder:validation:MaxLength=65536 + // +optional + BGPVIPPeersJSON string `json:"bgpVIPPeersJSON,omitempty"` + // baseOSContainerImage is the new-format container image for operating system updates. // +required BaseOSContainerImage string `json:"baseOSContainerImage"` 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 6eb9f97c6a76..7e977bb53b91 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 @@ -33,8 +33,10 @@ controllerconfigs.machineconfiguration.openshift.io: - AWSDualStackInstall - AWSEuropeanSovereignCloudInstall - AzureDualStackInstall + - BGPBasedVIPManagement - DualReplica - DyanmicServiceEndpointIBMCloud + - GCPSovereignCloudInstall - MutableTopology - NutanixMultiSubnets - OnPremDNSRecords 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 aac65c9acbc9..198c2b9a6deb 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 @@ -162,6 +162,7 @@ var map_ControllerConfigSpec = map[string]string{ "pullSecret": "pullSecret is the default pull secret that needs to be installed on all machines.", "internalRegistryPullSecret": "internalRegistryPullSecret is the pull secret for the internal registry, used by rpm-ostree to pull images from the internal registry if present", "images": "images is map of images that are used by the controller to render templates under ./templates/", + "bgpVIPPeersJSON": "bgpVIPPeersJSON carries the BGP VIP peer configuration (the config.json payload of the bgp-vip-config ConfigMap) for rendering the frr-k8s static pod peer file on control plane nodes. Only set when BGP-based VIP management is enabled. When omitted, BGP-based VIP management is not configured and no frr-k8s peer file is rendered. When set, the value must be between 1 and 65536 characters long.", "baseOSContainerImage": "baseOSContainerImage is the new-format container image for operating system updates.", "baseOSExtensionsContainerImage": "baseOSExtensionsContainerImage is the matching extensions container for the new-format container", "osImageURL": "osImageURL is the old-format container image that contains the OS update payload.", diff --git a/vendor/github.com/openshift/api/operator/v1/types.go b/vendor/github.com/openshift/api/operator/v1/types.go index 3a2141abb98f..599ceb03e108 100644 --- a/vendor/github.com/openshift/api/operator/v1/types.go +++ b/vendor/github.com/openshift/api/operator/v1/types.go @@ -266,6 +266,18 @@ type NodeStatus struct { // +required NodeName string `json:"nodeName"` + // nodeUID is the UID of the node. + // This field is used to detect that a node has been deleted and recreated + // with the same name. When the UID changes, it indicates the node is a + // new instance and the controller should treat this status entry as stale. + // When omitted, UID-based node replacement detection is not available + // for this entry. + // +kubebuilder:validation:MinLength=36 + // +kubebuilder:validation:MaxLength=36 + // +kubebuilder:validation:Format=uuid + // +optional + NodeUID string `json:"nodeUID,omitempty"` + // currentRevision is the generation of the most recently successful deployment. // Can not be set on creation of a nodeStatus. Updates must only increase the value. // +kubebuilder:validation:XValidation:rule="self >= oldSelf",message="must only increase" diff --git a/vendor/github.com/openshift/api/operator/v1/types_kmsencryption.go b/vendor/github.com/openshift/api/operator/v1/types_kmsencryption.go index a5dcf7d334e6..51a981b71655 100644 --- a/vendor/github.com/openshift/api/operator/v1/types_kmsencryption.go +++ b/vendor/github.com/openshift/api/operator/v1/types_kmsencryption.go @@ -15,11 +15,10 @@ const ( KMSPluginHealthStatusError KMSPluginHealthStatus = "Error" ) -// +openshift:compatibility-gen:level=1 type KMSPluginHealthReport struct { // nodeName is the name of the node this instance of the plugin runs on. - // The combination of nodeName and keyId makes this health report unique. + // The combination of nodeName and keyID makes this health report unique. // The value must be a valid Kubernetes node name: a lowercase RFC 1123 subdomain // consisting of lowercase alphanumeric characters, '-' or '.', starting and ending with // an alphanumeric character, and be at most 253 characters in length. @@ -29,13 +28,24 @@ type KMSPluginHealthReport struct { // +required NodeName string `json:"nodeName,omitempty"` + // keyID is the encryption-key-secret id (kms-{keyID}.sock), a unique identifier of the plugin on that node. + // This is not a cryptographic key used to encrypt/decrypt any resources. + // The value must be between 1 and 512 characters. + // +kubebuilder:validation:MinLength=1 + // +kubebuilder:validation:MaxLength=512 + // +required + KeyID string `json:"keyID,omitempty"` + + // --- TOMBSTONE --- // keyId is the encryption-key-secret id (kms-{keyId}.sock), a unique identifier of the plugin on that node. // This is not a cryptographic key used to encrypt/decrypt any resources. // The value must be between 1 and 512 characters. + // It has been renamed to keyID. + // The field name is reserved to prevent reuse. // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=512 // +required - KeyId string `json:"keyId,omitempty"` + // KeyId string `json:"keyId,omitempty"` // status contains a health indicator for the respective KMS plugin // The field can have three states: healthy, unhealthy, error. @@ -47,13 +57,24 @@ type KMSPluginHealthReport struct { // +required LastCheckedTime metav1.Time `json:"lastCheckedTime,omitempty"` + // remoteKeyID refers to the remote key identifier from KMS v2 StatusResponse.key_id. + // This is not a cryptographic key, but a unique representation of the KEK. + // The value must be between 1 and 1024 characters. + // +kubebuilder:validation:MinLength=1 + // +kubebuilder:validation:MaxLength=1024 + // +required + RemoteKeyID string `json:"remoteKeyID,omitempty"` + + // --- TOMBSTONE --- // kekId refers to the remote KEK id from KMS v2 StatusResponse.key_id. // This is not a cryptographic key, but a unique representation of the KEK. // The value must be between 1 and 1024 characters. + // It has been renamed to remoteKeyID. + // The field name is reserved to prevent reuse. // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=1024 // +required - KEKId string `json:"kekId,omitempty"` + // KEKId string `json:"kekId,omitempty"` // detail contains additional error/health information for the respective KMS plugin. // When omitted, no additional error or health information is provided. @@ -69,12 +90,82 @@ type KMSPluginHealthReport struct { type KMSEncryptionStatus struct { // healthReports contains all KMS plugin health reports. // When omitted, no health reports are available. - // Each entry must have a unique combination of nodeName and keyId. + // Each entry must have a unique combination of nodeName and keyID. // +optional // +kubebuilder:validation:MinItems=1 // +kubebuilder:validation:MaxItems=200 // +listType=map // +listMapKey=nodeName - // +listMapKey=keyId + // +listMapKey=keyID HealthReports []KMSPluginHealthReport `json:"healthReports,omitempty"` + + // preflight contains the state of KMS preflight validation for this operator. + // The preflight validates the KMS provider configuration before it is used + // to create a new encryption key, catching configuration issues early such + // as incorrect login credentials or an unreachable Vault service. + // When omitted, no preflight validation is in progress. + // +optional + Preflight KMSPreflightCheck `json:"preflight,omitzero"` +} + +// KMSPreflightCheck describes a preflight validation request and its result. +// +// +kubebuilder:validation:MinProperties=1 +type KMSPreflightCheck struct { + // observedConfigHash is a hash of the KMS provider configuration and + // its referenced resources that has been observed and requires preflight + // validation before a new encryption key can be created. + // The value must be exactly 8 characters. + // +kubebuilder:validation:MinLength=8 + // +kubebuilder:validation:MaxLength=8 + // +kubebuilder:validation:XValidation:rule="self.matches('^[A-Za-z0-9_-]*={0,2}$')",message="must be a valid base64url encoded value" + // +required + ObservedConfigHash string `json:"observedConfigHash,omitempty"` + + // result contains the outcome of the most recent preflight check. + // Preflight is considered passed when result.status is Succeeded and + // result.configHash matches observedConfigHash. + // When omitted, no preflight check result has been reported yet. + // +optional + Result KMSPreflightResult `json:"result,omitzero"` +} + +// +kubebuilder:validation:Enum=Succeeded;Failed +type KMSPreflightResultStatus string + +const ( + KMSPreflightResultSucceeded KMSPreflightResultStatus = "Succeeded" + + KMSPreflightResultFailed KMSPreflightResultStatus = "Failed" +) + +// KMSPreflightResult contains the outcome of a preflight validation. +// +// +openshift:compatibility-gen:level=1 +type KMSPreflightResult struct { + // status indicates the outcome of the preflight check. + // Succeeded means the KMS plugin responded to Status, Encrypt, and + // Decrypt calls successfully. + // Failed means the validation did not pass. + // +required + Status KMSPreflightResultStatus `json:"status,omitempty"` + + // configHash is the hash of the configuration that was validated. + // This is compared against observedConfigHash to confirm the result + // corresponds to the current configuration. + // The value must be exactly 8 characters. + // +kubebuilder:validation:MinLength=8 + // +kubebuilder:validation:MaxLength=8 + // +kubebuilder:validation:XValidation:rule="self.matches('^[A-Za-z0-9_-]*={0,2}$')",message="must be a valid base64url encoded value" + // +required + ConfigHash string `json:"configHash,omitempty"` + + // remoteKeyID is the remote key encryption key identifier from KMS v2 + // StatusResponse.key_id. This is not a cryptographic key, but a unique + // representation of the remote key used to encrypt data. + // The value must be between 1 and 1024 characters. + // +kubebuilder:validation:MinLength=1 + // +kubebuilder:validation:MaxLength=1024 + // +required + RemoteKeyID string `json:"remoteKeyID,omitempty"` } diff --git a/vendor/github.com/openshift/api/operator/v1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/operator/v1/zz_generated.deepcopy.go index 3c244a9867ea..8f7441b6c7c7 100644 --- a/vendor/github.com/openshift/api/operator/v1/zz_generated.deepcopy.go +++ b/vendor/github.com/openshift/api/operator/v1/zz_generated.deepcopy.go @@ -2815,6 +2815,7 @@ func (in *KMSEncryptionStatus) DeepCopyInto(out *KMSEncryptionStatus) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + out.Preflight = in.Preflight return } @@ -2845,6 +2846,39 @@ func (in *KMSPluginHealthReport) DeepCopy() *KMSPluginHealthReport { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KMSPreflightCheck) DeepCopyInto(out *KMSPreflightCheck) { + *out = *in + out.Result = in.Result + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KMSPreflightCheck. +func (in *KMSPreflightCheck) DeepCopy() *KMSPreflightCheck { + if in == nil { + return nil + } + out := new(KMSPreflightCheck) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KMSPreflightResult) DeepCopyInto(out *KMSPreflightResult) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KMSPreflightResult. +func (in *KMSPreflightResult) DeepCopy() *KMSPreflightResult { + if in == nil { + return nil + } + out := new(KMSPreflightResult) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *KubeAPIServer) DeepCopyInto(out *KubeAPIServer) { *out = *in diff --git a/vendor/github.com/openshift/api/operator/v1/zz_generated.model_name.go b/vendor/github.com/openshift/api/operator/v1/zz_generated.model_name.go index 271665a7ecab..13ab0c5f6f29 100644 --- a/vendor/github.com/openshift/api/operator/v1/zz_generated.model_name.go +++ b/vendor/github.com/openshift/api/operator/v1/zz_generated.model_name.go @@ -625,6 +625,16 @@ func (in KMSPluginHealthReport) OpenAPIModelName() string { return "com.github.openshift.api.operator.v1.KMSPluginHealthReport" } +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in KMSPreflightCheck) OpenAPIModelName() string { + return "com.github.openshift.api.operator.v1.KMSPreflightCheck" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in KMSPreflightResult) OpenAPIModelName() string { + return "com.github.openshift.api.operator.v1.KMSPreflightResult" +} + // OpenAPIModelName returns the OpenAPI model name for this type. func (in KubeAPIServer) OpenAPIModelName() string { return "com.github.openshift.api.operator.v1.KubeAPIServer" diff --git a/vendor/github.com/openshift/api/operator/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/operator/v1/zz_generated.swagger_doc_generated.go index 114b5c7a689b..27e09161681d 100644 --- a/vendor/github.com/openshift/api/operator/v1/zz_generated.swagger_doc_generated.go +++ b/vendor/github.com/openshift/api/operator/v1/zz_generated.swagger_doc_generated.go @@ -37,6 +37,7 @@ func (MyOperatorResource) SwaggerDoc() map[string]string { var map_NodeStatus = map[string]string{ "": "NodeStatus provides information about the current state of a particular node managed by this operator.", "nodeName": "nodeName is the name of the node", + "nodeUID": "nodeUID is the UID of the node. This field is used to detect that a node has been deleted and recreated with the same name. When the UID changes, it indicates the node is a new instance and the controller should treat this status entry as stale. When omitted, UID-based node replacement detection is not available for this entry.", "currentRevision": "currentRevision is the generation of the most recently successful deployment. Can not be set on creation of a nodeStatus. Updates must only increase the value.", "targetRevision": "targetRevision is the generation of the deployment we're trying to apply. Can not be set on creation of a nodeStatus.", "lastFailedRevision": "lastFailedRevision is the generation of the deployment we tried and failed to deploy.", @@ -1389,7 +1390,8 @@ func (InsightsReport) SwaggerDoc() map[string]string { } var map_KMSEncryptionStatus = map[string]string{ - "healthReports": "healthReports contains all KMS plugin health reports. When omitted, no health reports are available. Each entry must have a unique combination of nodeName and keyId.", + "healthReports": "healthReports contains all KMS plugin health reports. When omitted, no health reports are available. Each entry must have a unique combination of nodeName and keyID.", + "preflight": "preflight contains the state of KMS preflight validation for this operator. The preflight validates the KMS provider configuration before it is used to create a new encryption key, catching configuration issues early such as incorrect login credentials or an unreachable Vault service. When omitted, no preflight validation is in progress.", } func (KMSEncryptionStatus) SwaggerDoc() map[string]string { @@ -1397,11 +1399,11 @@ func (KMSEncryptionStatus) SwaggerDoc() map[string]string { } var map_KMSPluginHealthReport = map[string]string{ - "nodeName": "nodeName is the name of the node this instance of the plugin runs on. The combination of nodeName and keyId makes this health report unique. The value must be a valid Kubernetes node name: a lowercase RFC 1123 subdomain consisting of lowercase alphanumeric characters, '-' or '.', starting and ending with an alphanumeric character, and be at most 253 characters in length.", - "keyId": "keyId is the encryption-key-secret id (kms-{keyId}.sock), a unique identifier of the plugin on that node. This is not a cryptographic key used to encrypt/decrypt any resources. The value must be between 1 and 512 characters.", + "nodeName": "nodeName is the name of the node this instance of the plugin runs on. The combination of nodeName and keyID makes this health report unique. The value must be a valid Kubernetes node name: a lowercase RFC 1123 subdomain consisting of lowercase alphanumeric characters, '-' or '.', starting and ending with an alphanumeric character, and be at most 253 characters in length.", + "keyID": "keyID is the encryption-key-secret id (kms-{keyID}.sock), a unique identifier of the plugin on that node. This is not a cryptographic key used to encrypt/decrypt any resources. The value must be between 1 and 512 characters.", "status": "status contains a health indicator for the respective KMS plugin The field can have three states: healthy, unhealthy, error. With error and unhealthy containing additional information in Detail.", "lastCheckedTime": "lastCheckedTime is a timestamp of when the probe was last checked.", - "kekId": "kekId refers to the remote KEK id from KMS v2 StatusResponse.key_id. This is not a cryptographic key, but a unique representation of the KEK. The value must be between 1 and 1024 characters.", + "remoteKeyID": "remoteKeyID refers to the remote key identifier from KMS v2 StatusResponse.key_id. This is not a cryptographic key, but a unique representation of the KEK. The value must be between 1 and 1024 characters.", "detail": "detail contains additional error/health information for the respective KMS plugin. When omitted, no additional error or health information is provided. When set, the value must be between 1 and 1024 characters.", } @@ -1409,6 +1411,27 @@ func (KMSPluginHealthReport) SwaggerDoc() map[string]string { return map_KMSPluginHealthReport } +var map_KMSPreflightCheck = map[string]string{ + "": "KMSPreflightCheck describes a preflight validation request and its result.", + "observedConfigHash": "observedConfigHash is a hash of the KMS provider configuration and its referenced resources that has been observed and requires preflight validation before a new encryption key can be created. The value must be exactly 8 characters.", + "result": "result contains the outcome of the most recent preflight check. Preflight is considered passed when result.status is Succeeded and result.configHash matches observedConfigHash. When omitted, no preflight check result has been reported yet.", +} + +func (KMSPreflightCheck) SwaggerDoc() map[string]string { + return map_KMSPreflightCheck +} + +var map_KMSPreflightResult = map[string]string{ + "": "KMSPreflightResult contains the outcome of a preflight validation.", + "status": "status indicates the outcome of the preflight check. Succeeded means the KMS plugin responded to Status, Encrypt, and Decrypt calls successfully. Failed means the validation did not pass.", + "configHash": "configHash is the hash of the configuration that was validated. This is compared against observedConfigHash to confirm the result corresponds to the current configuration. The value must be exactly 8 characters.", + "remoteKeyID": "remoteKeyID is the remote key encryption key identifier from KMS v2 StatusResponse.key_id. This is not a cryptographic key, but a unique representation of the remote key used to encrypt data. The value must be between 1 and 1024 characters.", +} + +func (KMSPreflightResult) SwaggerDoc() map[string]string { + return map_KMSPreflightResult +} + var map_KubeAPIServer = map[string]string{ "": "KubeAPIServer provides information to configure an operator to manage kube-apiserver.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", "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/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/github.com/openshift/api/route/v1/generated.proto b/vendor/github.com/openshift/api/route/v1/generated.proto index 85018b16b76f..28f8c311ee07 100644 --- a/vendor/github.com/openshift/api/route/v1/generated.proto +++ b/vendor/github.com/openshift/api/route/v1/generated.proto @@ -411,7 +411,7 @@ message RouterShard { // TLSConfig defines config used to secure a route and provide termination // // +kubebuilder:validation:XValidation:rule="has(self.termination) && has(self.insecureEdgeTerminationPolicy) ? !((self.termination=='passthrough') && (self.insecureEdgeTerminationPolicy=='Allow')) : true", message="cannot have both spec.tls.termination: passthrough and spec.tls.insecureEdgeTerminationPolicy: Allow" -// +openshift:validation:FeatureGateAwareXValidation:featureGate=RouteExternalCertificate,rule="!(has(self.certificate) && has(self.externalCertificate))", message="cannot have both spec.tls.certificate and spec.tls.externalCertificate" +// +kubebuilder:validation:XValidation:rule="!(has(self.certificate) && has(self.externalCertificate))", message="cannot have both spec.tls.certificate and spec.tls.externalCertificate" message TLSConfig { // termination indicates the TLS termination type. // @@ -464,7 +464,6 @@ message TLSConfig { // The router service account needs to be granted with read-only access to this secret, // please refer to openshift docs for additional details. // - // +openshift:enable:FeatureGate=RouteExternalCertificate // +optional optional LocalObjectReference externalCertificate = 7; } diff --git a/vendor/github.com/openshift/api/route/v1/types.go b/vendor/github.com/openshift/api/route/v1/types.go index 35c4064825cd..41f362fdf411 100644 --- a/vendor/github.com/openshift/api/route/v1/types.go +++ b/vendor/github.com/openshift/api/route/v1/types.go @@ -422,7 +422,7 @@ type RouterShard struct { // TLSConfig defines config used to secure a route and provide termination // // +kubebuilder:validation:XValidation:rule="has(self.termination) && has(self.insecureEdgeTerminationPolicy) ? !((self.termination=='passthrough') && (self.insecureEdgeTerminationPolicy=='Allow')) : true", message="cannot have both spec.tls.termination: passthrough and spec.tls.insecureEdgeTerminationPolicy: Allow" -// +openshift:validation:FeatureGateAwareXValidation:featureGate=RouteExternalCertificate,rule="!(has(self.certificate) && has(self.externalCertificate))", message="cannot have both spec.tls.certificate and spec.tls.externalCertificate" +// +kubebuilder:validation:XValidation:rule="!(has(self.certificate) && has(self.externalCertificate))", message="cannot have both spec.tls.certificate and spec.tls.externalCertificate" type TLSConfig struct { // termination indicates the TLS termination type. // @@ -475,7 +475,6 @@ type TLSConfig struct { // The router service account needs to be granted with read-only access to this secret, // please refer to openshift docs for additional details. // - // +openshift:enable:FeatureGate=RouteExternalCertificate // +optional ExternalCertificate *LocalObjectReference `json:"externalCertificate,omitempty" protobuf:"bytes,7,opt,name=externalCertificate"` } diff --git a/vendor/github.com/openshift/api/route/v1/zz_generated.featuregated-crd-manifests.yaml b/vendor/github.com/openshift/api/route/v1/zz_generated.featuregated-crd-manifests.yaml index 0277ba2f322c..33666eba4bd6 100644 --- a/vendor/github.com/openshift/api/route/v1/zz_generated.featuregated-crd-manifests.yaml +++ b/vendor/github.com/openshift/api/route/v1/zz_generated.featuregated-crd-manifests.yaml @@ -4,8 +4,7 @@ routes.route.openshift.io: CRDName: routes.route.openshift.io Capability: "" Category: "" - FeatureGates: - - RouteExternalCertificate + FeatureGates: [] FilenameOperatorName: "" FilenameOperatorOrdering: "" FilenameRunLevel: "" diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/awsplatformstatus.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/awsplatformstatus.go index 33007c2103c8..457caa686a48 100644 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/awsplatformstatus.go +++ b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/awsplatformstatus.go @@ -33,6 +33,15 @@ type AWSPlatformStatusApplyConfiguration struct { // network resources. This controls whether AWS resources are created with // IPv4-only, or dual-stack networking with IPv4 or IPv6 as the primary // protocol family. + // + // Valid values are: + // * "IPv4" (default): Cloud platform resources use IPv4 addressing only. + // * "DualStackIPv6Primary": Cloud platform resources use dual-stack networking with IPv6 as the primary protocol family. + // * "DualStackIPv4Primary": Cloud platform resources use dual-stack networking with IPv4 as the primary protocol family. + // + // When omitted, this field defaults to "IPv4". + // + // This field is immutable and cannot be changed once set. IPFamily *configv1.IPFamilyType `json:"ipFamily,omitempty"` } diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/baremetalplatformstatus.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/baremetalplatformstatus.go index 1f6dd6df6b21..f90232bff9da 100644 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/baremetalplatformstatus.go +++ b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/baremetalplatformstatus.go @@ -45,6 +45,17 @@ type BareMetalPlatformStatusApplyConfiguration struct { NodeDNSIP *string `json:"nodeDNSIP,omitempty"` // loadBalancer defines how the load balancer used by the cluster is configured. LoadBalancer *BareMetalPlatformLoadBalancerApplyConfiguration `json:"loadBalancer,omitempty"` + // vipManagement indicates which VIP management mechanism is active + // on this cluster. + // Allowed values are `Keepalived`, `BGP`, and omitted. + // Once set to a non-empty value, this field is immutable. + // When set to `BGP`, kube-vip (Routing Table Mode) and frr-k8s are + // deployed as static pods to advertise VIPs via BGP, replacing the + // default keepalived/VRRP mechanism. + // When set to `Keepalived`, the default keepalived-based VIP + // management is used. + // When omitted, the default keepalived-based VIP management is used. + VIPManagement *configv1.VIPManagementType `json:"vipManagement,omitempty"` // dnsRecordsType determines whether records for api, api-int, and ingress // are provided by the internal DNS service or externally. // Allowed values are `Internal`, `External`, and omitted. @@ -120,6 +131,14 @@ func (b *BareMetalPlatformStatusApplyConfiguration) WithLoadBalancer(value *Bare return b } +// WithVIPManagement sets the VIPManagement field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the VIPManagement field is set to the value of the last call. +func (b *BareMetalPlatformStatusApplyConfiguration) WithVIPManagement(value configv1.VIPManagementType) *BareMetalPlatformStatusApplyConfiguration { + b.VIPManagement = &value + return b +} + // WithDNSRecordsType sets the DNSRecordsType field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DNSRecordsType field is set to the value of the last call. diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/gcpplatformstatus.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/gcpplatformstatus.go index bf4c761d1a34..158041b9ab9f 100644 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/gcpplatformstatus.go +++ b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/gcpplatformstatus.go @@ -27,6 +27,18 @@ type GCPPlatformStatusApplyConfiguration struct { // must be provided for the API and internal API load balancers as well as the // ingress load balancer. CloudLoadBalancerConfig *CloudLoadBalancerConfigApplyConfiguration `json:"cloudLoadBalancerConfig,omitempty"` + // universeDomain is the GCP universe domain for the cluster, detected from + // the installer credentials. Components with their own GCP credentials should + // read the universe domain from those credentials, as they are the authoritative + // source. This field is provided for components that do not have GCP credentials + // and for general observability. + // + // When omitted, standard public GCP (googleapis.com) is assumed. + // + // universeDomain is an optional field that, when specified, must be non-empty and at most + // 253 characters. It must be a valid DNS subdomain: containing only lowercase alphanumeric + // characters, '-' or '.', and starting and ending with an alphanumeric character. + UniverseDomain *string `json:"universeDomain,omitempty"` } // GCPPlatformStatusApplyConfiguration constructs a declarative configuration of the GCPPlatformStatus type for use with @@ -84,3 +96,11 @@ func (b *GCPPlatformStatusApplyConfiguration) WithCloudLoadBalancerConfig(value b.CloudLoadBalancerConfig = value return b } + +// WithUniverseDomain sets the UniverseDomain field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the UniverseDomain field is set to the value of the last call. +func (b *GCPPlatformStatusApplyConfiguration) WithUniverseDomain(value string) *GCPPlatformStatusApplyConfiguration { + b.UniverseDomain = &value + return b +} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vaultkmspluginconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vaultkmspluginconfig.go index 736095a27d5c..235cecb93943 100644 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vaultkmspluginconfig.go +++ b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vaultkmspluginconfig.go @@ -40,24 +40,31 @@ type VaultKMSPluginConfigApplyConfiguration struct { // The value must be between 1 and 4096 characters. // The namespace cannot end with a forward slash, cannot contain spaces, and cannot be one of the reserved strings: root, sys, audit, auth, cubbyhole, or identity. VaultNamespace *string `json:"vaultNamespace,omitempty"` + // vaultAuthNamespace specifies the Vault namespace to use for authentication. + // This is only applicable for Vault Enterprise installations where authentication + // and Transit operations may be in different namespaces. + // When this field is not set, the value of vaultNamespace is used for both + // authentication and Transit key operations. + // + // The value must be between 1 and 4096 characters. + // The namespace cannot end with a forward slash, cannot contain spaces, and cannot be one of the reserved strings: root, sys, audit, auth, cubbyhole, or identity. + VaultAuthNamespace *string `json:"vaultAuthNamespace,omitempty"` // tls contains the TLS configuration for connecting to the Vault server. // When this field is not set, system default TLS settings are used. TLS *VaultTLSConfigApplyConfiguration `json:"tls,omitempty"` // authentication defines the authentication method used to authenticate with Vault. Authentication *VaultAuthenticationApplyConfiguration `json:"authentication,omitempty"` - // transitMount specifies the mount path of the Vault Transit engine. + // vaultKeyPath specifies the full path to the encryption key in Vault's Transit secrets engine, + // combining the Transit engine mount path and the key name separated by "/keys/". + // Format: /keys/ (e.g., transit/keys/my-key, myteam/transit/keys/production-key). // - // The transit mount must be between 1 and 1024 characters, cannot start or - // end with a forward slash, cannot contain consecutive forward slashes, and - // must only contain RFC 3986 unreserved characters (alphanumeric, hyphen, - // period, underscore, tilde) and forward slashes as path separators. - TransitMount *string `json:"transitMount,omitempty"` - // transitKey specifies the name of the encryption key in Vault's Transit engine. - // This key is used to encrypt and decrypt data. - // - // The transit key must be between 1 and 512 characters, cannot contain forward slashes, - // and must only contain alphanumeric characters, hyphens, periods, and underscores. - TransitKey *string `json:"transitKey,omitempty"` + // The total path length must be between 8 and 1542 characters. + // The path cannot start or end with a forward slash, cannot contain consecutive forward slashes, + // must only contain RFC 3986 unreserved characters (alphanumeric, hyphen, period, underscore, tilde) + // and forward slashes as path separators, and must not contain "." or ".." path segments. + // The key name must start and end with an alphanumeric character or underscore, and may contain + // alphanumeric characters, underscores, hyphens, and periods in the middle. + VaultKeyPath *string `json:"vaultKeyPath,omitempty"` } // VaultKMSPluginConfigApplyConfiguration constructs a declarative configuration of the VaultKMSPluginConfig type for use with @@ -90,6 +97,14 @@ func (b *VaultKMSPluginConfigApplyConfiguration) WithVaultNamespace(value string return b } +// WithVaultAuthNamespace sets the VaultAuthNamespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the VaultAuthNamespace field is set to the value of the last call. +func (b *VaultKMSPluginConfigApplyConfiguration) WithVaultAuthNamespace(value string) *VaultKMSPluginConfigApplyConfiguration { + b.VaultAuthNamespace = &value + return b +} + // WithTLS sets the TLS field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the TLS field is set to the value of the last call. @@ -106,18 +121,10 @@ func (b *VaultKMSPluginConfigApplyConfiguration) WithAuthentication(value *Vault return b } -// WithTransitMount sets the TransitMount field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the TransitMount field is set to the value of the last call. -func (b *VaultKMSPluginConfigApplyConfiguration) WithTransitMount(value string) *VaultKMSPluginConfigApplyConfiguration { - b.TransitMount = &value - return b -} - -// WithTransitKey sets the TransitKey field in the declarative configuration to the given value +// WithVaultKeyPath sets the VaultKeyPath field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the TransitKey field is set to the value of the last call. -func (b *VaultKMSPluginConfigApplyConfiguration) WithTransitKey(value string) *VaultKMSPluginConfigApplyConfiguration { - b.TransitKey = &value +// If called multiple times, the VaultKeyPath field is set to the value of the last call. +func (b *VaultKMSPluginConfigApplyConfiguration) WithVaultKeyPath(value string) *VaultKMSPluginConfigApplyConfiguration { + b.VaultKeyPath = &value return b } diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vsphereplatformfailuredomainspec.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vsphereplatformfailuredomainspec.go index 4f3d37e0f10f..feb5a68fbc81 100644 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vsphereplatformfailuredomainspec.go +++ b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vsphereplatformfailuredomainspec.go @@ -28,6 +28,9 @@ type VSpherePlatformFailureDomainSpecApplyConfiguration struct { // contains the vmHostRule which is an affinity vm-host rule in vCenter. ZoneAffinity *VSphereFailureDomainZoneAffinityApplyConfiguration `json:"zoneAffinity,omitempty"` // server is the fully-qualified domain name or the IP address of the vCenter server. + // This must match the server field of an entry in the vcenters list. + // The match is case-sensitive; the value must be specified exactly as it appears in the vcenters entry. + // The value must be between 1 and 255 characters long. // --- Server *string `json:"server,omitempty"` // topology describes a given failure domain using vSphere constructs diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vsphereplatformspec.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vsphereplatformspec.go index 4f31602e52ff..971183e94d8c 100644 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vsphereplatformspec.go +++ b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vsphereplatformspec.go @@ -25,6 +25,7 @@ type VSpherePlatformSpecApplyConfiguration struct { VCenters []VSpherePlatformVCenterSpecApplyConfiguration `json:"vcenters,omitempty"` // failureDomains contains the definition of region, zone and the vCenter topology. // If this is omitted failure domains (regions and zones) will not be used. + // Each failure domain's server must match the server field of an entry in the vcenters list. FailureDomains []VSpherePlatformFailureDomainSpecApplyConfiguration `json:"failureDomains,omitempty"` // nodeNetworking contains the definition of internal and external network constraints for // assigning the node's networking. diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/nodeexportercollectorconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/nodeexportercollectorconfig.go index ce8b83e06569..7f74fe4e8111 100644 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/nodeexportercollectorconfig.go +++ b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/nodeexportercollectorconfig.go @@ -87,6 +87,25 @@ type NodeExporterCollectorConfigApplyConfiguration struct { // which is subject to change over time. The current default is disabled. // Enable when you need visibility into kernel softirq processing across CPUs. Softirqs *NodeExporterCollectorSoftirqsConfigApplyConfiguration `json:"softirqs,omitempty"` + // 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. + DeviceMapperMultipath *NodeExporterCollectorDeviceMapperMultipathConfigApplyConfiguration `json:"deviceMapperMultipath,omitempty"` + // 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. + Zoneinfo *NodeExporterCollectorZoneinfoConfigApplyConfiguration `json:"zoneinfo,omitempty"` + // 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. + NVMExpressSubsystem *NodeExporterCollectorNVMExpressSubsystemConfigApplyConfiguration `json:"nvmExpressSubsystem,omitempty"` } // NodeExporterCollectorConfigApplyConfiguration constructs a declarative configuration of the NodeExporterCollectorConfig type for use with @@ -182,3 +201,27 @@ func (b *NodeExporterCollectorConfigApplyConfiguration) WithSoftirqs(value *Node b.Softirqs = value return b } + +// WithDeviceMapperMultipath sets the DeviceMapperMultipath field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeviceMapperMultipath field is set to the value of the last call. +func (b *NodeExporterCollectorConfigApplyConfiguration) WithDeviceMapperMultipath(value *NodeExporterCollectorDeviceMapperMultipathConfigApplyConfiguration) *NodeExporterCollectorConfigApplyConfiguration { + b.DeviceMapperMultipath = value + return b +} + +// WithZoneinfo sets the Zoneinfo field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Zoneinfo field is set to the value of the last call. +func (b *NodeExporterCollectorConfigApplyConfiguration) WithZoneinfo(value *NodeExporterCollectorZoneinfoConfigApplyConfiguration) *NodeExporterCollectorConfigApplyConfiguration { + b.Zoneinfo = value + return b +} + +// WithNVMExpressSubsystem sets the NVMExpressSubsystem field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the NVMExpressSubsystem field is set to the value of the last call. +func (b *NodeExporterCollectorConfigApplyConfiguration) WithNVMExpressSubsystem(value *NodeExporterCollectorNVMExpressSubsystemConfigApplyConfiguration) *NodeExporterCollectorConfigApplyConfiguration { + b.NVMExpressSubsystem = value + return b +} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/nodeexportercollectordevicemappermultipathconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/nodeexportercollectordevicemappermultipathconfig.go new file mode 100644 index 000000000000..2ea3f2c527fd --- /dev/null +++ b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/nodeexportercollectordevicemappermultipathconfig.go @@ -0,0 +1,37 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + configv1alpha1 "github.com/openshift/api/config/v1alpha1" +) + +// NodeExporterCollectorDeviceMapperMultipathConfigApplyConfiguration represents a declarative configuration of the NodeExporterCollectorDeviceMapperMultipathConfig type for use +// with apply. +// +// NodeExporterCollectorDeviceMapperMultipathConfig provides configuration for the dmmultipath collector +// of the node-exporter agent. The dmmultipath collector collects statistics about +// DM-Multipath devices. +// It is enabled by default. +type NodeExporterCollectorDeviceMapperMultipathConfigApplyConfiguration struct { + // collectionPolicy declares whether the dmmultipath collector collects metrics. + // This field is required. + // Valid values are "Collect" and "DoNotCollect". + // When set to "Collect", the dmmultipath collector is active and DM-Multipath device statistics are collected. + // When set to "DoNotCollect", the dmmultipath collector is inactive and the corresponding metrics become unavailable. + CollectionPolicy *configv1alpha1.NodeExporterCollectorCollectionPolicy `json:"collectionPolicy,omitempty"` +} + +// NodeExporterCollectorDeviceMapperMultipathConfigApplyConfiguration constructs a declarative configuration of the NodeExporterCollectorDeviceMapperMultipathConfig type for use with +// apply. +func NodeExporterCollectorDeviceMapperMultipathConfig() *NodeExporterCollectorDeviceMapperMultipathConfigApplyConfiguration { + return &NodeExporterCollectorDeviceMapperMultipathConfigApplyConfiguration{} +} + +// WithCollectionPolicy sets the CollectionPolicy field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CollectionPolicy field is set to the value of the last call. +func (b *NodeExporterCollectorDeviceMapperMultipathConfigApplyConfiguration) WithCollectionPolicy(value configv1alpha1.NodeExporterCollectorCollectionPolicy) *NodeExporterCollectorDeviceMapperMultipathConfigApplyConfiguration { + b.CollectionPolicy = &value + return b +} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/nodeexportercollectornvmexpresssubsystemconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/nodeexportercollectornvmexpresssubsystemconfig.go new file mode 100644 index 000000000000..e072e4b0915a --- /dev/null +++ b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/nodeexportercollectornvmexpresssubsystemconfig.go @@ -0,0 +1,37 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + configv1alpha1 "github.com/openshift/api/config/v1alpha1" +) + +// NodeExporterCollectorNVMExpressSubsystemConfigApplyConfiguration represents a declarative configuration of the NodeExporterCollectorNVMExpressSubsystemConfig type for use +// with apply. +// +// 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 NodeExporterCollectorNVMExpressSubsystemConfigApplyConfiguration 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. + CollectionPolicy *configv1alpha1.NodeExporterCollectorCollectionPolicy `json:"collectionPolicy,omitempty"` +} + +// NodeExporterCollectorNVMExpressSubsystemConfigApplyConfiguration constructs a declarative configuration of the NodeExporterCollectorNVMExpressSubsystemConfig type for use with +// apply. +func NodeExporterCollectorNVMExpressSubsystemConfig() *NodeExporterCollectorNVMExpressSubsystemConfigApplyConfiguration { + return &NodeExporterCollectorNVMExpressSubsystemConfigApplyConfiguration{} +} + +// WithCollectionPolicy sets the CollectionPolicy field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CollectionPolicy field is set to the value of the last call. +func (b *NodeExporterCollectorNVMExpressSubsystemConfigApplyConfiguration) WithCollectionPolicy(value configv1alpha1.NodeExporterCollectorCollectionPolicy) *NodeExporterCollectorNVMExpressSubsystemConfigApplyConfiguration { + b.CollectionPolicy = &value + return b +} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/nodeexportercollectorzoneinfoconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/nodeexportercollectorzoneinfoconfig.go new file mode 100644 index 000000000000..cdd1a5748f8a --- /dev/null +++ b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/nodeexportercollectorzoneinfoconfig.go @@ -0,0 +1,37 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + configv1alpha1 "github.com/openshift/api/config/v1alpha1" +) + +// NodeExporterCollectorZoneinfoConfigApplyConfiguration represents a declarative configuration of the NodeExporterCollectorZoneinfoConfig type for use +// with apply. +// +// NodeExporterCollectorZoneinfoConfig provides configuration for the zoneinfo collector +// of the node-exporter agent. The zoneinfo collector exposes per-zone memory page counts, +// watermarks, and protection thresholds from /proc/zoneinfo. +// By default, the zoneinfo collector does not collect metrics. +type NodeExporterCollectorZoneinfoConfigApplyConfiguration struct { + // collectionPolicy declares whether the zoneinfo collector collects metrics. + // This field is required. + // Valid values are "Collect" and "DoNotCollect". + // When set to "Collect", the zoneinfo collector is active and zone memory statistics are collected. + // When set to "DoNotCollect", the zoneinfo collector is inactive. + CollectionPolicy *configv1alpha1.NodeExporterCollectorCollectionPolicy `json:"collectionPolicy,omitempty"` +} + +// NodeExporterCollectorZoneinfoConfigApplyConfiguration constructs a declarative configuration of the NodeExporterCollectorZoneinfoConfig type for use with +// apply. +func NodeExporterCollectorZoneinfoConfig() *NodeExporterCollectorZoneinfoConfigApplyConfiguration { + return &NodeExporterCollectorZoneinfoConfigApplyConfiguration{} +} + +// WithCollectionPolicy sets the CollectionPolicy field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CollectionPolicy field is set to the value of the last call. +func (b *NodeExporterCollectorZoneinfoConfigApplyConfiguration) WithCollectionPolicy(value configv1alpha1.NodeExporterCollectorCollectionPolicy) *NodeExporterCollectorZoneinfoConfigApplyConfiguration { + b.CollectionPolicy = &value + return b +} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/remotewritespec.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/remotewritespec.go index 07c4b1e15fcc..727c23a45391 100644 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/remotewritespec.go +++ b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/remotewritespec.go @@ -21,6 +21,12 @@ type RemoteWriteSpecApplyConfiguration struct { // Must contain only alphanumeric characters, hyphens, and underscores. // Must be between 1 and 63 characters in length. Name *string `json:"name,omitempty"` + // messageVersion defines the Remote Write message's version to use when writing to the endpoint. + // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. + // The default value is "V1.0". + // When set to "V1.0", Prometheus uses the `prometheus.WriteRequest` protobuf message introduced in Remote Write 1.0. + // When set to "V2.0", Prometheus uses the `io.prometheus.write.v2.Request` protobuf message introduced in Remote Write 2.0. + MessageVersion *configv1alpha1.RemoteWriteMessageVersion `json:"messageVersion,omitempty"` // authorization defines the authorization method for the remote write endpoint. // When omitted, no authorization is performed. // When set, type must be one of Authorization, BasicAuth, OAuth2, SigV4, or ServiceAccount; the corresponding nested config must be set (ServiceAccount has no config). @@ -92,6 +98,14 @@ func (b *RemoteWriteSpecApplyConfiguration) WithName(value string) *RemoteWriteS return b } +// WithMessageVersion sets the MessageVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the MessageVersion field is set to the value of the last call. +func (b *RemoteWriteSpecApplyConfiguration) WithMessageVersion(value configv1alpha1.RemoteWriteMessageVersion) *RemoteWriteSpecApplyConfiguration { + b.MessageVersion = &value + return b +} + // WithAuthorizationConfig sets the AuthorizationConfig field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the AuthorizationConfig field is set to the value of the last call. diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/internal/internal.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/internal/internal.go index d71561a0bf89..12c03ff0971c 100644 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/internal/internal.go +++ b/vendor/github.com/openshift/client-go/config/applyconfigurations/internal/internal.go @@ -462,6 +462,9 @@ var schemaYAML = typed.YAMLObject(`types: - name: nodeDNSIP type: scalar: string + - name: vipManagement + type: + scalar: string - name: com.github.openshift.api.config.v1.BasicAuthIdentityProvider map: fields: @@ -1546,6 +1549,9 @@ var schemaYAML = typed.YAMLObject(`types: elementRelationship: associative keys: - key + - name: universeDomain + type: + scalar: string - name: com.github.openshift.api.config.v1.GCPResourceLabel map: fields: @@ -4344,13 +4350,13 @@ var schemaYAML = typed.YAMLObject(`types: type: namedType: com.github.openshift.api.config.v1.VaultTLSConfig default: {} - - name: transitKey + - name: vaultAddress type: scalar: string - - name: transitMount + - name: vaultAuthNamespace type: scalar: string - - name: vaultAddress + - name: vaultKeyPath type: scalar: string - name: vaultNamespace @@ -5001,6 +5007,10 @@ var schemaYAML = typed.YAMLObject(`types: type: namedType: com.github.openshift.api.config.v1alpha1.NodeExporterCollectorCpufreqConfig default: {} + - name: deviceMapperMultipath + type: + namedType: com.github.openshift.api.config.v1alpha1.NodeExporterCollectorDeviceMapperMultipathConfig + default: {} - name: ethtool type: namedType: com.github.openshift.api.config.v1alpha1.NodeExporterCollectorEthtoolConfig @@ -5021,6 +5031,10 @@ var schemaYAML = typed.YAMLObject(`types: type: namedType: com.github.openshift.api.config.v1alpha1.NodeExporterCollectorNetDevConfig default: {} + - name: nvmExpressSubsystem + type: + namedType: com.github.openshift.api.config.v1alpha1.NodeExporterCollectorNVMExpressSubsystemConfig + default: {} - name: processes type: namedType: com.github.openshift.api.config.v1alpha1.NodeExporterCollectorProcessesConfig @@ -5037,12 +5051,22 @@ var schemaYAML = typed.YAMLObject(`types: type: namedType: com.github.openshift.api.config.v1alpha1.NodeExporterCollectorTcpStatConfig default: {} + - name: zoneinfo + type: + namedType: com.github.openshift.api.config.v1alpha1.NodeExporterCollectorZoneinfoConfig + default: {} - name: com.github.openshift.api.config.v1alpha1.NodeExporterCollectorCpufreqConfig map: fields: - name: collectionPolicy type: scalar: string +- name: com.github.openshift.api.config.v1alpha1.NodeExporterCollectorDeviceMapperMultipathConfig + map: + fields: + - name: collectionPolicy + type: + scalar: string - name: com.github.openshift.api.config.v1alpha1.NodeExporterCollectorEthtoolConfig map: fields: @@ -5061,6 +5085,12 @@ var schemaYAML = typed.YAMLObject(`types: - name: collectionPolicy type: scalar: string +- name: com.github.openshift.api.config.v1alpha1.NodeExporterCollectorNVMExpressSubsystemConfig + map: + fields: + - name: collectionPolicy + type: + scalar: string - name: com.github.openshift.api.config.v1alpha1.NodeExporterCollectorNetClassCollectConfig map: fields: @@ -5130,6 +5160,12 @@ var schemaYAML = typed.YAMLObject(`types: - name: collectionPolicy type: scalar: string +- name: com.github.openshift.api.config.v1alpha1.NodeExporterCollectorZoneinfoConfig + map: + fields: + - name: collectionPolicy + type: + scalar: string - name: com.github.openshift.api.config.v1alpha1.NodeExporterConfig map: fields: @@ -5572,6 +5608,9 @@ var schemaYAML = typed.YAMLObject(`types: elementRelationship: associative keys: - name + - name: messageVersion + type: + scalar: string - name: metadataConfig type: namedType: com.github.openshift.api.config.v1alpha1.MetadataConfig diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/utils.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/utils.go index e849c0e45c1a..62dd8d61f458 100644 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/utils.go +++ b/vendor/github.com/openshift/client-go/config/applyconfigurations/utils.go @@ -590,6 +590,8 @@ func ForKind(kind schema.GroupVersionKind) interface{} { return &configv1alpha1.NodeExporterCollectorConfigApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("NodeExporterCollectorCpufreqConfig"): return &configv1alpha1.NodeExporterCollectorCpufreqConfigApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("NodeExporterCollectorDeviceMapperMultipathConfig"): + return &configv1alpha1.NodeExporterCollectorDeviceMapperMultipathConfigApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("NodeExporterCollectorEthtoolConfig"): return &configv1alpha1.NodeExporterCollectorEthtoolConfigApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("NodeExporterCollectorKSMDConfig"): @@ -602,6 +604,8 @@ func ForKind(kind schema.GroupVersionKind) interface{} { return &configv1alpha1.NodeExporterCollectorNetClassConfigApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("NodeExporterCollectorNetDevConfig"): return &configv1alpha1.NodeExporterCollectorNetDevConfigApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("NodeExporterCollectorNVMExpressSubsystemConfig"): + return &configv1alpha1.NodeExporterCollectorNVMExpressSubsystemConfigApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("NodeExporterCollectorProcessesConfig"): return &configv1alpha1.NodeExporterCollectorProcessesConfigApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("NodeExporterCollectorSoftirqsConfig"): @@ -612,6 +616,8 @@ func ForKind(kind schema.GroupVersionKind) interface{} { return &configv1alpha1.NodeExporterCollectorSystemdConfigApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("NodeExporterCollectorTcpStatConfig"): return &configv1alpha1.NodeExporterCollectorTcpStatConfigApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("NodeExporterCollectorZoneinfoConfig"): + return &configv1alpha1.NodeExporterCollectorZoneinfoConfigApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("NodeExporterConfig"): return &configv1alpha1.NodeExporterConfigApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("OAuth2"): diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/controllerconfigspec.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/controllerconfigspec.go index f67b3365ff88..944100958cae 100644 --- a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/controllerconfigspec.go +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/controllerconfigspec.go @@ -42,6 +42,14 @@ type ControllerConfigSpecApplyConfiguration struct { InternalRegistryPullSecret []byte `json:"internalRegistryPullSecret,omitempty"` // images is map of images that are used by the controller to render templates under ./templates/ Images map[string]string `json:"images,omitempty"` + // bgpVIPPeersJSON carries the BGP VIP peer configuration (the config.json + // payload of the bgp-vip-config ConfigMap) for rendering the frr-k8s + // static pod peer file on control plane nodes. Only set when BGP-based + // VIP management is enabled. + // When omitted, BGP-based VIP management is not configured and no + // frr-k8s peer file is rendered. + // When set, the value must be between 1 and 65536 characters long. + BGPVIPPeersJSON *string `json:"bgpVIPPeersJSON,omitempty"` // baseOSContainerImage is the new-format container image for operating system updates. BaseOSContainerImage *string `json:"baseOSContainerImage,omitempty"` // baseOSExtensionsContainerImage is the matching extensions container for the new-format container @@ -204,6 +212,14 @@ func (b *ControllerConfigSpecApplyConfiguration) WithImages(entries map[string]s return b } +// WithBGPVIPPeersJSON sets the BGPVIPPeersJSON field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the BGPVIPPeersJSON field is set to the value of the last call. +func (b *ControllerConfigSpecApplyConfiguration) WithBGPVIPPeersJSON(value string) *ControllerConfigSpecApplyConfiguration { + b.BGPVIPPeersJSON = &value + return b +} + // WithBaseOSContainerImage sets the BaseOSContainerImage field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the BaseOSContainerImage field is set to the value of the last call. diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/internal/internal.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/internal/internal.go index 7e41cc30bfa0..bbc2e8ad6c2b 100644 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/internal/internal.go +++ b/vendor/github.com/openshift/client-go/operator/applyconfigurations/internal/internal.go @@ -2192,17 +2192,18 @@ var schemaYAML = typed.YAMLObject(`types: elementRelationship: associative keys: - nodeName - - keyId + - keyID + - name: preflight + type: + namedType: com.github.openshift.api.operator.v1.KMSPreflightCheck + default: {} - name: com.github.openshift.api.operator.v1.KMSPluginHealthReport map: fields: - name: detail type: scalar: string - - name: kekId - type: - scalar: string - - name: keyId + - name: keyID type: scalar: string - name: lastCheckedTime @@ -2211,6 +2212,31 @@ var schemaYAML = typed.YAMLObject(`types: - name: nodeName type: scalar: string + - name: remoteKeyID + type: + scalar: string + - name: status + type: + scalar: string +- name: com.github.openshift.api.operator.v1.KMSPreflightCheck + map: + fields: + - name: observedConfigHash + type: + scalar: string + - name: result + type: + namedType: com.github.openshift.api.operator.v1.KMSPreflightResult + default: {} +- name: com.github.openshift.api.operator.v1.KMSPreflightResult + map: + fields: + - name: configHash + type: + scalar: string + - name: remoteKeyID + type: + scalar: string - name: status type: scalar: string @@ -3181,6 +3207,9 @@ var schemaYAML = typed.YAMLObject(`types: type: scalar: string default: "" + - name: nodeUID + type: + scalar: string - name: targetRevision type: scalar: numeric @@ -4453,6 +4482,12 @@ var schemaYAML = typed.YAMLObject(`types: elementRelationship: associative keys: - type +- name: com.github.openshift.api.operator.v1alpha1.GatewayAPIIngressConfig + map: + fields: + - name: managementMode + type: + scalar: string - name: com.github.openshift.api.operator.v1alpha1.ImageContentSourcePolicy map: fields: @@ -4479,6 +4514,48 @@ var schemaYAML = typed.YAMLObject(`types: elementType: namedType: com.github.openshift.api.operator.v1alpha1.RepositoryDigestMirrors elementRelationship: atomic +- name: com.github.openshift.api.operator.v1alpha1.Ingress + map: + fields: + - name: apiVersion + type: + scalar: string + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + default: {} + - name: spec + type: + namedType: com.github.openshift.api.operator.v1alpha1.IngressSpec + default: {} + - name: status + type: + namedType: com.github.openshift.api.operator.v1alpha1.IngressStatus + default: {} +- name: com.github.openshift.api.operator.v1alpha1.IngressSpec + map: + fields: + - name: gatewayAPI + type: + namedType: com.github.openshift.api.operator.v1alpha1.GatewayAPIIngressConfig + default: {} +- name: com.github.openshift.api.operator.v1alpha1.IngressStatus + map: + fields: + - name: conditions + type: + list: + elementType: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition + elementRelationship: associative + keys: + - type + - name: observedGeneration + type: + scalar: numeric - name: com.github.openshift.api.operator.v1alpha1.OLM map: fields: diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/kmsencryptionstatus.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/kmsencryptionstatus.go index 34297c214064..11e54164adfe 100644 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/kmsencryptionstatus.go +++ b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/kmsencryptionstatus.go @@ -7,8 +7,14 @@ package v1 type KMSEncryptionStatusApplyConfiguration struct { // healthReports contains all KMS plugin health reports. // When omitted, no health reports are available. - // Each entry must have a unique combination of nodeName and keyId. + // Each entry must have a unique combination of nodeName and keyID. HealthReports []KMSPluginHealthReportApplyConfiguration `json:"healthReports,omitempty"` + // preflight contains the state of KMS preflight validation for this operator. + // The preflight validates the KMS provider configuration before it is used + // to create a new encryption key, catching configuration issues early such + // as incorrect login credentials or an unreachable Vault service. + // When omitted, no preflight validation is in progress. + Preflight *KMSPreflightCheckApplyConfiguration `json:"preflight,omitempty"` } // KMSEncryptionStatusApplyConfiguration constructs a declarative configuration of the KMSEncryptionStatus type for use with @@ -29,3 +35,11 @@ func (b *KMSEncryptionStatusApplyConfiguration) WithHealthReports(values ...*KMS } return b } + +// WithPreflight sets the Preflight field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Preflight field is set to the value of the last call. +func (b *KMSEncryptionStatusApplyConfiguration) WithPreflight(value *KMSPreflightCheckApplyConfiguration) *KMSEncryptionStatusApplyConfiguration { + b.Preflight = value + return b +} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/kmspluginhealthreport.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/kmspluginhealthreport.go index 40d8eac77384..023f134a95cf 100644 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/kmspluginhealthreport.go +++ b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/kmspluginhealthreport.go @@ -11,25 +11,25 @@ import ( // with apply. type KMSPluginHealthReportApplyConfiguration struct { // nodeName is the name of the node this instance of the plugin runs on. - // The combination of nodeName and keyId makes this health report unique. + // The combination of nodeName and keyID makes this health report unique. // The value must be a valid Kubernetes node name: a lowercase RFC 1123 subdomain // consisting of lowercase alphanumeric characters, '-' or '.', starting and ending with // an alphanumeric character, and be at most 253 characters in length. NodeName *string `json:"nodeName,omitempty"` - // keyId is the encryption-key-secret id (kms-{keyId}.sock), a unique identifier of the plugin on that node. + // keyID is the encryption-key-secret id (kms-{keyID}.sock), a unique identifier of the plugin on that node. // This is not a cryptographic key used to encrypt/decrypt any resources. // The value must be between 1 and 512 characters. - KeyId *string `json:"keyId,omitempty"` + KeyID *string `json:"keyID,omitempty"` // status contains a health indicator for the respective KMS plugin // The field can have three states: healthy, unhealthy, error. // With error and unhealthy containing additional information in Detail. Status *operatorv1.KMSPluginHealthStatus `json:"status,omitempty"` // lastCheckedTime is a timestamp of when the probe was last checked. LastCheckedTime *metav1.Time `json:"lastCheckedTime,omitempty"` - // kekId refers to the remote KEK id from KMS v2 StatusResponse.key_id. + // remoteKeyID refers to the remote key identifier from KMS v2 StatusResponse.key_id. // This is not a cryptographic key, but a unique representation of the KEK. // The value must be between 1 and 1024 characters. - KEKId *string `json:"kekId,omitempty"` + RemoteKeyID *string `json:"remoteKeyID,omitempty"` // detail contains additional error/health information for the respective KMS plugin. // When omitted, no additional error or health information is provided. // When set, the value must be between 1 and 1024 characters. @@ -50,11 +50,11 @@ func (b *KMSPluginHealthReportApplyConfiguration) WithNodeName(value string) *KM return b } -// WithKeyId sets the KeyId field in the declarative configuration to the given value +// WithKeyID sets the KeyID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the KeyId field is set to the value of the last call. -func (b *KMSPluginHealthReportApplyConfiguration) WithKeyId(value string) *KMSPluginHealthReportApplyConfiguration { - b.KeyId = &value +// If called multiple times, the KeyID field is set to the value of the last call. +func (b *KMSPluginHealthReportApplyConfiguration) WithKeyID(value string) *KMSPluginHealthReportApplyConfiguration { + b.KeyID = &value return b } @@ -74,11 +74,11 @@ func (b *KMSPluginHealthReportApplyConfiguration) WithLastCheckedTime(value meta return b } -// WithKEKId sets the KEKId field in the declarative configuration to the given value +// WithRemoteKeyID sets the RemoteKeyID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the KEKId field is set to the value of the last call. -func (b *KMSPluginHealthReportApplyConfiguration) WithKEKId(value string) *KMSPluginHealthReportApplyConfiguration { - b.KEKId = &value +// If called multiple times, the RemoteKeyID field is set to the value of the last call. +func (b *KMSPluginHealthReportApplyConfiguration) WithRemoteKeyID(value string) *KMSPluginHealthReportApplyConfiguration { + b.RemoteKeyID = &value return b } diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/kmspreflightcheck.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/kmspreflightcheck.go new file mode 100644 index 000000000000..020e88e99896 --- /dev/null +++ b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/kmspreflightcheck.go @@ -0,0 +1,42 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +// KMSPreflightCheckApplyConfiguration represents a declarative configuration of the KMSPreflightCheck type for use +// with apply. +// +// KMSPreflightCheck describes a preflight validation request and its result. +type KMSPreflightCheckApplyConfiguration struct { + // observedConfigHash is a hash of the KMS provider configuration and + // its referenced resources that has been observed and requires preflight + // validation before a new encryption key can be created. + // The value must be exactly 8 characters. + ObservedConfigHash *string `json:"observedConfigHash,omitempty"` + // result contains the outcome of the most recent preflight check. + // Preflight is considered passed when result.status is Succeeded and + // result.configHash matches observedConfigHash. + // When omitted, no preflight check result has been reported yet. + Result *KMSPreflightResultApplyConfiguration `json:"result,omitempty"` +} + +// KMSPreflightCheckApplyConfiguration constructs a declarative configuration of the KMSPreflightCheck type for use with +// apply. +func KMSPreflightCheck() *KMSPreflightCheckApplyConfiguration { + return &KMSPreflightCheckApplyConfiguration{} +} + +// WithObservedConfigHash sets the ObservedConfigHash field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ObservedConfigHash field is set to the value of the last call. +func (b *KMSPreflightCheckApplyConfiguration) WithObservedConfigHash(value string) *KMSPreflightCheckApplyConfiguration { + b.ObservedConfigHash = &value + return b +} + +// WithResult sets the Result field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Result field is set to the value of the last call. +func (b *KMSPreflightCheckApplyConfiguration) WithResult(value *KMSPreflightResultApplyConfiguration) *KMSPreflightCheckApplyConfiguration { + b.Result = value + return b +} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/kmspreflightresult.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/kmspreflightresult.go new file mode 100644 index 000000000000..a5c86c13a2d5 --- /dev/null +++ b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/kmspreflightresult.go @@ -0,0 +1,59 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + operatorv1 "github.com/openshift/api/operator/v1" +) + +// KMSPreflightResultApplyConfiguration represents a declarative configuration of the KMSPreflightResult type for use +// with apply. +// +// KMSPreflightResult contains the outcome of a preflight validation. +type KMSPreflightResultApplyConfiguration struct { + // status indicates the outcome of the preflight check. + // Succeeded means the KMS plugin responded to Status, Encrypt, and + // Decrypt calls successfully. + // Failed means the validation did not pass. + Status *operatorv1.KMSPreflightResultStatus `json:"status,omitempty"` + // configHash is the hash of the configuration that was validated. + // This is compared against observedConfigHash to confirm the result + // corresponds to the current configuration. + // The value must be exactly 8 characters. + ConfigHash *string `json:"configHash,omitempty"` + // remoteKeyID is the remote key encryption key identifier from KMS v2 + // StatusResponse.key_id. This is not a cryptographic key, but a unique + // representation of the remote key used to encrypt data. + // The value must be between 1 and 1024 characters. + RemoteKeyID *string `json:"remoteKeyID,omitempty"` +} + +// KMSPreflightResultApplyConfiguration constructs a declarative configuration of the KMSPreflightResult type for use with +// apply. +func KMSPreflightResult() *KMSPreflightResultApplyConfiguration { + return &KMSPreflightResultApplyConfiguration{} +} + +// WithStatus sets the Status field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Status field is set to the value of the last call. +func (b *KMSPreflightResultApplyConfiguration) WithStatus(value operatorv1.KMSPreflightResultStatus) *KMSPreflightResultApplyConfiguration { + b.Status = &value + return b +} + +// WithConfigHash sets the ConfigHash field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ConfigHash field is set to the value of the last call. +func (b *KMSPreflightResultApplyConfiguration) WithConfigHash(value string) *KMSPreflightResultApplyConfiguration { + b.ConfigHash = &value + return b +} + +// WithRemoteKeyID sets the RemoteKeyID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the RemoteKeyID field is set to the value of the last call. +func (b *KMSPreflightResultApplyConfiguration) WithRemoteKeyID(value string) *KMSPreflightResultApplyConfiguration { + b.RemoteKeyID = &value + return b +} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/nodestatus.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/nodestatus.go index f107c370d2b9..ab2db04aded1 100644 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/nodestatus.go +++ b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/nodestatus.go @@ -13,6 +13,13 @@ import ( type NodeStatusApplyConfiguration struct { // nodeName is the name of the node NodeName *string `json:"nodeName,omitempty"` + // nodeUID is the UID of the node. + // This field is used to detect that a node has been deleted and recreated + // with the same name. When the UID changes, it indicates the node is a + // new instance and the controller should treat this status entry as stale. + // When omitted, UID-based node replacement detection is not available + // for this entry. + NodeUID *string `json:"nodeUID,omitempty"` // currentRevision is the generation of the most recently successful deployment. // Can not be set on creation of a nodeStatus. Updates must only increase the value. CurrentRevision *int32 `json:"currentRevision,omitempty"` @@ -47,6 +54,14 @@ func (b *NodeStatusApplyConfiguration) WithNodeName(value string) *NodeStatusApp return b } +// WithNodeUID sets the NodeUID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the NodeUID field is set to the value of the last call. +func (b *NodeStatusApplyConfiguration) WithNodeUID(value string) *NodeStatusApplyConfiguration { + b.NodeUID = &value + return b +} + // WithCurrentRevision sets the CurrentRevision field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CurrentRevision field is set to the value of the last call. diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1alpha1/gatewayapiingressconfig.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1alpha1/gatewayapiingressconfig.go new file mode 100644 index 000000000000..c2c03ed46391 --- /dev/null +++ b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1alpha1/gatewayapiingressconfig.go @@ -0,0 +1,46 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + operatorv1alpha1 "github.com/openshift/api/operator/v1alpha1" +) + +// GatewayAPIIngressConfigApplyConfiguration represents a declarative configuration of the GatewayAPIIngressConfig type for use +// with apply. +// +// GatewayAPIIngressConfig holds configuration for Gateway API integration in the +// Cluster Ingress Operator. +type GatewayAPIIngressConfigApplyConfiguration 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. + ManagementMode *operatorv1alpha1.GatewayAPIManagementMode `json:"managementMode,omitempty"` +} + +// GatewayAPIIngressConfigApplyConfiguration constructs a declarative configuration of the GatewayAPIIngressConfig type for use with +// apply. +func GatewayAPIIngressConfig() *GatewayAPIIngressConfigApplyConfiguration { + return &GatewayAPIIngressConfigApplyConfiguration{} +} + +// WithManagementMode sets the ManagementMode field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ManagementMode field is set to the value of the last call. +func (b *GatewayAPIIngressConfigApplyConfiguration) WithManagementMode(value operatorv1alpha1.GatewayAPIManagementMode) *GatewayAPIIngressConfigApplyConfiguration { + b.ManagementMode = &value + return b +} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1alpha1/ingress.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1alpha1/ingress.go new file mode 100644 index 000000000000..d97b01aa9508 --- /dev/null +++ b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1alpha1/ingress.go @@ -0,0 +1,278 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + operatorv1alpha1 "github.com/openshift/api/operator/v1alpha1" + internal "github.com/openshift/client-go/operator/applyconfigurations/internal" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + managedfields "k8s.io/apimachinery/pkg/util/managedfields" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// IngressApplyConfiguration represents a declarative configuration of the Ingress type for use +// with apply. +// +// 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. +type IngressApplyConfiguration struct { + v1.TypeMetaApplyConfiguration `json:",inline"` + // metadata is the standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + // spec holds user settable values for configuration. + Spec *IngressSpecApplyConfiguration `json:"spec,omitempty"` + // status holds observed values from the cluster. + Status *IngressStatusApplyConfiguration `json:"status,omitempty"` +} + +// Ingress constructs a declarative configuration of the Ingress type for use with +// apply. +func Ingress(name string) *IngressApplyConfiguration { + b := &IngressApplyConfiguration{} + b.WithName(name) + b.WithKind("Ingress") + b.WithAPIVersion("operator.openshift.io/v1alpha1") + return b +} + +// ExtractIngressFrom extracts the applied configuration owned by fieldManager from +// ingress for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// ingress must be a unmodified Ingress API object that was retrieved from the Kubernetes API. +// ExtractIngressFrom provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +func ExtractIngressFrom(ingress *operatorv1alpha1.Ingress, fieldManager string, subresource string) (*IngressApplyConfiguration, error) { + b := &IngressApplyConfiguration{} + err := managedfields.ExtractInto(ingress, internal.Parser().Type("com.github.openshift.api.operator.v1alpha1.Ingress"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(ingress.Name) + + b.WithKind("Ingress") + b.WithAPIVersion("operator.openshift.io/v1alpha1") + return b, nil +} + +// ExtractIngress extracts the applied configuration owned by fieldManager from +// ingress. If no managedFields are found in ingress for fieldManager, a +// IngressApplyConfiguration is returned with only the Name, Namespace (if applicable), +// APIVersion and Kind populated. It is possible that no managed fields were found for because other +// field managers have taken ownership of all the fields previously owned by fieldManager, or because +// the fieldManager never owned fields any fields. +// ingress must be a unmodified Ingress API object that was retrieved from the Kubernetes API. +// ExtractIngress provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +func ExtractIngress(ingress *operatorv1alpha1.Ingress, fieldManager string) (*IngressApplyConfiguration, error) { + return ExtractIngressFrom(ingress, fieldManager, "") +} + +// ExtractIngressStatus extracts the applied configuration owned by fieldManager from +// ingress for the status subresource. +func ExtractIngressStatus(ingress *operatorv1alpha1.Ingress, fieldManager string) (*IngressApplyConfiguration, error) { + return ExtractIngressFrom(ingress, fieldManager, "status") +} + +func (b IngressApplyConfiguration) IsApplyConfiguration() {} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *IngressApplyConfiguration) WithKind(value string) *IngressApplyConfiguration { + b.TypeMetaApplyConfiguration.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIVersion field is set to the value of the last call. +func (b *IngressApplyConfiguration) WithAPIVersion(value string) *IngressApplyConfiguration { + b.TypeMetaApplyConfiguration.APIVersion = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *IngressApplyConfiguration) WithName(value string) *IngressApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Name = &value + return b +} + +// WithGenerateName sets the GenerateName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GenerateName field is set to the value of the last call. +func (b *IngressApplyConfiguration) WithGenerateName(value string) *IngressApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.GenerateName = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *IngressApplyConfiguration) WithNamespace(value string) *IngressApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Namespace = &value + return b +} + +// WithUID sets the UID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the UID field is set to the value of the last call. +func (b *IngressApplyConfiguration) WithUID(value types.UID) *IngressApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ResourceVersion field is set to the value of the last call. +func (b *IngressApplyConfiguration) WithResourceVersion(value string) *IngressApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Generation field is set to the value of the last call. +func (b *IngressApplyConfiguration) WithGeneration(value int64) *IngressApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CreationTimestamp field is set to the value of the last call. +func (b *IngressApplyConfiguration) WithCreationTimestamp(value metav1.Time) *IngressApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionTimestamp field is set to the value of the last call. +func (b *IngressApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *IngressApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *IngressApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *IngressApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *IngressApplyConfiguration) WithLabels(entries map[string]string) *IngressApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ObjectMetaApplyConfiguration.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *IngressApplyConfiguration) WithAnnotations(entries map[string]string) *IngressApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ObjectMetaApplyConfiguration.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *IngressApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *IngressApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *IngressApplyConfiguration) WithFinalizers(values ...string) *IngressApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) + } + return b +} + +func (b *IngressApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + } +} + +// WithSpec sets the Spec field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Spec field is set to the value of the last call. +func (b *IngressApplyConfiguration) WithSpec(value *IngressSpecApplyConfiguration) *IngressApplyConfiguration { + b.Spec = value + return b +} + +// WithStatus sets the Status field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Status field is set to the value of the last call. +func (b *IngressApplyConfiguration) WithStatus(value *IngressStatusApplyConfiguration) *IngressApplyConfiguration { + b.Status = value + return b +} + +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *IngressApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *IngressApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + +// GetName retrieves the value of the Name field in the declarative configuration. +func (b *IngressApplyConfiguration) GetName() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Name +} + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *IngressApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1alpha1/ingressspec.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1alpha1/ingressspec.go new file mode 100644 index 000000000000..6fea3908d1eb --- /dev/null +++ b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1alpha1/ingressspec.go @@ -0,0 +1,28 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// IngressSpecApplyConfiguration represents a declarative configuration of the IngressSpec type for use +// with apply. +// +// IngressSpec is the specification of the desired behavior of the Ingress Operator. +type IngressSpecApplyConfiguration 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. + GatewayAPI *GatewayAPIIngressConfigApplyConfiguration `json:"gatewayAPI,omitempty"` +} + +// IngressSpecApplyConfiguration constructs a declarative configuration of the IngressSpec type for use with +// apply. +func IngressSpec() *IngressSpecApplyConfiguration { + return &IngressSpecApplyConfiguration{} +} + +// WithGatewayAPI sets the GatewayAPI field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GatewayAPI field is set to the value of the last call. +func (b *IngressSpecApplyConfiguration) WithGatewayAPI(value *GatewayAPIIngressConfigApplyConfiguration) *IngressSpecApplyConfiguration { + b.GatewayAPI = value + return b +} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1alpha1/ingressstatus.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1alpha1/ingressstatus.go new file mode 100644 index 000000000000..9af1720f8351 --- /dev/null +++ b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1alpha1/ingressstatus.go @@ -0,0 +1,57 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// IngressStatusApplyConfiguration represents a declarative configuration of the IngressStatus type for use +// with apply. +// +// IngressStatus defines the observed status of the Ingress Operator. +type IngressStatusApplyConfiguration 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. + Conditions []v1.ConditionApplyConfiguration `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. + ObservedGeneration *int64 `json:"observedGeneration,omitempty"` +} + +// IngressStatusApplyConfiguration constructs a declarative configuration of the IngressStatus type for use with +// apply. +func IngressStatus() *IngressStatusApplyConfiguration { + return &IngressStatusApplyConfiguration{} +} + +// WithConditions adds the given value to the Conditions field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Conditions field. +func (b *IngressStatusApplyConfiguration) WithConditions(values ...*v1.ConditionApplyConfiguration) *IngressStatusApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithConditions") + } + b.Conditions = append(b.Conditions, *values[i]) + } + return b +} + +// WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ObservedGeneration field is set to the value of the last call. +func (b *IngressStatusApplyConfiguration) WithObservedGeneration(value int64) *IngressStatusApplyConfiguration { + b.ObservedGeneration = &value + return b +} diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/generated_expansion.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/generated_expansion.go index a19ef54dc153..09baa63c3d4d 100644 --- a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/generated_expansion.go +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/generated_expansion.go @@ -10,4 +10,6 @@ type EtcdBackupExpansion interface{} type ImageContentSourcePolicyExpansion interface{} +type IngressExpansion interface{} + type OLMExpansion interface{} diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/ingress.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/ingress.go new file mode 100644 index 000000000000..5c84be3bee6b --- /dev/null +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/ingress.go @@ -0,0 +1,58 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + context "context" + + operatorv1alpha1 "github.com/openshift/api/operator/v1alpha1" + applyconfigurationsoperatorv1alpha1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1alpha1" + scheme "github.com/openshift/client-go/operator/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + gentype "k8s.io/client-go/gentype" +) + +// IngressesGetter has a method to return a IngressInterface. +// A group's client should implement this interface. +type IngressesGetter interface { + Ingresses() IngressInterface +} + +// IngressInterface has methods to work with Ingress resources. +type IngressInterface interface { + Create(ctx context.Context, ingress *operatorv1alpha1.Ingress, opts v1.CreateOptions) (*operatorv1alpha1.Ingress, error) + Update(ctx context.Context, ingress *operatorv1alpha1.Ingress, opts v1.UpdateOptions) (*operatorv1alpha1.Ingress, error) + // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). + UpdateStatus(ctx context.Context, ingress *operatorv1alpha1.Ingress, opts v1.UpdateOptions) (*operatorv1alpha1.Ingress, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*operatorv1alpha1.Ingress, error) + List(ctx context.Context, opts v1.ListOptions) (*operatorv1alpha1.IngressList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *operatorv1alpha1.Ingress, err error) + Apply(ctx context.Context, ingress *applyconfigurationsoperatorv1alpha1.IngressApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1alpha1.Ingress, err error) + // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). + ApplyStatus(ctx context.Context, ingress *applyconfigurationsoperatorv1alpha1.IngressApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1alpha1.Ingress, err error) + IngressExpansion +} + +// ingresses implements IngressInterface +type ingresses struct { + *gentype.ClientWithListAndApply[*operatorv1alpha1.Ingress, *operatorv1alpha1.IngressList, *applyconfigurationsoperatorv1alpha1.IngressApplyConfiguration] +} + +// newIngresses returns a Ingresses +func newIngresses(c *OperatorV1alpha1Client) *ingresses { + return &ingresses{ + gentype.NewClientWithListAndApply[*operatorv1alpha1.Ingress, *operatorv1alpha1.IngressList, *applyconfigurationsoperatorv1alpha1.IngressApplyConfiguration]( + "ingresses", + c.RESTClient(), + scheme.ParameterCodec, + "", + func() *operatorv1alpha1.Ingress { return &operatorv1alpha1.Ingress{} }, + func() *operatorv1alpha1.IngressList { return &operatorv1alpha1.IngressList{} }, + ), + } +} diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/operator_client.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/operator_client.go index 6ed123d5e305..fd1b968a3bf9 100644 --- a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/operator_client.go +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/operator_client.go @@ -16,6 +16,7 @@ type OperatorV1alpha1Interface interface { ClusterVersionOperatorsGetter EtcdBackupsGetter ImageContentSourcePoliciesGetter + IngressesGetter OLMsGetter } @@ -40,6 +41,10 @@ func (c *OperatorV1alpha1Client) ImageContentSourcePolicies() ImageContentSource return newImageContentSourcePolicies(c) } +func (c *OperatorV1alpha1Client) Ingresses() IngressInterface { + return newIngresses(c) +} + func (c *OperatorV1alpha1Client) OLMs() OLMInterface { return newOLMs(c) } diff --git a/vendor/modules.txt b/vendor/modules.txt index bcf88167da0a..c0ff5cc7afa6 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1594,7 +1594,7 @@ github.com/openshift-kni/commatrix/pkg/matrix-diff github.com/openshift-kni/commatrix/pkg/mcp github.com/openshift-kni/commatrix/pkg/types github.com/openshift-kni/commatrix/pkg/utils -# github.com/openshift/api v0.0.0-20260715165912-72066cc9718b +# github.com/openshift/api v0.0.0-20260810132456-8f52beb625b5 ## explicit; go 1.26.0 github.com/openshift/api github.com/openshift/api/annotations @@ -1707,7 +1707,7 @@ github.com/openshift/build-machinery-go/make/targets/golang github.com/openshift/build-machinery-go/make/targets/openshift github.com/openshift/build-machinery-go/make/targets/openshift/operator github.com/openshift/build-machinery-go/scripts -# github.com/openshift/client-go v0.0.0-20260715172546-dac61734e0ec +# github.com/openshift/client-go v0.0.0-20260810202730-ddca5e0b7146 ## explicit; go 1.26.0 github.com/openshift/client-go/apiserver/applyconfigurations/apiserver/v1 github.com/openshift/client-go/apiserver/applyconfigurations/internal