From 11e81315a3755f13fa210dd34b4fed34f8b8178b Mon Sep 17 00:00:00 2001 From: Adam Kaplan Date: Thu, 12 Oct 2023 14:28:24 -0400 Subject: [PATCH 1/2] bump(openshift/api): Update openshift/api to add the capability annotation to the Build CRD. --- go.mod | 2 +- go.sum | 4 +- vendor/github.com/openshift/api/README.md | 4 +- ...ersion-operator_01_clusterversion.crd.yaml | 5 + .../0000_10_config-operator_01_image.crd.yaml | 2 +- ...roller-manager-operator_01_build.crd.yaml} | 1 + .../openshift/api/config/v1/feature_gates.go | 10 - .../api/config/v1/stable.build.testsuite.yaml | 2 +- .../v1/stable.clusterversion.testsuite.yaml | 140 ++++++++ .../api/config/v1/types_cluster_version.go | 13 +- .../openshift/api/config/v1/types_feature.go | 5 +- .../openshift/api/config/v1/types_image.go | 4 +- .../v1/zz_generated.swagger_doc_generated.go | 2 +- ...yaml => 00_helm-chart-repository.crd.yaml} | 0 ...00_project-helm-chart-repository.crd.yaml} | 0 .../stable.helmchartrepository.testsuite.yaml | 2 +- ....projecthelmchartrepository.testsuite.yaml | 2 +- .../api/kubecontrolplane/v1/types.go | 6 +- .../v1/zz_generated.swagger_doc_generated.go | 2 +- .../openshift/api/legacyconfig/v1/types.go | 9 +- .../v1/zz_generated.swagger_doc_generated.go | 6 +- .../api/openshiftcontrolplane/v1/types.go | 3 - .../v1/zz_generated.swagger_doc_generated.go | 2 +- ...ess-operator_00-ingresscontroller.crd.yaml | 5 + ...machine-config-operator_01_config.crd.yaml | 192 +++++++++++ .../openshift/api/operator/v1/register.go | 2 + .../stable.ingresscontroller.testsuite.yaml | 302 ++++++++++++++++++ ...stable.machineconfiguration.testsuite.yaml | 16 + .../openshift/api/operator/v1/types.go | 4 +- .../api/operator/v1/types_ingress.go | 16 + .../operator/v1/types_machineconfiguration.go | 58 ++++ .../api/operator/v1/zz_generated.deepcopy.go | 95 ++++++ .../v1/zz_generated.swagger_doc_generated.go | 23 +- vendor/modules.txt | 2 +- 34 files changed, 893 insertions(+), 48 deletions(-) rename vendor/github.com/openshift/api/config/v1/{0000_10_config-operator_01_build.crd.yaml => 0000_10_openshift-controller-manager-operator_01_build.crd.yaml} (99%) rename vendor/github.com/openshift/api/helm/v1beta1/{0000_10-helm-chart-repository.crd.yaml => 00_helm-chart-repository.crd.yaml} (100%) rename vendor/github.com/openshift/api/helm/v1beta1/{0000_10-project-helm-chart-repository.crd.yaml => 00_project-helm-chart-repository.crd.yaml} (100%) create mode 100644 vendor/github.com/openshift/api/operator/v1/0000_80_machine-config-operator_01_config.crd.yaml create mode 100644 vendor/github.com/openshift/api/operator/v1/stable.machineconfiguration.testsuite.yaml create mode 100644 vendor/github.com/openshift/api/operator/v1/types_machineconfiguration.go diff --git a/go.mod b/go.mod index a6e07cce6..b420c0066 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.20 require ( github.com/ghodss/yaml v1.0.0 github.com/go-bindata/go-bindata v3.1.2+incompatible - github.com/openshift/api v0.0.0-20230920152731-7d89b46689d4 + github.com/openshift/api v0.0.0-20231012181603-8f468d7b55a8 github.com/openshift/build-machinery-go v0.0.0-20230824093055-6a18da01283c github.com/openshift/client-go v0.0.0-20230915115245-53bd8980dfb7 github.com/openshift/library-go v0.0.0-20230915122714-b753831a0dce diff --git a/go.sum b/go.sum index 0c1de453f..5709cecac 100644 --- a/go.sum +++ b/go.sum @@ -233,8 +233,8 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/onsi/ginkgo/v2 v2.9.4 h1:xR7vG4IXt5RWx6FfIjyAtsoMAtnc3C/rFXBBd2AjZwE= github.com/onsi/gomega v1.27.6 h1:ENqfyGeS5AX/rlXDd/ETokDz93u0YufY1Pgxuy/PvWE= -github.com/openshift/api v0.0.0-20230920152731-7d89b46689d4 h1:1BdCmGkO+aitiGzGYm6rqPtwY6+2etUWMi7429swku0= -github.com/openshift/api v0.0.0-20230920152731-7d89b46689d4/go.mod h1:qNtV0315F+f8ld52TLtPvrfivZpdimOzTi3kn9IVbtU= +github.com/openshift/api v0.0.0-20231012181603-8f468d7b55a8 h1:x7k5FGR9J0/5qsDaXQjPz+zVydV4qX6pYBbGmdzSWxw= +github.com/openshift/api v0.0.0-20231012181603-8f468d7b55a8/go.mod h1:qNtV0315F+f8ld52TLtPvrfivZpdimOzTi3kn9IVbtU= github.com/openshift/build-machinery-go v0.0.0-20230824093055-6a18da01283c h1:H5k87xq6hGgR1YCF/8hLv3j5jWd64Eh3ZhqF9WUJ15Q= github.com/openshift/build-machinery-go v0.0.0-20230824093055-6a18da01283c/go.mod h1:b1BuldmJlbA/xYtdZvKi+7j5YGB44qJUJDZ9zwiNCfE= github.com/openshift/client-go v0.0.0-20230915115245-53bd8980dfb7 h1:+5WyBC1jCqbMwFNn+uW71zcarZshuD5NCnU0/tHHn+0= diff --git a/vendor/github.com/openshift/api/README.md b/vendor/github.com/openshift/api/README.md index 5ad3880be..0c4e034b3 100644 --- a/vendor/github.com/openshift/api/README.md +++ b/vendor/github.com/openshift/api/README.md @@ -1,5 +1,7 @@ # api -The canonical location of the OpenShift API definition. This repo holds the API type definitions and serialization code used by [openshift/client-go](https://github.com/openshift/client-go) +The canonical location of the OpenShift API definition. +This repo holds the API type definitions and serialization code used by [openshift/client-go](https://github.com/openshift/client-go) +APIs in this repo ship inside OCP payloads. ## defining new APIs diff --git a/vendor/github.com/openshift/api/config/v1/0000_00_cluster-version-operator_01_clusterversion.crd.yaml b/vendor/github.com/openshift/api/config/v1/0000_00_cluster-version-operator_01_clusterversion.crd.yaml index b3e5c9dbc..7cf29c2a8 100644 --- a/vendor/github.com/openshift/api/config/v1/0000_00_cluster-version-operator_01_clusterversion.crd.yaml +++ b/vendor/github.com/openshift/api/config/v1/0000_00_cluster-version-operator_01_clusterversion.crd.yaml @@ -75,6 +75,7 @@ spec: - Build - DeploymentConfig - ImageRegistry + - OperatorLifecycleManager x-kubernetes-list-type: atomic baselineCapabilitySet: description: baselineCapabilitySet selects an initial set of optional capabilities to enable, which can be extended via additionalEnabledCapabilities. If unset, the cluster will choose a default, and the default may change over time. The current default is vCurrent. @@ -201,6 +202,7 @@ spec: - Build - DeploymentConfig - ImageRegistry + - OperatorLifecycleManager x-kubernetes-list-type: atomic knownCapabilities: description: knownCapabilities lists all the capabilities known to the current cluster. @@ -221,6 +223,7 @@ spec: - Build - DeploymentConfig - ImageRegistry + - OperatorLifecycleManager x-kubernetes-list-type: atomic conditionalUpdates: description: conditionalUpdates contains the list of updates that may be recommended for this cluster if it meets specific required conditions. Consumers interested in the set of updates that are actually recommended for this cluster should use availableUpdates. This list may be empty if no updates are recommended, if the update service is unavailable, or if an empty or invalid channel has been specified. @@ -445,6 +448,8 @@ spec: x-kubernetes-validations: - rule: 'has(self.spec.capabilities) && has(self.spec.capabilities.additionalEnabledCapabilities) && self.spec.capabilities.baselineCapabilitySet == ''None'' && ''baremetal'' in self.spec.capabilities.additionalEnabledCapabilities ? ''MachineAPI'' in self.spec.capabilities.additionalEnabledCapabilities || (has(self.status) && has(self.status.capabilities) && has(self.status.capabilities.enabledCapabilities) && ''MachineAPI'' in self.status.capabilities.enabledCapabilities) : true' message: the `baremetal` capability requires the `MachineAPI` capability, which is neither explicitly or implicitly enabled in this cluster, please enable the `MachineAPI` capability + - rule: 'has(self.spec.capabilities) && has(self.spec.capabilities.additionalEnabledCapabilities) && self.spec.capabilities.baselineCapabilitySet == ''None'' && ''marketplace'' in self.spec.capabilities.additionalEnabledCapabilities ? ''OperatorLifecycleManager'' in self.spec.capabilities.additionalEnabledCapabilities || (has(self.status) && has(self.status.capabilities) && has(self.status.capabilities.enabledCapabilities) && ''OperatorLifecycleManager'' in self.status.capabilities.enabledCapabilities) : true' + message: the `marketplace` capability requires the `OperatorLifecycleManager` capability, which is neither explicitly or implicitly enabled in this cluster, please enable the `OperatorLifecycleManager` capability served: true storage: true subresources: diff --git a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_image.crd.yaml b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_image.crd.yaml index a160fef40..bc320544e 100644 --- a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_image.crd.yaml +++ b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_image.crd.yaml @@ -100,7 +100,7 @@ spec: items: type: string internalRegistryHostname: - description: internalRegistryHostname sets the hostname for the default internal image registry. The value must be in "hostname[:port]" format. This value is set by the image registry operator which controls the internal registry hostname. For backward compatibility, users can still use OPENSHIFT_DEFAULT_REGISTRY environment variable but this setting overrides the environment variable. + description: internalRegistryHostname sets the hostname for the default internal image registry. The value must be in "hostname[:port]" format. This value is set by the image registry operator which controls the internal registry hostname. type: string served: true storage: true diff --git a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_build.crd.yaml b/vendor/github.com/openshift/api/config/v1/0000_10_openshift-controller-manager-operator_01_build.crd.yaml similarity index 99% rename from vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_build.crd.yaml rename to vendor/github.com/openshift/api/config/v1/0000_10_openshift-controller-manager-operator_01_build.crd.yaml index 75166deb7..9e80775ff 100644 --- a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_build.crd.yaml +++ b/vendor/github.com/openshift/api/config/v1/0000_10_openshift-controller-manager-operator_01_build.crd.yaml @@ -3,6 +3,7 @@ kind: CustomResourceDefinition metadata: annotations: api-approved.openshift.io: https://github.com/openshift/api/pull/470 + capability.openshift.io/name: Build include.release.openshift.io/ibm-cloud-managed: "true" include.release.openshift.io/self-managed-high-availability: "true" include.release.openshift.io/single-node-developer: "true" diff --git a/vendor/github.com/openshift/api/config/v1/feature_gates.go b/vendor/github.com/openshift/api/config/v1/feature_gates.go index 1aa6b41ce..158487b5a 100644 --- a/vendor/github.com/openshift/api/config/v1/feature_gates.go +++ b/vendor/github.com/openshift/api/config/v1/feature_gates.go @@ -163,16 +163,6 @@ var ( OwningProduct: kubernetes, } - FeatureGateAdmissionWebhookMatchConditions = FeatureGateName("AdmissionWebhookMatchConditions") - admissionWebhookMatchConditions = FeatureGateDescription{ - FeatureGateAttributes: FeatureGateAttributes{ - Name: FeatureGateAdmissionWebhookMatchConditions, - }, - OwningJiraComponent: "kube-apiserver", - ResponsiblePerson: "benluddy", - OwningProduct: kubernetes, - } - FeatureGateAzureWorkloadIdentity = FeatureGateName("AzureWorkloadIdentity") azureWorkloadIdentity = FeatureGateDescription{ FeatureGateAttributes: FeatureGateAttributes{ diff --git a/vendor/github.com/openshift/api/config/v1/stable.build.testsuite.yaml b/vendor/github.com/openshift/api/config/v1/stable.build.testsuite.yaml index cdd8a9b70..b422ebd20 100644 --- a/vendor/github.com/openshift/api/config/v1/stable.build.testsuite.yaml +++ b/vendor/github.com/openshift/api/config/v1/stable.build.testsuite.yaml @@ -1,6 +1,6 @@ apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this name: "[Stable] Build" -crd: 0000_10_config-operator_01_build.crd.yaml +crd: 0000_10_openshift-controller-manager-operator_01_build.crd.yaml tests: onCreate: - name: Should be able to create a minimal Build diff --git a/vendor/github.com/openshift/api/config/v1/stable.clusterversion.testsuite.yaml b/vendor/github.com/openshift/api/config/v1/stable.clusterversion.testsuite.yaml index 914d06d12..50bb3e027 100644 --- a/vendor/github.com/openshift/api/config/v1/stable.clusterversion.testsuite.yaml +++ b/vendor/github.com/openshift/api/config/v1/stable.clusterversion.testsuite.yaml @@ -130,6 +130,38 @@ tests: additionalEnabledCapabilities: - baremetal expectedError: the `baremetal` capability requires the `MachineAPI` capability, which is neither explicitly or implicitly enabled in this cluster, please enable the `MachineAPI` capability + - name: Should be able to create a ClusterVersion with base capability None, and additional capabilities marketplace and OperatorLifecycleManager + initial: | + apiVersion: config.openshift.io/v1 + kind: ClusterVersion + spec: + clusterID: foo + capabilities: + baselineCapabilitySet: None + additionalEnabledCapabilities: + - marketplace + - OperatorLifecycleManager + expected: | + apiVersion: config.openshift.io/v1 + kind: ClusterVersion + spec: + clusterID: foo + capabilities: + baselineCapabilitySet: None + additionalEnabledCapabilities: + - marketplace + - OperatorLifecycleManager + - name: Should not be able to create a ClusterVersion with base capability None, and additional capabilities marketplace without OperatorLifecycleManager + initial: | + apiVersion: config.openshift.io/v1 + kind: ClusterVersion + spec: + clusterID: foo + capabilities: + baselineCapabilitySet: None + additionalEnabledCapabilities: + - marketplace + expectedError: the `marketplace` capability requires the `OperatorLifecycleManager` capability, which is neither explicitly or implicitly enabled in this cluster, please enable the `OperatorLifecycleManager` capability onUpdate: - name: Should not allow image to be set if architecture set initial: | @@ -276,3 +308,111 @@ tests: additionalEnabledCapabilities: - baremetal expectedError: the `baremetal` capability requires the `MachineAPI` capability, which is neither explicitly or implicitly enabled in this cluster, please enable the `MachineAPI` capability + - name: Should be able to add the marketplace capability with a ClusterVersion with base capability None, and implicitly enabled OperatorLifecycleManager + initial: | + apiVersion: config.openshift.io/v1 + kind: ClusterVersion + spec: + clusterID: foo + capabilities: + baselineCapabilitySet: None + status: + desired: + version: foo + image: foo + observedGeneration: 1 + versionHash: foo + availableUpdates: + - version: foo + image: foo + capabilities: + enabledCapabilities: + - OperatorLifecycleManager + updated: | + apiVersion: config.openshift.io/v1 + kind: ClusterVersion + spec: + clusterID: foo + capabilities: + baselineCapabilitySet: None + additionalEnabledCapabilities: + - marketplace + status: + desired: + version: foo + image: foo + observedGeneration: 1 + versionHash: foo + availableUpdates: + - version: foo + image: foo + capabilities: + enabledCapabilities: + - OperatorLifecycleManager + expected: | + apiVersion: config.openshift.io/v1 + kind: ClusterVersion + spec: + clusterID: foo + capabilities: + baselineCapabilitySet: None + additionalEnabledCapabilities: + - marketplace + status: + desired: + version: foo + image: foo + observedGeneration: 1 + versionHash: foo + availableUpdates: + - version: foo + image: foo + capabilities: + enabledCapabilities: + - OperatorLifecycleManager + - name: Should be able to add the marketplace capability with a ClusterVersion with base capability None, with the OperatorLifecycleManager capability + initial: | + apiVersion: config.openshift.io/v1 + kind: ClusterVersion + spec: + clusterID: foo + capabilities: + baselineCapabilitySet: None + updated: | + apiVersion: config.openshift.io/v1 + kind: ClusterVersion + spec: + clusterID: foo + capabilities: + baselineCapabilitySet: None + additionalEnabledCapabilities: + - marketplace + - OperatorLifecycleManager + expected: | + apiVersion: config.openshift.io/v1 + kind: ClusterVersion + spec: + clusterID: foo + capabilities: + baselineCapabilitySet: None + additionalEnabledCapabilities: + - marketplace + - OperatorLifecycleManager + - name: Should not be able to add the marketplace capability with a ClusterVersion with base capability None, and without OperatorLifecycleManager + initial: | + apiVersion: config.openshift.io/v1 + kind: ClusterVersion + spec: + clusterID: foo + capabilities: + baselineCapabilitySet: None + updated: | + apiVersion: config.openshift.io/v1 + kind: ClusterVersion + spec: + clusterID: foo + capabilities: + baselineCapabilitySet: None + additionalEnabledCapabilities: + - marketplace + expectedError: the `marketplace` capability requires the `OperatorLifecycleManager` capability, which is neither explicitly or implicitly enabled in this cluster, please enable the `OperatorLifecycleManager` capability diff --git a/vendor/github.com/openshift/api/config/v1/types_cluster_version.go b/vendor/github.com/openshift/api/config/v1/types_cluster_version.go index 3fbe39e4d..a9bade6fe 100644 --- a/vendor/github.com/openshift/api/config/v1/types_cluster_version.go +++ b/vendor/github.com/openshift/api/config/v1/types_cluster_version.go @@ -14,6 +14,7 @@ import ( // Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). // +openshift:compatibility-gen:level=1 // +kubebuilder:validation:XValidation:rule="has(self.spec.capabilities) && has(self.spec.capabilities.additionalEnabledCapabilities) && self.spec.capabilities.baselineCapabilitySet == 'None' && 'baremetal' in self.spec.capabilities.additionalEnabledCapabilities ? 'MachineAPI' in self.spec.capabilities.additionalEnabledCapabilities || (has(self.status) && has(self.status.capabilities) && has(self.status.capabilities.enabledCapabilities) && 'MachineAPI' in self.status.capabilities.enabledCapabilities) : true",message="the `baremetal` capability requires the `MachineAPI` capability, which is neither explicitly or implicitly enabled in this cluster, please enable the `MachineAPI` capability" +// +kubebuilder:validation:XValidation:rule="has(self.spec.capabilities) && has(self.spec.capabilities.additionalEnabledCapabilities) && self.spec.capabilities.baselineCapabilitySet == 'None' && 'marketplace' in self.spec.capabilities.additionalEnabledCapabilities ? 'OperatorLifecycleManager' in self.spec.capabilities.additionalEnabledCapabilities || (has(self.status) && has(self.status.capabilities) && has(self.status.capabilities.enabledCapabilities) && 'OperatorLifecycleManager' in self.status.capabilities.enabledCapabilities) : true",message="the `marketplace` capability requires the `OperatorLifecycleManager` capability, which is neither explicitly or implicitly enabled in this cluster, please enable the `OperatorLifecycleManager` capability" type ClusterVersion struct { metav1.TypeMeta `json:",inline"` @@ -248,7 +249,7 @@ const ( ) // ClusterVersionCapability enumerates optional, core cluster components. -// +kubebuilder:validation:Enum=openshift-samples;baremetal;marketplace;Console;Insights;Storage;CSISnapshot;NodeTuning;MachineAPI;Build;DeploymentConfig;ImageRegistry +// +kubebuilder:validation:Enum=openshift-samples;baremetal;marketplace;Console;Insights;Storage;CSISnapshot;NodeTuning;MachineAPI;Build;DeploymentConfig;ImageRegistry;OperatorLifecycleManager type ClusterVersionCapability string const ( @@ -267,6 +268,9 @@ const ( // ClusterVersionCapabilityMarketplace manages the Marketplace operator which // supplies Operator Lifecycle Manager (OLM) users with default catalogs of // "optional" operators. + // + // Note that Marketplace has a hard requirement on OLM. OLM can not be disabled + // while Marketplace is enabled. ClusterVersionCapabilityMarketplace ClusterVersionCapability = "marketplace" // ClusterVersionCapabilityConsole manages the Console operator which @@ -331,9 +335,14 @@ const ( // The following resources are taken into account: // - deploymentconfigs ClusterVersionCapabilityDeploymentConfig ClusterVersionCapability = "DeploymentConfig" + // ClusterVersionCapabilityImageRegistry manages the image registry which // allows to distribute Docker images ClusterVersionCapabilityImageRegistry ClusterVersionCapability = "ImageRegistry" + + // ClusterVersionCapabilityOperatorLifecycleManager manages the Operator Lifecycle Manager + // which itself manages the lifecycle of operators + ClusterVersionCapabilityOperatorLifecycleManager ClusterVersionCapability = "OperatorLifecycleManager" ) // KnownClusterVersionCapabilities includes all known optional, core cluster components. @@ -350,6 +359,7 @@ var KnownClusterVersionCapabilities = []ClusterVersionCapability{ ClusterVersionCapabilityBuild, ClusterVersionCapabilityDeploymentConfig, ClusterVersionCapabilityImageRegistry, + ClusterVersionCapabilityOperatorLifecycleManager, } // ClusterVersionCapabilitySet defines sets of cluster version capabilities. @@ -448,6 +458,7 @@ var ClusterVersionCapabilitySets = map[ClusterVersionCapabilitySet][]ClusterVers ClusterVersionCapabilityBuild, ClusterVersionCapabilityDeploymentConfig, ClusterVersionCapabilityImageRegistry, + ClusterVersionCapabilityOperatorLifecycleManager, }, } diff --git a/vendor/github.com/openshift/api/config/v1/types_feature.go b/vendor/github.com/openshift/api/config/v1/types_feature.go index 47ebe18b4..4bae91db8 100644 --- a/vendor/github.com/openshift/api/config/v1/types_feature.go +++ b/vendor/github.com/openshift/api/config/v1/types_feature.go @@ -164,15 +164,12 @@ var FeatureSets = map[FeatureSet]*FeatureGateEnabledDisabled{ }, TechPreviewNoUpgrade: newDefaultFeatures(). without(validatingAdmissionPolicy). - with(externalCloudProvider). - with(externalCloudProviderGCP). with(csiDriverSharedResource). with(nodeSwap). with(machineAPIProviderOpenStack). with(insightsConfigAPI). with(retroactiveDefaultStorageClass). with(dynamicResourceAllocation). - with(admissionWebhookMatchConditions). with(gateGatewayAPI). with(maxUnavailableStatefulSet). without(eventedPleg). @@ -194,7 +191,9 @@ var defaultFeatures = &FeatureGateEnabledDisabled{ alibabaPlatform, // This is a bug, it should be TechPreviewNoUpgrade. This must be downgraded before 4.14 is shipped. azureWorkloadIdentity, cloudDualStackNodeIPs, + externalCloudProvider, externalCloudProviderAzure, + externalCloudProviderGCP, externalCloudProviderExternal, privateHostedZoneAWS, buildCSIVolumes, diff --git a/vendor/github.com/openshift/api/config/v1/types_image.go b/vendor/github.com/openshift/api/config/v1/types_image.go index eb7643f2b..928224c0d 100644 --- a/vendor/github.com/openshift/api/config/v1/types_image.go +++ b/vendor/github.com/openshift/api/config/v1/types_image.go @@ -64,12 +64,10 @@ type ImageSpec struct { } type ImageStatus struct { - // internalRegistryHostname sets the hostname for the default internal image // registry. The value must be in "hostname[:port]" format. // This value is set by the image registry operator which controls the internal registry - // hostname. For backward compatibility, users can still use OPENSHIFT_DEFAULT_REGISTRY - // environment variable but this setting overrides the environment variable. + // hostname. // +optional InternalRegistryHostname string `json:"internalRegistryHostname,omitempty"` 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 d252e2b79..048c37b16 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 @@ -903,7 +903,7 @@ func (ImageSpec) SwaggerDoc() map[string]string { } var map_ImageStatus = map[string]string{ - "internalRegistryHostname": "internalRegistryHostname sets the hostname for the default internal image registry. The value must be in \"hostname[:port]\" format. This value is set by the image registry operator which controls the internal registry hostname. For backward compatibility, users can still use OPENSHIFT_DEFAULT_REGISTRY environment variable but this setting overrides the environment variable.", + "internalRegistryHostname": "internalRegistryHostname sets the hostname for the default internal image registry. The value must be in \"hostname[:port]\" format. This value is set by the image registry operator which controls the internal registry hostname.", "externalRegistryHostnames": "externalRegistryHostnames provides the hostnames for the default external image registry. The external hostname should be set only when the image registry is exposed externally. The first value is used in 'publicDockerImageRepository' field in ImageStreams. The value must be in \"hostname[:port]\" format.", } diff --git a/vendor/github.com/openshift/api/helm/v1beta1/0000_10-helm-chart-repository.crd.yaml b/vendor/github.com/openshift/api/helm/v1beta1/00_helm-chart-repository.crd.yaml similarity index 100% rename from vendor/github.com/openshift/api/helm/v1beta1/0000_10-helm-chart-repository.crd.yaml rename to vendor/github.com/openshift/api/helm/v1beta1/00_helm-chart-repository.crd.yaml diff --git a/vendor/github.com/openshift/api/helm/v1beta1/0000_10-project-helm-chart-repository.crd.yaml b/vendor/github.com/openshift/api/helm/v1beta1/00_project-helm-chart-repository.crd.yaml similarity index 100% rename from vendor/github.com/openshift/api/helm/v1beta1/0000_10-project-helm-chart-repository.crd.yaml rename to vendor/github.com/openshift/api/helm/v1beta1/00_project-helm-chart-repository.crd.yaml diff --git a/vendor/github.com/openshift/api/helm/v1beta1/stable.helmchartrepository.testsuite.yaml b/vendor/github.com/openshift/api/helm/v1beta1/stable.helmchartrepository.testsuite.yaml index bac1227e2..64f1447cc 100644 --- a/vendor/github.com/openshift/api/helm/v1beta1/stable.helmchartrepository.testsuite.yaml +++ b/vendor/github.com/openshift/api/helm/v1beta1/stable.helmchartrepository.testsuite.yaml @@ -1,6 +1,6 @@ apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this name: "[Stable] HelmChartRepository" -crd: 0000_10-helm-chart-repository.crd.yaml +crd: 00_helm-chart-repository.crd.yaml tests: onCreate: - name: Should be able to create a minimal HelmChartRepository diff --git a/vendor/github.com/openshift/api/helm/v1beta1/stable.projecthelmchartrepository.testsuite.yaml b/vendor/github.com/openshift/api/helm/v1beta1/stable.projecthelmchartrepository.testsuite.yaml index e11f9d349..d7c402a53 100644 --- a/vendor/github.com/openshift/api/helm/v1beta1/stable.projecthelmchartrepository.testsuite.yaml +++ b/vendor/github.com/openshift/api/helm/v1beta1/stable.projecthelmchartrepository.testsuite.yaml @@ -1,6 +1,6 @@ apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this name: "[Stable] ProjectHelmChartRepository" -crd: 0000_10-project-helm-chart-repository.crd.yaml +crd: 00_project-helm-chart-repository.crd.yaml tests: onCreate: - name: Should be able to create a minimal ProjectHelmChartRepository diff --git a/vendor/github.com/openshift/api/kubecontrolplane/v1/types.go b/vendor/github.com/openshift/api/kubecontrolplane/v1/types.go index aae8f464c..b9cdcc213 100644 --- a/vendor/github.com/openshift/api/kubecontrolplane/v1/types.go +++ b/vendor/github.com/openshift/api/kubecontrolplane/v1/types.go @@ -1,10 +1,10 @@ package v1 import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "fmt" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + configv1 "github.com/openshift/api/config/v1" osinv1 "github.com/openshift/api/osin/v1" ) @@ -76,8 +76,6 @@ func (t Arguments) String() string { type KubeAPIServerImagePolicyConfig struct { // internalRegistryHostname sets the hostname for the default internal image // registry. The value must be in "hostname[:port]" format. - // For backward compatibility, users can still use OPENSHIFT_DEFAULT_REGISTRY - // environment variable but this setting overrides the environment variable. InternalRegistryHostname string `json:"internalRegistryHostname"` // externalRegistryHostnames provides the hostnames for the default external image // registry. The external hostname should be set only when the image registry diff --git a/vendor/github.com/openshift/api/kubecontrolplane/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/kubecontrolplane/v1/zz_generated.swagger_doc_generated.go index 3ee8b23fd..906bb271b 100644 --- a/vendor/github.com/openshift/api/kubecontrolplane/v1/zz_generated.swagger_doc_generated.go +++ b/vendor/github.com/openshift/api/kubecontrolplane/v1/zz_generated.swagger_doc_generated.go @@ -40,7 +40,7 @@ func (KubeAPIServerConfig) SwaggerDoc() map[string]string { } var map_KubeAPIServerImagePolicyConfig = map[string]string{ - "internalRegistryHostname": "internalRegistryHostname sets the hostname for the default internal image registry. The value must be in \"hostname[:port]\" format. For backward compatibility, users can still use OPENSHIFT_DEFAULT_REGISTRY environment variable but this setting overrides the environment variable.", + "internalRegistryHostname": "internalRegistryHostname sets the hostname for the default internal image registry. The value must be in \"hostname[:port]\" format.", "externalRegistryHostnames": "externalRegistryHostnames provides the hostnames for the default external image registry. The external hostname should be set only when the image registry is exposed externally. The first value is used in 'publicDockerImageRepository' field in ImageStreams. The value must be in \"hostname[:port]\" format.", } diff --git a/vendor/github.com/openshift/api/legacyconfig/v1/types.go b/vendor/github.com/openshift/api/legacyconfig/v1/types.go index 871eadd8b..eaf40b6ee 100644 --- a/vendor/github.com/openshift/api/legacyconfig/v1/types.go +++ b/vendor/github.com/openshift/api/legacyconfig/v1/types.go @@ -414,8 +414,6 @@ type ImagePolicyConfig struct { AllowedRegistriesForImport *AllowedRegistries `json:"allowedRegistriesForImport,omitempty"` // InternalRegistryHostname sets the hostname for the default internal image // registry. The value must be in "hostname[:port]" format. - // For backward compatibility, users can still use OPENSHIFT_DEFAULT_REGISTRY - // environment variable but this setting overrides the environment variable. InternalRegistryHostname string `json:"internalRegistryHostname,omitempty"` // ExternalRegistryHostname sets the hostname for the default external image // registry. The external hostname should be set only when the image registry @@ -442,7 +440,7 @@ type RegistryLocation struct { Insecure bool `json:"insecure,omitempty"` } -// holds the necessary configuration options for +// holds the necessary configuration options for type ProjectConfig struct { // DefaultNodeSelector holds default project node label selector DefaultNodeSelector string `json:"defaultNodeSelector"` @@ -482,7 +480,7 @@ type SecurityAllocator struct { MCSLabelsPerProject int `json:"mcsLabelsPerProject"` } -// holds the necessary configuration options for +// holds the necessary configuration options for type PolicyConfig struct { // UserAgentMatchingConfig controls how API calls from *voluntarily* identifying clients will be handled. THIS DOES NOT DEFEND AGAINST MALICIOUS CLIENTS! UserAgentMatchingConfig UserAgentMatchingConfig `json:"userAgentMatchingConfig"` @@ -737,7 +735,7 @@ type OAuthConfig struct { // AlwaysShowProviderSelection will force the provider selection page to render even when there is only a single provider. AlwaysShowProviderSelection bool `json:"alwaysShowProviderSelection"` - //IdentityProviders is an ordered list of ways for a user to identify themselves + // IdentityProviders is an ordered list of ways for a user to identify themselves IdentityProviders []IdentityProvider `json:"identityProviders"` // GrantConfig describes how to handle grants @@ -1563,7 +1561,6 @@ type BuildDefaultsConfig struct { // SourceStrategyDefaultsConfig contains values that apply to builds using the // source strategy. type SourceStrategyDefaultsConfig struct { - // incremental indicates if s2i build strategies should perform an incremental // build or not Incremental *bool `json:"incremental,omitempty"` diff --git a/vendor/github.com/openshift/api/legacyconfig/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/legacyconfig/v1/zz_generated.swagger_doc_generated.go index 29269b1a3..daa0868b6 100644 --- a/vendor/github.com/openshift/api/legacyconfig/v1/zz_generated.swagger_doc_generated.go +++ b/vendor/github.com/openshift/api/legacyconfig/v1/zz_generated.swagger_doc_generated.go @@ -364,7 +364,7 @@ var map_ImagePolicyConfig = map[string]string{ "scheduledImageImportMinimumIntervalSeconds": "ScheduledImageImportMinimumIntervalSeconds is the minimum number of seconds that can elapse between when image streams scheduled for background import are checked against the upstream repository. The default value is 15 minutes.", "maxScheduledImageImportsPerMinute": "MaxScheduledImageImportsPerMinute is the maximum number of scheduled image streams that will be imported in the background per minute. The default value is 60. Set to -1 for unlimited.", "allowedRegistriesForImport": "AllowedRegistriesForImport limits the container image registries that normal users may import images from. Set this list to the registries that you trust to contain valid Docker images and that you want applications to be able to import from. Users with permission to create Images or ImageStreamMappings via the API are not affected by this policy - typically only administrators or system integrations will have those permissions.", - "internalRegistryHostname": "InternalRegistryHostname sets the hostname for the default internal image registry. The value must be in \"hostname[:port]\" format. For backward compatibility, users can still use OPENSHIFT_DEFAULT_REGISTRY environment variable but this setting overrides the environment variable.", + "internalRegistryHostname": "InternalRegistryHostname sets the hostname for the default internal image registry. The value must be in \"hostname[:port]\" format.", "externalRegistryHostname": "ExternalRegistryHostname sets the hostname for the default external image registry. The external hostname should be set only when the image registry is exposed externally. The value is used in 'publicDockerImageRepository' field in ImageStreams. The value must be in \"hostname[:port]\" format.", "additionalTrustedCA": "AdditionalTrustedCA is a path to a pem bundle file containing additional CAs that should be trusted during imagestream import.", } @@ -722,7 +722,7 @@ func (PodManifestConfig) SwaggerDoc() map[string]string { } var map_PolicyConfig = map[string]string{ - "": "\n holds the necessary configuration options for", + "": "holds the necessary configuration options for", "userAgentMatchingConfig": "UserAgentMatchingConfig controls how API calls from *voluntarily* identifying clients will be handled. THIS DOES NOT DEFEND AGAINST MALICIOUS CLIENTS!", } @@ -731,7 +731,7 @@ func (PolicyConfig) SwaggerDoc() map[string]string { } var map_ProjectConfig = map[string]string{ - "": "\n holds the necessary configuration options for", + "": "holds the necessary configuration options for", "defaultNodeSelector": "DefaultNodeSelector holds default project node label selector", "projectRequestMessage": "ProjectRequestMessage is the string presented to a user if they are unable to request a project via the projectrequest api endpoint", "projectRequestTemplate": "ProjectRequestTemplate is the template to use for creating projects in response to projectrequest. It is in the format namespace/template and it is optional. If it is not specified, a default template is used.", diff --git a/vendor/github.com/openshift/api/openshiftcontrolplane/v1/types.go b/vendor/github.com/openshift/api/openshiftcontrolplane/v1/types.go index bd06c6ef4..05f0d795d 100644 --- a/vendor/github.com/openshift/api/openshiftcontrolplane/v1/types.go +++ b/vendor/github.com/openshift/api/openshiftcontrolplane/v1/types.go @@ -132,8 +132,6 @@ type ImagePolicyConfig struct { // internalRegistryHostname sets the hostname for the default internal image // registry. The value must be in "hostname[:port]" format. - // For backward compatibility, users can still use OPENSHIFT_DEFAULT_REGISTRY - // environment variable but this setting overrides the environment variable. InternalRegistryHostname string `json:"internalRegistryHostname"` // externalRegistryHostnames provides the hostnames for the default external image // registry. The external hostname should be set only when the image registry @@ -367,7 +365,6 @@ type BuildDefaultsConfig struct { // SourceStrategyDefaultsConfig contains values that apply to builds using the // source strategy. type SourceStrategyDefaultsConfig struct { - // incremental indicates if s2i build strategies should perform an incremental // build or not Incremental *bool `json:"incremental,omitempty"` diff --git a/vendor/github.com/openshift/api/openshiftcontrolplane/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/openshiftcontrolplane/v1/zz_generated.swagger_doc_generated.go index b50508a63..25a9333bb 100644 --- a/vendor/github.com/openshift/api/openshiftcontrolplane/v1/zz_generated.swagger_doc_generated.go +++ b/vendor/github.com/openshift/api/openshiftcontrolplane/v1/zz_generated.swagger_doc_generated.go @@ -111,7 +111,7 @@ func (ImageImportControllerConfig) SwaggerDoc() map[string]string { var map_ImagePolicyConfig = map[string]string{ "maxImagesBulkImportedPerRepository": "maxImagesBulkImportedPerRepository controls the number of images that are imported when a user does a bulk import of a container repository. This number is set low to prevent users from importing large numbers of images accidentally. Set -1 for no limit.", "allowedRegistriesForImport": "allowedRegistriesForImport limits the container image registries that normal users may import images from. Set this list to the registries that you trust to contain valid Docker images and that you want applications to be able to import from. Users with permission to create Images or ImageStreamMappings via the API are not affected by this policy - typically only administrators or system integrations will have those permissions.", - "internalRegistryHostname": "internalRegistryHostname sets the hostname for the default internal image registry. The value must be in \"hostname[:port]\" format. For backward compatibility, users can still use OPENSHIFT_DEFAULT_REGISTRY environment variable but this setting overrides the environment variable.", + "internalRegistryHostname": "internalRegistryHostname sets the hostname for the default internal image registry. The value must be in \"hostname[:port]\" format.", "externalRegistryHostnames": "externalRegistryHostnames provides the hostnames for the default external image registry. The external hostname should be set only when the image registry is exposed externally. The first value is used in 'publicDockerImageRepository' field in ImageStreams. The value must be in \"hostname[:port]\" format.", "additionalTrustedCA": "additionalTrustedCA is a path to a pem bundle file containing additional CAs that should be trusted during imagestream import.", } diff --git a/vendor/github.com/openshift/api/operator/v1/0000_50_ingress-operator_00-ingresscontroller.crd.yaml b/vendor/github.com/openshift/api/operator/v1/0000_50_ingress-operator_00-ingresscontroller.crd.yaml index 4ff57e35a..a5be103ac 100644 --- a/vendor/github.com/openshift/api/operator/v1/0000_50_ingress-operator_00-ingresscontroller.crd.yaml +++ b/vendor/github.com/openshift/api/operator/v1/0000_50_ingress-operator_00-ingresscontroller.crd.yaml @@ -507,6 +507,11 @@ spec: required: - type type: object + x-kubernetes-validations: + - message: container cannot be specified unless type is Container + rule: '!has(self.type) || self.type == "Container" || !has(self.container) || !has(self.container.maxLength) || self.container.maxLength == 1024' + - message: container and syslog cannot both be specified at the same time + rule: '!has(self.container) || !has(self.container.maxLength) || self.container.maxLength == 1024 || !has(self.syslog)' httpCaptureCookies: description: httpCaptureCookies specifies HTTP cookies that should be captured in access logs. If this field is empty, no cookies are captured. items: diff --git a/vendor/github.com/openshift/api/operator/v1/0000_80_machine-config-operator_01_config.crd.yaml b/vendor/github.com/openshift/api/operator/v1/0000_80_machine-config-operator_01_config.crd.yaml new file mode 100644 index 000000000..61ef7740e --- /dev/null +++ b/vendor/github.com/openshift/api/operator/v1/0000_80_machine-config-operator_01_config.crd.yaml @@ -0,0 +1,192 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + api-approved.openshift.io: https://github.com/openshift/api/pull/1453 + include.release.openshift.io/ibm-cloud-managed: "true" + include.release.openshift.io/self-managed-high-availability: "true" + include.release.openshift.io/single-node-developer: "true" + name: machineconfigurations.operator.openshift.io +spec: + group: operator.openshift.io + names: + kind: MachineConfiguration + plural: machineconfigurations + singular: machineconfiguration + scope: Cluster + versions: + - name: v1 + schema: + openAPIV3Schema: + description: "MachineConfiguration provides information to configure an operator to manage Machine Configuration. \n Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer)." + type: object + required: + - spec + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: spec is the specification of the desired behavior of the Machine Config Operator + type: object + properties: + failedRevisionLimit: + description: failedRevisionLimit is the number of failed static pod installer revisions to keep on disk and in the api -1 = unlimited, 0 or unset = 5 (default) + type: integer + format: int32 + forceRedeploymentReason: + description: forceRedeploymentReason can be used to force the redeployment of the operand by providing a unique string. This provides a mechanism to kick a previously failed deployment and provide a reason why you think it will work this time instead of failing again on the same config. + type: string + logLevel: + description: "logLevel is an intent based logging for an overall component. It does not give fine grained control, but it is a simple way to manage coarse grained logging choices that operators have to interpret for their operands. \n Valid values are: \"Normal\", \"Debug\", \"Trace\", \"TraceAll\". Defaults to \"Normal\"." + type: string + default: Normal + enum: + - "" + - Normal + - Debug + - Trace + - TraceAll + managementState: + description: managementState indicates whether and how the operator should manage the component + type: string + pattern: ^(Managed|Unmanaged|Force|Removed)$ + observedConfig: + description: observedConfig holds a sparse config that controller has observed from the cluster state. It exists in spec because it is an input to the level for the operator + type: object + nullable: true + x-kubernetes-preserve-unknown-fields: true + operatorLogLevel: + description: "operatorLogLevel is an intent based logging for the operator itself. It does not give fine grained control, but it is a simple way to manage coarse grained logging choices that operators have to interpret for themselves. \n Valid values are: \"Normal\", \"Debug\", \"Trace\", \"TraceAll\". Defaults to \"Normal\"." + type: string + default: Normal + enum: + - "" + - Normal + - Debug + - Trace + - TraceAll + succeededRevisionLimit: + description: succeededRevisionLimit is the number of successful static pod installer revisions to keep on disk and in the api -1 = unlimited, 0 or unset = 5 (default) + type: integer + format: int32 + unsupportedConfigOverrides: + description: unsupportedConfigOverrides overrides the final configuration that was computed by the operator. Red Hat does not support the use of this field. Misuse of this field could lead to unexpected behavior or conflict with other configuration options. Seek guidance from the Red Hat support before using this field. Use of this property blocks cluster upgrades, it must be removed before upgrading your cluster. + type: object + nullable: true + x-kubernetes-preserve-unknown-fields: true + status: + description: status is the most recently observed status of the Machine Config Operator + type: object + properties: + conditions: + description: conditions is a list of conditions and their status + type: array + items: + description: OperatorCondition is just the standard condition fields. + type: object + properties: + lastTransitionTime: + type: string + format: date-time + message: + type: string + reason: + type: string + status: + type: string + type: + type: string + generations: + description: generations are used to determine when an item needs to be reconciled or has changed in a way that needs a reaction. + type: array + items: + description: GenerationStatus keeps track of the generation for a given resource so that decisions about forced updates can be made. + type: object + properties: + group: + description: group is the group of the thing you're tracking + type: string + hash: + description: hash is an optional field set for resources without generation that are content sensitive like secrets and configmaps + type: string + lastGeneration: + description: lastGeneration is the last generation of the workload controller involved + type: integer + format: int64 + name: + description: name is the name of the thing you're tracking + type: string + namespace: + description: namespace is where the thing you're tracking is + type: string + resource: + description: resource is the resource type of the thing you're tracking + type: string + latestAvailableRevision: + description: latestAvailableRevision is the deploymentID of the most recent deployment + type: integer + format: int32 + latestAvailableRevisionReason: + description: latestAvailableRevisionReason describe the detailed reason for the most recent deployment + type: string + nodeStatuses: + description: nodeStatuses track the deployment values and errors across individual nodes + type: array + items: + description: NodeStatus provides information about the current state of a particular node managed by this operator. + type: object + properties: + currentRevision: + description: currentRevision is the generation of the most recently successful deployment + type: integer + format: int32 + lastFailedCount: + description: lastFailedCount is how often the installer pod of the last failed revision failed. + type: integer + lastFailedReason: + description: lastFailedReason is a machine readable failure reason string. + type: string + lastFailedRevision: + description: lastFailedRevision is the generation of the deployment we tried and failed to deploy. + type: integer + format: int32 + lastFailedRevisionErrors: + description: lastFailedRevisionErrors is a list of human readable errors during the failed deployment referenced in lastFailedRevision. + type: array + items: + type: string + lastFailedTime: + description: lastFailedTime is the time the last failed revision failed the last time. + type: string + format: date-time + lastFallbackCount: + description: lastFallbackCount is how often a fallback to a previous revision happened. + type: integer + nodeName: + description: nodeName is the name of the node + type: string + targetRevision: + description: targetRevision is the generation of the deployment we're trying to apply + type: integer + format: int32 + observedGeneration: + description: observedGeneration is the last generation change you've dealt with + type: integer + format: int64 + readyReplicas: + description: readyReplicas indicates how many replicas are ready and at the desired state + type: integer + format: int32 + version: + description: version is the level this availability applies to + type: string + served: true + storage: true + subresources: + status: {} diff --git a/vendor/github.com/openshift/api/operator/v1/register.go b/vendor/github.com/openshift/api/operator/v1/register.go index bd3dc420b..21919f9a8 100644 --- a/vendor/github.com/openshift/api/operator/v1/register.go +++ b/vendor/github.com/openshift/api/operator/v1/register.go @@ -54,6 +54,8 @@ func addKnownTypes(scheme *runtime.Scheme) error { &KubeSchedulerList{}, &KubeStorageVersionMigrator{}, &KubeStorageVersionMigratorList{}, + &MachineConfiguration{}, + &MachineConfigurationList{}, &Network{}, &NetworkList{}, &OpenShiftAPIServer{}, diff --git a/vendor/github.com/openshift/api/operator/v1/stable.ingresscontroller.testsuite.yaml b/vendor/github.com/openshift/api/operator/v1/stable.ingresscontroller.testsuite.yaml index 903d8e60c..6a816ee72 100644 --- a/vendor/github.com/openshift/api/operator/v1/stable.ingresscontroller.testsuite.yaml +++ b/vendor/github.com/openshift/api/operator/v1/stable.ingresscontroller.testsuite.yaml @@ -476,3 +476,305 @@ tests: set: value: DENY expectedError: 'IngressController.operator.openshift.io "default-not-allowed-values" is invalid: [spec.httpHeaders.actions.response[0].action.type: Required value, : Invalid value: "null": some validation rules were not checked because the object was invalid; correct the existing errors to complete validation]' + + - name: "Should require spec.logging.access.destination if spec.logging.access is not null" + initial: | + apiVersion: operator.openshift.io/v1 + kind: IngressController + metadata: + name: access-logging-null-destination + namespace: openshift-ingress-operator + spec: + logging: + access: {} + expectedError: "spec.logging.access.destination: Required value" + - name: "Should require spec.logging.access.destination.type if spec.logging.access.destination is not null" + initial: | + apiVersion: operator.openshift.io/v1 + kind: IngressController + metadata: + name: access-logging-empty-destination-type + namespace: openshift-ingress-operator + spec: + logging: + access: + destination: + container: {} + expectedError: "spec.logging.access.destination.type: Required value" + - name: "Should be able to specify empty spec.logging.access.destination.container with type: Container" + initial: | + apiVersion: operator.openshift.io/v1 + kind: IngressController + metadata: + name: container-logging-empty-settings + namespace: openshift-ingress-operator + spec: + logging: + access: + destination: + type: Container + container: {} + expected: | + apiVersion: operator.openshift.io/v1 + kind: IngressController + metadata: + name: container-logging-empty-settings + namespace: openshift-ingress-operator + spec: + httpEmptyRequestsPolicy: Respond + logging: + access: + destination: + type: Container + container: + maxLength: 1024 + logEmptyRequests: Log + - name: "Should be able to omit spec.logging.access.destination.container with type: Container" + initial: | + apiVersion: operator.openshift.io/v1 + kind: IngressController + metadata: + name: container-logging-null-settings + namespace: openshift-ingress-operator + spec: + logging: + access: + destination: + type: Container + expected: | + apiVersion: operator.openshift.io/v1 + kind: IngressController + metadata: + name: container-logging-null-settings + namespace: openshift-ingress-operator + spec: + httpEmptyRequestsPolicy: Respond + logging: + access: + destination: + type: Container + logEmptyRequests: Log + - name: "Should be able to specify spec.logging.access.destination.syslog with type: Syslog" + initial: | + apiVersion: operator.openshift.io/v1 + kind: IngressController + metadata: + name: syslog + namespace: openshift-ingress-operator + spec: + logging: + access: + destination: + type: Syslog + syslog: + address: 1.2.3.4 + port: 514 + expected: | + apiVersion: operator.openshift.io/v1 + kind: IngressController + metadata: + name: syslog + namespace: openshift-ingress-operator + spec: + httpEmptyRequestsPolicy: Respond + logging: + access: + destination: + type: Syslog + syslog: + address: 1.2.3.4 + maxLength: 1024 + port: 514 + logEmptyRequests: Log + - name: "Should not be able to specify empty spec.logging.access.destination.syslog with type: Syslog" + initial: | + apiVersion: operator.openshift.io/v1 + kind: IngressController + metadata: + name: syslog-empty-settings + namespace: openshift-ingress-operator + spec: + logging: + access: + destination: + type: Syslog + syslog: {} + expectedError: "address: Required value" + # OpenShift 4.5 added the access logging API without validation to prevent + # null spec.logging.access.destination.syslog with type: Syslog, so validation + # must forevermore allow this combination. (The ingress operator doesn't + # actually enable syslog logging if the syslog field is null.) + - name: "Should be able to omit spec.logging.access.destination.syslog with type: Syslog" + initial: | + apiVersion: operator.openshift.io/v1 + kind: IngressController + metadata: + name: syslog-null-settings + namespace: openshift-ingress-operator + spec: + logging: + access: + destination: + type: Syslog + expected: | + apiVersion: operator.openshift.io/v1 + kind: IngressController + metadata: + name: syslog-null-settings + namespace: openshift-ingress-operator + spec: + httpEmptyRequestsPolicy: Respond + logging: + access: + destination: + type: Syslog + logEmptyRequests: Log + # OpenShift 4.5 added the access logging API without validation to prevent + # specifying spec.logging.access.destination.syslog with type: Container, so + # validation must forevermore allow this combination. (The ingress operator + # enables container logging and ignores the syslog settings in this case.) + - name: "Should be able to specify spec.logging.access.destination.syslog with type: Container" + initial: | + apiVersion: operator.openshift.io/v1 + kind: IngressController + metadata: + name: container-logging-with-bogus-syslog-configuration + namespace: openshift-ingress-operator + spec: + logging: + access: + destination: + type: Container + container: {} + syslog: + address: 1.2.3.4 + maxLength: 1024 + port: 514 + expected: | + apiVersion: operator.openshift.io/v1 + kind: IngressController + metadata: + name: container-logging-with-bogus-syslog-configuration + namespace: openshift-ingress-operator + spec: + httpEmptyRequestsPolicy: Respond + logging: + access: + destination: + type: Container + container: + maxLength: 1024 + syslog: + address: 1.2.3.4 + maxLength: 1024 + port: 514 + logEmptyRequests: Log + - name: "Should be able to specify spec.logging.access.destination.container with type: Syslog" + initial: | + apiVersion: operator.openshift.io/v1 + kind: IngressController + metadata: + name: syslog-logging-with-bogus-container-configuration + namespace: openshift-ingress-operator + spec: + logging: + access: + destination: + type: Syslog + container: {} + syslog: + address: 1.2.3.4 + maxLength: 1024 + port: 514 + expected: | + apiVersion: operator.openshift.io/v1 + kind: IngressController + metadata: + name: syslog-logging-with-bogus-container-configuration + namespace: openshift-ingress-operator + spec: + httpEmptyRequestsPolicy: Respond + logging: + access: + destination: + type: Syslog + container: + maxLength: 1024 + syslog: + address: 1.2.3.4 + maxLength: 1024 + port: 514 + logEmptyRequests: Log + # OpenShift 4.14 added the spec.logging.access.destination.container.maxLength + # field. As noted above, we must allow + # spec.logging.access.destination.container when type: Syslog is specified. + # Also, due to defaulting, we must allow + # spec.logging.access.destination.container.maxLength with the default value + # because the default value gets set automatically when + # spec.logging.access.destination.container is not null. However, we do not + # need to allow spec.logging.access.destination.container.maxLength with a + # non-default value when type: Syslog is specified. + - name: "Should be able to specify the default value for spec.logging.access.destination.container.maxLength with type: Syslog" + initial: | + apiVersion: operator.openshift.io/v1 + kind: IngressController + metadata: + name: syslog-logging-with-default-container-maxlength + namespace: openshift-ingress-operator + spec: + logging: + access: + destination: + type: Syslog + container: + maxLength: 1024 + expected: | + apiVersion: operator.openshift.io/v1 + kind: IngressController + metadata: + name: syslog-logging-with-default-container-maxlength + namespace: openshift-ingress-operator + spec: + httpEmptyRequestsPolicy: Respond + logging: + access: + destination: + type: Syslog + container: + maxLength: 1024 + logEmptyRequests: Log + - name: "Should not be able to specify a non-default value for spec.logging.access.destination.container.maxLength with type: Syslog" + initial: | + apiVersion: operator.openshift.io/v1 + kind: IngressController + metadata: + name: syslog-logging-with-non-default-container-maxlength + namespace: openshift-ingress-operator + spec: + logging: + access: + destination: + type: Syslog + container: + maxLength: 2048 + expectedError: "container cannot be specified unless type is Container" + - name: "Should not be able to specify spec.logging.access.destination.syslog and a non-default value for spec.logging.access.destination.container.maxLength" + initial: | + apiVersion: operator.openshift.io/v1 + kind: IngressController + metadata: + name: container-logging-with-non-default-syslog-maxlength + namespace: openshift-ingress-operator + spec: + httpEmptyRequestsPolicy: Respond + logging: + access: + destination: + type: Container + container: + maxLength: 2048 + syslog: + address: 1.2.3.4 + maxLength: 1024 + port: 514 + expectedError: "container and syslog cannot both be specified at the same time" diff --git a/vendor/github.com/openshift/api/operator/v1/stable.machineconfiguration.testsuite.yaml b/vendor/github.com/openshift/api/operator/v1/stable.machineconfiguration.testsuite.yaml new file mode 100644 index 000000000..6992a8eaa --- /dev/null +++ b/vendor/github.com/openshift/api/operator/v1/stable.machineconfiguration.testsuite.yaml @@ -0,0 +1,16 @@ +apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this +name: "[Stable] MachineConfiguration" +crd: 0000_80_machine-config-operator_01_config.crd.yaml +tests: + onCreate: + - name: Should be able to create a minimal MachineConfiguration + initial: | + apiVersion: operator.openshift.io/v1 + kind: MachineConfiguration + spec: {} # No spec is required for a MachineConfiguration + expected: | + apiVersion: operator.openshift.io/v1 + kind: MachineConfiguration + spec: + logLevel: Normal + operatorLogLevel: Normal diff --git a/vendor/github.com/openshift/api/operator/v1/types.go b/vendor/github.com/openshift/api/operator/v1/types.go index 8b650f329..40037e1fe 100644 --- a/vendor/github.com/openshift/api/operator/v1/types.go +++ b/vendor/github.com/openshift/api/operator/v1/types.go @@ -201,11 +201,11 @@ type StaticPodOperatorStatus struct { // latestAvailableRevision is the deploymentID of the most recent deployment // +optional - LatestAvailableRevision int32 `json:"latestAvailableRevision,omitEmpty"` + LatestAvailableRevision int32 `json:"latestAvailableRevision,omitempty"` // latestAvailableRevisionReason describe the detailed reason for the most recent deployment // +optional - LatestAvailableRevisionReason string `json:"latestAvailableRevisionReason,omitEmpty"` + LatestAvailableRevisionReason string `json:"latestAvailableRevisionReason,omitempty"` // nodeStatuses track the deployment values and errors across individual nodes // +optional diff --git a/vendor/github.com/openshift/api/operator/v1/types_ingress.go b/vendor/github.com/openshift/api/operator/v1/types_ingress.go index 3d9f512a9..c28b73ed9 100644 --- a/vendor/github.com/openshift/api/operator/v1/types_ingress.go +++ b/vendor/github.com/openshift/api/operator/v1/types_ingress.go @@ -1054,6 +1054,22 @@ type ContainerLoggingDestinationParameters struct { } // LoggingDestination describes a destination for log messages. +// + --- +// + We added the spec.logging.access.destination.container and +// + spec.logging.access.destination.syslog fields in OpenShift 4.5 without any +// + validation rules to prevent the user from specifying both fields at the +// + same time. Adding such validation rules in a subsequent release would +// + break API compatibility between releases. +// + +// + We added the spec.logging.access.destination.container.maxLength field in +// + OpenShift 4.14, and we added the following validation rules in the same +// + release, so they do not break compatibility between releases. Note that +// + API defaulting requires us to allow the default value for +// + container.maxLength if container is non-null even when type is Syslog. +// + +// +kubebuilder:validation:XValidation:rule=`!has(self.type) || self.type == "Container" || !has(self.container) || !has(self.container.maxLength) || self.container.maxLength == 1024`,message="container cannot be specified unless type is Container" +// +kubebuilder:validation:XValidation:rule=`!has(self.container) || !has(self.container.maxLength) || self.container.maxLength == 1024 || !has(self.syslog)`,message="container and syslog cannot both be specified at the same time" +// // +union type LoggingDestination struct { // type is the type of destination for logs. It must be one of the diff --git a/vendor/github.com/openshift/api/operator/v1/types_machineconfiguration.go b/vendor/github.com/openshift/api/operator/v1/types_machineconfiguration.go new file mode 100644 index 000000000..8651e89a7 --- /dev/null +++ b/vendor/github.com/openshift/api/operator/v1/types_machineconfiguration.go @@ -0,0 +1,58 @@ +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// MachineConfiguration provides information to configure an operator to manage Machine Configuration. +// +// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). +// +openshift:compatibility-gen:level=1 +type MachineConfiguration 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 + metav1.ObjectMeta `json:"metadata"` + + // spec is the specification of the desired behavior of the Machine Config Operator + // +kubebuilder:validation:Required + Spec MachineConfigurationSpec `json:"spec"` + + // status is the most recently observed status of the Machine Config Operator + // +optional + Status MachineConfigurationStatus `json:"status"` +} + +type MachineConfigurationSpec struct { + StaticPodOperatorSpec `json:",inline"` + + // TODO(jkyros): This is where we put our knobs and dials +} + +type MachineConfigurationStatus struct { + StaticPodOperatorStatus `json:",inline"` + + // TODO(jkyros): This is where we can put additional bespoke status fields +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// MachineConfigurationList is a collection of items +// +// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). +// +openshift:compatibility-gen:level=1 +type MachineConfigurationList 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 contains the items + Items []MachineConfiguration `json:"items"` +} 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 a0f4c1a89..f93762e4a 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 @@ -2890,6 +2890,101 @@ func (in *MTUMigrationValues) DeepCopy() *MTUMigrationValues { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachineConfiguration) DeepCopyInto(out *MachineConfiguration) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineConfiguration. +func (in *MachineConfiguration) DeepCopy() *MachineConfiguration { + if in == nil { + return nil + } + out := new(MachineConfiguration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *MachineConfiguration) 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 *MachineConfigurationList) DeepCopyInto(out *MachineConfigurationList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]MachineConfiguration, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineConfigurationList. +func (in *MachineConfigurationList) DeepCopy() *MachineConfigurationList { + if in == nil { + return nil + } + out := new(MachineConfigurationList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *MachineConfigurationList) 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 *MachineConfigurationSpec) DeepCopyInto(out *MachineConfigurationSpec) { + *out = *in + in.StaticPodOperatorSpec.DeepCopyInto(&out.StaticPodOperatorSpec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineConfigurationSpec. +func (in *MachineConfigurationSpec) DeepCopy() *MachineConfigurationSpec { + if in == nil { + return nil + } + out := new(MachineConfigurationSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachineConfigurationStatus) DeepCopyInto(out *MachineConfigurationStatus) { + *out = *in + in.StaticPodOperatorStatus.DeepCopyInto(&out.StaticPodOperatorStatus) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineConfigurationStatus. +func (in *MachineConfigurationStatus) DeepCopy() *MachineConfigurationStatus { + if in == nil { + return nil + } + out := new(MachineConfigurationStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MyOperatorResource) DeepCopyInto(out *MyOperatorResource) { *out = *in 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 f0becd861..96122157d 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 @@ -1012,7 +1012,7 @@ func (LoadBalancerStrategy) SwaggerDoc() map[string]string { } var map_LoggingDestination = map[string]string{ - "": "LoggingDestination describes a destination for log messages.", + "": "LoggingDestination describes a destination for log messages. ", "type": "type is the type of destination for logs. It must be one of the following:\n\n* Container\n\nThe ingress operator configures the sidecar container named \"logs\" on the ingress controller pod and configures the ingress controller to write logs to the sidecar. The logs are then available as container logs. The expectation is that the administrator configures a custom logging solution that reads logs from this sidecar. Note that using container logs means that logs may be dropped if the rate of logs exceeds the container runtime's or the custom logging solution's capacity.\n\n* Syslog\n\nLogs are sent to a syslog endpoint. The administrator must specify an endpoint that can receive syslog messages. The expectation is that the administrator has configured a custom syslog instance.", "syslog": "syslog holds parameters for a syslog endpoint. Present only if type is Syslog.", "container": "container holds parameters for the Container logging destination. Present only if type is Container.", @@ -1243,6 +1243,27 @@ func (KubeStorageVersionMigratorList) SwaggerDoc() map[string]string { return map_KubeStorageVersionMigratorList } +var map_MachineConfiguration = map[string]string{ + "": "MachineConfiguration provides information to configure an operator to manage Machine Configuration.\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", + "spec": "spec is the specification of the desired behavior of the Machine Config Operator", + "status": "status is the most recently observed status of the Machine Config Operator", +} + +func (MachineConfiguration) SwaggerDoc() map[string]string { + return map_MachineConfiguration +} + +var map_MachineConfigurationList = map[string]string{ + "": "MachineConfigurationList is a collection of items\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 list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "items": "Items contains the items", +} + +func (MachineConfigurationList) SwaggerDoc() map[string]string { + return map_MachineConfigurationList +} + var map_AdditionalNetworkDefinition = map[string]string{ "": "AdditionalNetworkDefinition configures an extra network that is available but not created by default. Instead, pods must request them by name. type must be specified, along with exactly one \"Config\" that matches the type.", "type": "type is the type of network The supported values are NetworkTypeRaw, NetworkTypeSimpleMacvlan", diff --git a/vendor/modules.txt b/vendor/modules.txt index 31fd00fb0..b630b4e94 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -161,7 +161,7 @@ github.com/modern-go/reflect2 # github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 ## explicit github.com/munnerz/goautoneg -# github.com/openshift/api v0.0.0-20230920152731-7d89b46689d4 +# github.com/openshift/api v0.0.0-20231012181603-8f468d7b55a8 ## explicit; go 1.20 github.com/openshift/api github.com/openshift/api/apiserver From 1654d53aa70934014da2aa065287e987c57a47f2 Mon Sep 17 00:00:00 2001 From: Adam Kaplan Date: Thu, 12 Oct 2023 10:07:56 -0400 Subject: [PATCH 2/2] OCPBUGS-20164: Include Build CRD in manifests Include the build CRD in its manifests. This ensures capabilities are respected and the build CRD is deployed on the cluster. Also include an empty-resource instance for "default" installs by the CVO. --- Dockerfile | 2 ++ ...shift-controller-manager-operator_02_build_cr.yaml | 11 +++++++++++ 2 files changed, 13 insertions(+) create mode 100644 empty-resources/0000_05_openshift-controller-manager-operator_02_build_cr.yaml diff --git a/Dockerfile b/Dockerfile index 2040f621c..73e983490 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,5 +6,7 @@ RUN make FROM registry.ci.openshift.org/ocp/4.15:base COPY --from=builder /go/src/github.com/openshift/cluster-openshift-controller-manager-operator/cluster-openshift-controller-manager-operator /usr/bin/ COPY manifests /manifests +COPY vendor/github.com/openshift/api/config/v1/*_openshift-controller-manager-operator_*.yaml /manifests COPY vendor/github.com/openshift/api/operator/v1/0000_50_cluster-openshift-controller-manager-operator_02_config.crd.yaml /manifests +COPY empty-resources /manifests LABEL io.openshift.release.operator true diff --git a/empty-resources/0000_05_openshift-controller-manager-operator_02_build_cr.yaml b/empty-resources/0000_05_openshift-controller-manager-operator_02_build_cr.yaml new file mode 100644 index 000000000..c32b468b0 --- /dev/null +++ b/empty-resources/0000_05_openshift-controller-manager-operator_02_build_cr.yaml @@ -0,0 +1,11 @@ +apiVersion: config.openshift.io/v1 +kind: Build +metadata: + name: cluster + annotations: + capability.openshift.io/name: Build + include.release.openshift.io/ibm-cloud-managed: "true" + include.release.openshift.io/self-managed-high-availability: "true" + include.release.openshift.io/single-node-developer: "true" + release.openshift.io/create-only: "true" +spec: {}