From d72c5bafffbf2250b13d66a84b33efaa3a8662a8 Mon Sep 17 00:00:00 2001 From: Sebastian Widmer Date: Thu, 3 Oct 2024 14:16:33 +0200 Subject: [PATCH] Update OpenShift API dependency to v4.15 --- api/v1beta1/upstream_cv_spec_copy.go | 18 + api/v1beta1/zz_generated.deepcopy.go | 5 + ...agedupgrade.appuio.io_clusterversions.yaml | 435 ++++++++++++++++-- .../managedupgrade.appuio.io_upgradejobs.yaml | 33 +- controllers/upgrade_information_collector.go | 2 +- .../upgrade_information_collector_test.go | 2 +- controllers/upgradejob_controller.go | 2 +- controllers/upgradejob_controller_test.go | 2 +- go.mod | 5 +- go.sum | 6 +- main.go | 2 +- pkg/healthcheck/healthcheck.go | 2 +- pkg/healthcheck/healthcheck_test.go | 2 +- sim/main.go | 2 +- 14 files changed, 471 insertions(+), 47 deletions(-) diff --git a/api/v1beta1/upstream_cv_spec_copy.go b/api/v1beta1/upstream_cv_spec_copy.go index f6032f2..34b8b0d 100644 --- a/api/v1beta1/upstream_cv_spec_copy.go +++ b/api/v1beta1/upstream_cv_spec_copy.go @@ -54,6 +54,24 @@ type ConfigV1ClusterVersionSpec struct { // +optional Capabilities *configv1.ClusterVersionCapabilitiesSpec `json:"capabilities,omitempty"` + // signatureStores contains the upstream URIs to verify release signatures and optional + // reference to a config map by name containing the PEM-encoded CA bundle. + // + // By default, CVO will use existing signature stores if this property is empty. + // The CVO will check the release signatures in the local ConfigMaps first. It will search for a valid signature + // in these stores in parallel only when local ConfigMaps did not include a valid signature. + // Validation will fail if none of the signature stores reply with valid signature before timeout. + // Setting signatureStores will replace the default signature stores with custom signature stores. + // Default stores can be used with custom signature stores by adding them manually. + // + // A maximum of 32 signature stores may be configured. + // +kubebuilder:validation:MaxItems=32 + // +openshift:enable:FeatureSets=CustomNoUpgrade;TechPreviewNoUpgrade + // +listType=map + // +listMapKey=url + // +optional + SignatureStores []configv1.SignatureStore `json:"signatureStores"` + // overrides is list of overides for components that are managed by // cluster version operator. Marking a component unmanaged will prevent // the operator from creating or updating the object. diff --git a/api/v1beta1/zz_generated.deepcopy.go b/api/v1beta1/zz_generated.deepcopy.go index 8f30901..50f613b 100644 --- a/api/v1beta1/zz_generated.deepcopy.go +++ b/api/v1beta1/zz_generated.deepcopy.go @@ -226,6 +226,11 @@ func (in *ConfigV1ClusterVersionSpec) DeepCopyInto(out *ConfigV1ClusterVersionSp *out = new(v1.ClusterVersionCapabilitiesSpec) (*in).DeepCopyInto(*out) } + if in.SignatureStores != nil { + in, out := &in.SignatureStores, &out.SignatureStores + *out = make([]v1.SignatureStore, len(*in)) + copy(*out, *in) + } if in.Overrides != nil { in, out := &in.Overrides, &out.Overrides *out = make([]v1.ComponentOverride, len(*in)) diff --git a/config/crd/bases/managedupgrade.appuio.io_clusterversions.yaml b/config/crd/bases/managedupgrade.appuio.io_clusterversions.yaml index 1df4c98..24c7df9 100644 --- a/config/crd/bases/managedupgrade.appuio.io_clusterversions.yaml +++ b/config/crd/bases/managedupgrade.appuio.io_clusterversions.yaml @@ -85,6 +85,13 @@ spec: - Insights - Storage - CSISnapshot + - NodeTuning + - MachineAPI + - Build + - DeploymentConfig + - ImageRegistry + - OperatorLifecycleManager + - CloudCredential type: string type: array x-kubernetes-list-type: atomic @@ -99,6 +106,9 @@ spec: - None - v4.11 - v4.12 + - v4.13 + - v4.14 + - v4.15 - vCurrent type: string type: object @@ -129,6 +139,20 @@ spec: the previous version will cause a rollback to be attempted. Not all rollbacks will succeed. properties: + architecture: + description: |- + architecture is an optional field that indicates the desired + value of the cluster architecture. In this context cluster + architecture means either a single architecture or a multi + architecture. architecture can only be set to Multi thereby + only allowing updates from single to multi architecture. If + architecture is set, image cannot be set and version must be + set. + Valid values are 'Multi' and empty. + enum: + - Multi + - "" + type: string force: description: |- force allows an administrator to update to an image that has failed @@ -140,16 +164,26 @@ spec: type: boolean image: description: |- - image is a container image location that contains the update. When this - field is part of spec, image is optional if version is specified and the - availableUpdates field contains a matching version. + image is a container image location that contains the update. + image should be used when the desired version does not exist in availableUpdates or history. + When image is set, version is ignored. When image is set, version should be empty. + When image is set, architecture cannot be specified. type: string version: description: |- - version is a semantic versioning identifying the update version. When this - field is part of spec, version is optional if image is specified. + version is a semantic version identifying the update version. + version is ignored if image is specified and required if + architecture is specified. type: string type: object + x-kubernetes-validations: + - message: cannot set both Architecture and Image + rule: 'has(self.architecture) && has(self.image) ? + (self.architecture == '''' || self.image == '''') + : true' + - message: Version must be set if Architecture is set + rule: 'has(self.architecture) && self.architecture + != '''' ? self.version != '''' : true' overrides: description: |- overrides is list of overides for components that are managed by @@ -190,6 +224,57 @@ spec: - unmanaged type: object type: array + signatureStores: + description: |- + signatureStores contains the upstream URIs to verify release signatures and optional + reference to a config map by name containing the PEM-encoded CA bundle. + + By default, CVO will use existing signature stores if this property is empty. + The CVO will check the release signatures in the local ConfigMaps first. It will search for a valid signature + in these stores in parallel only when local ConfigMaps did not include a valid signature. + Validation will fail if none of the signature stores reply with valid signature before timeout. + Setting signatureStores will replace the default signature stores with custom signature stores. + Default stores can be used with custom signature stores by adding them manually. + + A maximum of 32 signature stores may be configured. + items: + description: SignatureStore represents the URL of + custom Signature Store + properties: + ca: + description: |- + ca is an optional reference to a config map by name containing the PEM-encoded CA bundle. + It is used as a trust anchor to validate the TLS certificate presented by the remote server. + The key "ca.crt" is used to locate the data. + If specified and the config map or expected key is not found, the signature store is not honored. + If the specified ca data is not valid, the signature store is not honored. + If empty, we fall back to the CA configured via Proxy, which is appended to the default system roots. + The namespace for this config map is openshift-config. + properties: + name: + description: name is the metadata.name of + the referenced config map + type: string + required: + - name + type: object + url: + description: |- + url contains the upstream custom signature store URL. + url should be a valid absolute http/https URI of an upstream signature store as per rfc1738. + This must be provided and cannot be empty. + type: string + x-kubernetes-validations: + - message: url must be a valid absolute URL + rule: isURL(self) + required: + - url + type: object + maxItems: 32 + type: array + x-kubernetes-list-map-keys: + - url + x-kubernetes-list-type: map upstream: description: |- upstream may be used to specify the preferred update server. By default @@ -231,6 +316,13 @@ spec: - Insights - Storage - CSISnapshot + - NodeTuning + - MachineAPI + - Build + - DeploymentConfig + - ImageRegistry + - OperatorLifecycleManager + - CloudCredential type: string type: array x-kubernetes-list-type: atomic @@ -245,6 +337,9 @@ spec: - None - v4.11 - v4.12 + - v4.13 + - v4.14 + - v4.15 - vCurrent type: string type: object @@ -267,14 +362,37 @@ spec: the current version does not match the desired version). The set of recommended update values is listed as part of available updates in status, and setting values outside that range may cause the upgrade - to fail. You may specify the version field without setting image if - an update exists with that version in the availableUpdates or history. + to fail. + + Some of the fields are inter-related with restrictions and meanings described here. + 1. image is specified, version is specified, architecture is specified. API validation error. + 2. image is specified, version is specified, architecture is not specified. You should not do this. version is silently ignored and image is used. + 3. image is specified, version is not specified, architecture is specified. API validation error. + 4. image is specified, version is not specified, architecture is not specified. image is used. + 5. image is not specified, version is specified, architecture is specified. version and desired architecture are used to select an image. + 6. image is not specified, version is specified, architecture is not specified. version and current architecture are used to select an image. + 7. image is not specified, version is not specified, architecture is specified. API validation error. + 8. image is not specified, version is not specified, architecture is not specified. API validation error. If an upgrade fails the operator will halt and report status about the failing component. Setting the desired update value back to the previous version will cause a rollback to be attempted. Not all rollbacks will succeed. properties: + architecture: + description: |- + architecture is an optional field that indicates the desired + value of the cluster architecture. In this context cluster + architecture means either a single architecture or a multi + architecture. architecture can only be set to Multi thereby + only allowing updates from single to multi architecture. If + architecture is set, image cannot be set and version must be + set. + Valid values are 'Multi' and empty. + enum: + - Multi + - "" + type: string force: description: |- force allows an administrator to update to an image that has failed @@ -286,16 +404,25 @@ spec: type: boolean image: description: |- - image is a container image location that contains the update. When this - field is part of spec, image is optional if version is specified and the - availableUpdates field contains a matching version. + image is a container image location that contains the update. + image should be used when the desired version does not exist in availableUpdates or history. + When image is set, version is ignored. When image is set, version should be empty. + When image is set, architecture cannot be specified. type: string version: description: |- - version is a semantic versioning identifying the update version. When this - field is part of spec, version is optional if image is specified. + version is a semantic version identifying the update version. + version is ignored if image is specified and required if + architecture is specified. type: string type: object + x-kubernetes-validations: + - message: cannot set both Architecture and Image + rule: 'has(self.architecture) && has(self.image) ? (self.architecture + == '''' || self.image == '''') : true' + - message: Version must be set if Architecture is set + rule: 'has(self.architecture) && self.architecture != '''' + ? self.version != '''' : true' overrides: description: |- overrides is list of overides for components that are managed by @@ -335,6 +462,63 @@ spec: - unmanaged type: object type: array + x-kubernetes-list-map-keys: + - kind + - group + - namespace + - name + x-kubernetes-list-type: map + signatureStores: + description: |- + signatureStores contains the upstream URIs to verify release signatures and optional + reference to a config map by name containing the PEM-encoded CA bundle. + + By default, CVO will use existing signature stores if this property is empty. + The CVO will check the release signatures in the local ConfigMaps first. It will search for a valid signature + in these stores in parallel only when local ConfigMaps did not include a valid signature. + Validation will fail if none of the signature stores reply with valid signature before timeout. + Setting signatureStores will replace the default signature stores with custom signature stores. + Default stores can be used with custom signature stores by adding them manually. + + A maximum of 32 signature stores may be configured. + items: + description: SignatureStore represents the URL of custom + Signature Store + properties: + ca: + description: |- + ca is an optional reference to a config map by name containing the PEM-encoded CA bundle. + It is used as a trust anchor to validate the TLS certificate presented by the remote server. + The key "ca.crt" is used to locate the data. + If specified and the config map or expected key is not found, the signature store is not honored. + If the specified ca data is not valid, the signature store is not honored. + If empty, we fall back to the CA configured via Proxy, which is appended to the default system roots. + The namespace for this config map is openshift-config. + properties: + name: + description: name is the metadata.name of the referenced + config map + type: string + required: + - name + type: object + url: + description: |- + url contains the upstream custom signature store URL. + url should be a valid absolute http/https URI of an upstream signature store as per rfc1738. + This must be provided and cannot be empty. + type: string + x-kubernetes-validations: + - message: url must be a valid absolute URL + rule: isURL(self) + required: + - url + type: object + maxItems: 32 + type: array + x-kubernetes-list-map-keys: + - url + x-kubernetes-list-type: map upstream: description: |- upstream may be used to specify the preferred update server. By default @@ -374,6 +558,13 @@ spec: - Insights - Storage - CSISnapshot + - NodeTuning + - MachineAPI + - Build + - DeploymentConfig + - ImageRegistry + - OperatorLifecycleManager + - CloudCredential type: string type: array x-kubernetes-list-type: atomic @@ -388,6 +579,9 @@ spec: - None - v4.11 - v4.12 + - v4.13 + - v4.14 + - v4.15 - vCurrent type: string type: object @@ -410,14 +604,37 @@ spec: the current version does not match the desired version). The set of recommended update values is listed as part of available updates in status, and setting values outside that range may cause the upgrade - to fail. You may specify the version field without setting image if - an update exists with that version in the availableUpdates or history. + to fail. + + Some of the fields are inter-related with restrictions and meanings described here. + 1. image is specified, version is specified, architecture is specified. API validation error. + 2. image is specified, version is specified, architecture is not specified. You should not do this. version is silently ignored and image is used. + 3. image is specified, version is not specified, architecture is specified. API validation error. + 4. image is specified, version is not specified, architecture is not specified. image is used. + 5. image is not specified, version is specified, architecture is specified. version and desired architecture are used to select an image. + 6. image is not specified, version is specified, architecture is not specified. version and current architecture are used to select an image. + 7. image is not specified, version is not specified, architecture is specified. API validation error. + 8. image is not specified, version is not specified, architecture is not specified. API validation error. If an upgrade fails the operator will halt and report status about the failing component. Setting the desired update value back to the previous version will cause a rollback to be attempted. Not all rollbacks will succeed. properties: + architecture: + description: |- + architecture is an optional field that indicates the desired + value of the cluster architecture. In this context cluster + architecture means either a single architecture or a multi + architecture. architecture can only be set to Multi thereby + only allowing updates from single to multi architecture. If + architecture is set, image cannot be set and version must be + set. + Valid values are 'Multi' and empty. + enum: + - Multi + - "" + type: string force: description: |- force allows an administrator to update to an image that has failed @@ -429,16 +646,25 @@ spec: type: boolean image: description: |- - image is a container image location that contains the update. When this - field is part of spec, image is optional if version is specified and the - availableUpdates field contains a matching version. + image is a container image location that contains the update. + image should be used when the desired version does not exist in availableUpdates or history. + When image is set, version is ignored. When image is set, version should be empty. + When image is set, architecture cannot be specified. type: string version: description: |- - version is a semantic versioning identifying the update version. When this - field is part of spec, version is optional if image is specified. + version is a semantic version identifying the update version. + version is ignored if image is specified and required if + architecture is specified. type: string type: object + x-kubernetes-validations: + - message: cannot set both Architecture and Image + rule: 'has(self.architecture) && has(self.image) ? (self.architecture + == '''' || self.image == '''') : true' + - message: Version must be set if Architecture is set + rule: 'has(self.architecture) && self.architecture != '''' ? + self.version != '''' : true' overrides: description: |- overrides is list of overides for components that are managed by @@ -478,6 +704,63 @@ spec: - unmanaged type: object type: array + x-kubernetes-list-map-keys: + - kind + - group + - namespace + - name + x-kubernetes-list-type: map + signatureStores: + description: |- + signatureStores contains the upstream URIs to verify release signatures and optional + reference to a config map by name containing the PEM-encoded CA bundle. + + By default, CVO will use existing signature stores if this property is empty. + The CVO will check the release signatures in the local ConfigMaps first. It will search for a valid signature + in these stores in parallel only when local ConfigMaps did not include a valid signature. + Validation will fail if none of the signature stores reply with valid signature before timeout. + Setting signatureStores will replace the default signature stores with custom signature stores. + Default stores can be used with custom signature stores by adding them manually. + + A maximum of 32 signature stores may be configured. + items: + description: SignatureStore represents the URL of custom Signature + Store + properties: + ca: + description: |- + ca is an optional reference to a config map by name containing the PEM-encoded CA bundle. + It is used as a trust anchor to validate the TLS certificate presented by the remote server. + The key "ca.crt" is used to locate the data. + If specified and the config map or expected key is not found, the signature store is not honored. + If the specified ca data is not valid, the signature store is not honored. + If empty, we fall back to the CA configured via Proxy, which is appended to the default system roots. + The namespace for this config map is openshift-config. + properties: + name: + description: name is the metadata.name of the referenced + config map + type: string + required: + - name + type: object + url: + description: |- + url contains the upstream custom signature store URL. + url should be a valid absolute http/https URI of an upstream signature store as per rfc1738. + This must be provided and cannot be empty. + type: string + x-kubernetes-validations: + - message: url must be a valid absolute URL + rule: isURL(self) + required: + - url + type: object + maxItems: 32 + type: array + x-kubernetes-list-map-keys: + - url + x-kubernetes-list-type: map upstream: description: |- upstream may be used to specify the preferred update server. By default @@ -533,6 +816,13 @@ spec: - Insights - Storage - CSISnapshot + - NodeTuning + - MachineAPI + - Build + - DeploymentConfig + - ImageRegistry + - OperatorLifecycleManager + - CloudCredential type: string type: array x-kubernetes-list-type: atomic @@ -547,6 +837,9 @@ spec: - None - v4.11 - v4.12 + - v4.13 + - v4.14 + - v4.15 - vCurrent type: string type: object @@ -569,14 +862,37 @@ spec: the current version does not match the desired version). The set of recommended update values is listed as part of available updates in status, and setting values outside that range may cause the upgrade - to fail. You may specify the version field without setting image if - an update exists with that version in the availableUpdates or history. + to fail. + + Some of the fields are inter-related with restrictions and meanings described here. + 1. image is specified, version is specified, architecture is specified. API validation error. + 2. image is specified, version is specified, architecture is not specified. You should not do this. version is silently ignored and image is used. + 3. image is specified, version is not specified, architecture is specified. API validation error. + 4. image is specified, version is not specified, architecture is not specified. image is used. + 5. image is not specified, version is specified, architecture is specified. version and desired architecture are used to select an image. + 6. image is not specified, version is specified, architecture is not specified. version and current architecture are used to select an image. + 7. image is not specified, version is not specified, architecture is specified. API validation error. + 8. image is not specified, version is not specified, architecture is not specified. API validation error. If an upgrade fails the operator will halt and report status about the failing component. Setting the desired update value back to the previous version will cause a rollback to be attempted. Not all rollbacks will succeed. properties: + architecture: + description: |- + architecture is an optional field that indicates the desired + value of the cluster architecture. In this context cluster + architecture means either a single architecture or a multi + architecture. architecture can only be set to Multi thereby + only allowing updates from single to multi architecture. If + architecture is set, image cannot be set and version must be + set. + Valid values are 'Multi' and empty. + enum: + - Multi + - "" + type: string force: description: |- force allows an administrator to update to an image that has failed @@ -588,16 +904,26 @@ spec: type: boolean image: description: |- - image is a container image location that contains the update. When this - field is part of spec, image is optional if version is specified and the - availableUpdates field contains a matching version. + image is a container image location that contains the update. + image should be used when the desired version does not exist in availableUpdates or history. + When image is set, version is ignored. When image is set, version should be empty. + When image is set, architecture cannot be specified. type: string version: description: |- - version is a semantic versioning identifying the update version. When this - field is part of spec, version is optional if image is specified. + version is a semantic version identifying the update version. + version is ignored if image is specified and required if + architecture is specified. type: string type: object + x-kubernetes-validations: + - message: cannot set both Architecture and Image + rule: 'has(self.architecture) && has(self.image) ? + (self.architecture == '''' || self.image == '''') + : true' + - message: Version must be set if Architecture is set + rule: 'has(self.architecture) && self.architecture + != '''' ? self.version != '''' : true' overrides: description: |- overrides is list of overides for components that are managed by @@ -638,6 +964,63 @@ spec: - unmanaged type: object type: array + x-kubernetes-list-map-keys: + - kind + - group + - namespace + - name + x-kubernetes-list-type: map + signatureStores: + description: |- + signatureStores contains the upstream URIs to verify release signatures and optional + reference to a config map by name containing the PEM-encoded CA bundle. + + By default, CVO will use existing signature stores if this property is empty. + The CVO will check the release signatures in the local ConfigMaps first. It will search for a valid signature + in these stores in parallel only when local ConfigMaps did not include a valid signature. + Validation will fail if none of the signature stores reply with valid signature before timeout. + Setting signatureStores will replace the default signature stores with custom signature stores. + Default stores can be used with custom signature stores by adding them manually. + + A maximum of 32 signature stores may be configured. + items: + description: SignatureStore represents the URL of + custom Signature Store + properties: + ca: + description: |- + ca is an optional reference to a config map by name containing the PEM-encoded CA bundle. + It is used as a trust anchor to validate the TLS certificate presented by the remote server. + The key "ca.crt" is used to locate the data. + If specified and the config map or expected key is not found, the signature store is not honored. + If the specified ca data is not valid, the signature store is not honored. + If empty, we fall back to the CA configured via Proxy, which is appended to the default system roots. + The namespace for this config map is openshift-config. + properties: + name: + description: name is the metadata.name of + the referenced config map + type: string + required: + - name + type: object + url: + description: |- + url contains the upstream custom signature store URL. + url should be a valid absolute http/https URI of an upstream signature store as per rfc1738. + This must be provided and cannot be empty. + type: string + x-kubernetes-validations: + - message: url must be a valid absolute URL + rule: isURL(self) + required: + - url + type: object + maxItems: 32 + type: array + x-kubernetes-list-map-keys: + - url + x-kubernetes-list-type: map upstream: description: |- upstream may be used to specify the preferred update server. By default diff --git a/config/crd/bases/managedupgrade.appuio.io_upgradejobs.yaml b/config/crd/bases/managedupgrade.appuio.io_upgradejobs.yaml index 72ae50b..0265e5e 100644 --- a/config/crd/bases/managedupgrade.appuio.io_upgradejobs.yaml +++ b/config/crd/bases/managedupgrade.appuio.io_upgradejobs.yaml @@ -170,6 +170,20 @@ spec: DesiredVersion defines the desired version to upgrade to. Can be empty if the upgrade job was created when there was no new version available. properties: + architecture: + description: |- + architecture is an optional field that indicates the desired + value of the cluster architecture. In this context cluster + architecture means either a single architecture or a multi + architecture. architecture can only be set to Multi thereby + only allowing updates from single to multi architecture. If + architecture is set, image cannot be set and version must be + set. + Valid values are 'Multi' and empty. + enum: + - Multi + - "" + type: string force: description: |- force allows an administrator to update to an image that has failed @@ -181,16 +195,25 @@ spec: type: boolean image: description: |- - image is a container image location that contains the update. When this - field is part of spec, image is optional if version is specified and the - availableUpdates field contains a matching version. + image is a container image location that contains the update. + image should be used when the desired version does not exist in availableUpdates or history. + When image is set, version is ignored. When image is set, version should be empty. + When image is set, architecture cannot be specified. type: string version: description: |- - version is a semantic versioning identifying the update version. When this - field is part of spec, version is optional if image is specified. + version is a semantic version identifying the update version. + version is ignored if image is specified and required if + architecture is specified. type: string type: object + x-kubernetes-validations: + - message: cannot set both Architecture and Image + rule: 'has(self.architecture) && has(self.image) ? (self.architecture + == '''' || self.image == '''') : true' + - message: Version must be set if Architecture is set + rule: 'has(self.architecture) && self.architecture != '''' ? self.version + != '''' : true' startAfter: description: StartAfter defines the time after which the upgrade job should start diff --git a/controllers/upgrade_information_collector.go b/controllers/upgrade_information_collector.go index ed271d3..a795352 100644 --- a/controllers/upgrade_information_collector.go +++ b/controllers/upgrade_information_collector.go @@ -7,7 +7,7 @@ import ( "time" configv1 "github.com/openshift/api/config/v1" - machineconfigurationv1 "github.com/openshift/machine-config-operator/pkg/apis/machineconfiguration.openshift.io/v1" + machineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1" "github.com/prometheus/client_golang/prometheus" apimeta "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/controllers/upgrade_information_collector_test.go b/controllers/upgrade_information_collector_test.go index e8427ad..63cefc1 100644 --- a/controllers/upgrade_information_collector_test.go +++ b/controllers/upgrade_information_collector_test.go @@ -10,7 +10,7 @@ import ( managedupgradev1beta1 "github.com/appuio/openshift-upgrade-controller/api/v1beta1" configv1 "github.com/openshift/api/config/v1" - machineconfigurationv1 "github.com/openshift/machine-config-operator/pkg/apis/machineconfiguration.openshift.io/v1" + machineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1" "github.com/prometheus/client_golang/prometheus/testutil" "github.com/stretchr/testify/require" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/controllers/upgradejob_controller.go b/controllers/upgradejob_controller.go index 358cb88..481bff8 100644 --- a/controllers/upgradejob_controller.go +++ b/controllers/upgradejob_controller.go @@ -12,7 +12,7 @@ import ( "time" configv1 "github.com/openshift/api/config/v1" - machineconfigurationv1 "github.com/openshift/machine-config-operator/pkg/apis/machineconfiguration.openshift.io/v1" + machineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1" "go.uber.org/multierr" "golang.org/x/exp/maps" "golang.org/x/exp/slices" diff --git a/controllers/upgradejob_controller_test.go b/controllers/upgradejob_controller_test.go index 74ed142..933be6a 100644 --- a/controllers/upgradejob_controller_test.go +++ b/controllers/upgradejob_controller_test.go @@ -8,7 +8,7 @@ import ( "time" configv1 "github.com/openshift/api/config/v1" - machineconfigurationv1 "github.com/openshift/machine-config-operator/pkg/apis/machineconfiguration.openshift.io/v1" + machineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1" "github.com/stretchr/testify/require" batchv1 "k8s.io/api/batch/v1" corev1 "k8s.io/api/core/v1" diff --git a/go.mod b/go.mod index 56bc90f..a315f2d 100644 --- a/go.mod +++ b/go.mod @@ -4,10 +4,7 @@ go 1.23 toolchain go1.23.2 -require ( - github.com/openshift/api v0.0.0-20230213134911-7ba313770556 // release-4.11 - github.com/openshift/machine-config-operator v0.0.1-0.20230508173032-8f952d7fd139 // release-4.11 -) +require github.com/openshift/api v0.0.0-20240729140855-0a58f8c30a8c // release-4.15 require ( dario.cat/mergo v1.0.1 diff --git a/go.sum b/go.sum index e0e4ccd..9f6e42c 100644 --- a/go.sum +++ b/go.sum @@ -109,10 +109,8 @@ github.com/onsi/ginkgo/v2 v2.19.0 h1:9Cnnf7UHo57Hy3k6/m5k3dRfGTMXGvxhHFvkDTCTpvA github.com/onsi/ginkgo/v2 v2.19.0/go.mod h1:rlwLi9PilAFJ8jCg9UE1QP6VBpd6/xj3SRC0d6TU0To= github.com/onsi/gomega v1.34.2 h1:pNCwDkzrsv7MS9kpaQvVb1aVLahQXyJ/Tv5oAZMI3i8= github.com/onsi/gomega v1.34.2/go.mod h1:v1xfxRgk0KIsG+QOdm7p8UosrOzPYRo60fd3B/1Dukc= -github.com/openshift/api v0.0.0-20230213134911-7ba313770556 h1:7W2fOhJicyEff24VaF7ASNzPtYvr+iSCVft4SIBAzaE= -github.com/openshift/api v0.0.0-20230213134911-7ba313770556/go.mod h1:aQ6LDasvHMvHZXqLHnX2GRmnfTWCF/iIwz8EMTTIE9A= -github.com/openshift/machine-config-operator v0.0.1-0.20230508173032-8f952d7fd139 h1:p3TcFJMyt3ohtmS0AXufStzMf4O4pyQ4aGmlaPZQUc8= -github.com/openshift/machine-config-operator v0.0.1-0.20230508173032-8f952d7fd139/go.mod h1:9eRuG/8WREpSZ6+pHqYFxXRK4v+w0GAZaUGp/SUaUWs= +github.com/openshift/api v0.0.0-20240729140855-0a58f8c30a8c h1:lm1Suv8hNuOCTpO0iEDtdGk6jVuS37/xgW+aV0Ze4oc= +github.com/openshift/api v0.0.0-20240729140855-0a58f8c30a8c/go.mod h1:qNtV0315F+f8ld52TLtPvrfivZpdimOzTi3kn9IVbtU= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= diff --git a/main.go b/main.go index 0d0fda4..6730176 100644 --- a/main.go +++ b/main.go @@ -26,7 +26,7 @@ import ( _ "k8s.io/client-go/plugin/pkg/client/auth" configv1 "github.com/openshift/api/config/v1" - machineconfigurationv1 "github.com/openshift/machine-config-operator/pkg/apis/machineconfiguration.openshift.io/v1" + machineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1" batchv1 "k8s.io/api/batch/v1" "k8s.io/apimachinery/pkg/runtime" utilruntime "k8s.io/apimachinery/pkg/util/runtime" diff --git a/pkg/healthcheck/healthcheck.go b/pkg/healthcheck/healthcheck.go index c0d37d6..6e17470 100644 --- a/pkg/healthcheck/healthcheck.go +++ b/pkg/healthcheck/healthcheck.go @@ -4,7 +4,7 @@ import ( "fmt" configv1 "github.com/openshift/api/config/v1" - machineconfigurationv1 "github.com/openshift/machine-config-operator/pkg/apis/machineconfiguration.openshift.io/v1" + machineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1" ) // IsOperatorDegraded returns whether an operator is degraded in the cluster diff --git a/pkg/healthcheck/healthcheck_test.go b/pkg/healthcheck/healthcheck_test.go index 20f46ae..8763e57 100644 --- a/pkg/healthcheck/healthcheck_test.go +++ b/pkg/healthcheck/healthcheck_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - machineconfigurationv1 "github.com/openshift/machine-config-operator/pkg/apis/machineconfiguration.openshift.io/v1" + machineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/sim/main.go b/sim/main.go index 6d5a67a..c8bc04c 100644 --- a/sim/main.go +++ b/sim/main.go @@ -17,7 +17,7 @@ import ( "github.com/Masterminds/semver/v3" configv1 "github.com/openshift/api/config/v1" - machineconfigurationv1 "github.com/openshift/machine-config-operator/pkg/apis/machineconfiguration.openshift.io/v1" + machineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1" "go.uber.org/multierr" batchv1 "k8s.io/api/batch/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"