From e3af8ddb47bcd76a67a307c896719ec44b5391fd Mon Sep 17 00:00:00 2001 From: Isabella Janssen Date: Wed, 23 Apr 2025 14:24:48 -0400 Subject: [PATCH 1/4] bump(api): update api dependency to isabella-janssen:create-mcn-v1-api --- go.mod | 3 +++ go.sum | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index c8828867da9f..3d1a9ab1af3e 100644 --- a/go.mod +++ b/go.mod @@ -353,3 +353,6 @@ replace ( // The cadvisor version used in k8s v1.32.1 (v0.51.0) relies on code present on this version // This can be removed once it's no longer used in o/k replace github.com/containerd/errdefs => github.com/containerd/errdefs v0.1.0 + +// The following replace commands are in place to allow the simultaneous merge of the API (PR #2255) & origin for making use of the V1 MCN API +replace github.com/openshift/api => github.com/isabella-janssen/openshift-api v0.0.0-20250423163652-3d76f1835b2c diff --git a/go.sum b/go.sum index 7fad13dfe04b..8f7abe18bebc 100644 --- a/go.sum +++ b/go.sum @@ -460,6 +460,8 @@ github.com/ianlancetaylor/demangle v0.0.0-20210905161508-09a460cdf81d/go.mod h1: github.com/ianlancetaylor/demangle v0.0.0-20230524184225-eabc099b10ab/go.mod h1:gx7rwoVhcfuVKG5uya9Hs3Sxj7EIvldVofAWIUtGouw= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/isabella-janssen/openshift-api v0.0.0-20250423163652-3d76f1835b2c h1:ZXr+C67yjbTVngH2A0aJF+/TkRA0bMxz9xuOWoQE8p8= +github.com/isabella-janssen/openshift-api v0.0.0-20250423163652-3d76f1835b2c/go.mod h1:yk60tHAmHhtVpJQo3TwVYq2zpuP70iJIFDCmeKMIzPw= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= @@ -597,8 +599,6 @@ github.com/opencontainers/runtime-spec v1.2.0 h1:z97+pHb3uELt/yiAWD691HNHQIF07bE github.com/opencontainers/runtime-spec v1.2.0/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/selinux v1.11.1 h1:nHFvthhM0qY8/m+vfhJylliSshm8G1jJ2jDMcgULaH8= github.com/opencontainers/selinux v1.11.1/go.mod h1:E5dMC3VPuVvVHDYmi78qvhJp8+M586T4DlDRYpFkyec= -github.com/openshift/api v0.0.0-20250405052455-aa882942241d h1:OWknR960jKxORjMEEeMc30m/wHit6w/Wxqb3XtToVdE= -github.com/openshift/api v0.0.0-20250405052455-aa882942241d/go.mod h1:yk60tHAmHhtVpJQo3TwVYq2zpuP70iJIFDCmeKMIzPw= github.com/openshift/apiserver-library-go v0.0.0-20250127121756-dc9a973f14ce h1:w0Up6YV1APcn20v/1h5IfuToz96o2pVqZyjzbw0yotU= github.com/openshift/apiserver-library-go v0.0.0-20250127121756-dc9a973f14ce/go.mod h1:kkSwH4osgejnRIyHfsfkv0V0xfmgH4Yk/VDObaJukHU= github.com/openshift/build-machinery-go v0.0.0-20250102153059-e85a1a7ecb5c h1:6XcszPFZpan4qll5XbdLll7n1So3IsPn28aw2j1obMo= From 41ae7fa4cb0213d43406d81fd9c0b60dd5302c2f Mon Sep 17 00:00:00 2001 From: Isabella Janssen Date: Wed, 23 Apr 2025 14:25:50 -0400 Subject: [PATCH 2/4] bump(client-go): update client-go dependency to isabella-janssen:mco-1519 --- go.mod | 2 ++ go.sum | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index 3d1a9ab1af3e..9c512a2cb6b6 100644 --- a/go.mod +++ b/go.mod @@ -356,3 +356,5 @@ replace github.com/containerd/errdefs => github.com/containerd/errdefs v0.1.0 // The following replace commands are in place to allow the simultaneous merge of the API (PR #2255) & origin for making use of the V1 MCN API replace github.com/openshift/api => github.com/isabella-janssen/openshift-api v0.0.0-20250423163652-3d76f1835b2c + +replace github.com/openshift/client-go => github.com/isabella-janssen/openshift-client-go v0.0.0-20250423165717-b84d4e80502c diff --git a/go.sum b/go.sum index 8f7abe18bebc..60795f1661bc 100644 --- a/go.sum +++ b/go.sum @@ -462,6 +462,8 @@ github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2 github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/isabella-janssen/openshift-api v0.0.0-20250423163652-3d76f1835b2c h1:ZXr+C67yjbTVngH2A0aJF+/TkRA0bMxz9xuOWoQE8p8= github.com/isabella-janssen/openshift-api v0.0.0-20250423163652-3d76f1835b2c/go.mod h1:yk60tHAmHhtVpJQo3TwVYq2zpuP70iJIFDCmeKMIzPw= +github.com/isabella-janssen/openshift-client-go v0.0.0-20250423165717-b84d4e80502c h1:2zTo28G79Fs9TfhlRJimpsZRj4TZag/i03fzzTdnR8E= +github.com/isabella-janssen/openshift-client-go v0.0.0-20250423165717-b84d4e80502c/go.mod h1:Ee2bsd/VaaRLMVFFn2qWZ3Cl9jwAeUjzCiPvMTnGkGI= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= @@ -603,8 +605,6 @@ github.com/openshift/apiserver-library-go v0.0.0-20250127121756-dc9a973f14ce h1: github.com/openshift/apiserver-library-go v0.0.0-20250127121756-dc9a973f14ce/go.mod h1:kkSwH4osgejnRIyHfsfkv0V0xfmgH4Yk/VDObaJukHU= github.com/openshift/build-machinery-go v0.0.0-20250102153059-e85a1a7ecb5c h1:6XcszPFZpan4qll5XbdLll7n1So3IsPn28aw2j1obMo= github.com/openshift/build-machinery-go v0.0.0-20250102153059-e85a1a7ecb5c/go.mod h1:8jcm8UPtg2mCAsxfqKil1xrmRMI3a+XU2TZ9fF8A7TE= -github.com/openshift/client-go v0.0.0-20250324153519-f0faeb0f2f2e h1:OfOI0eTTUdwqaUHgm0YsinRYtOj4OGO+ioauVNPuDeQ= -github.com/openshift/client-go v0.0.0-20250324153519-f0faeb0f2f2e/go.mod h1:MWRA5YlclrxlrDIOni+AaeOrHchTslLvLTs9pIWuCiw= github.com/openshift/cluster-network-operator v0.0.0-20240708200319-1cd8678b38fb h1:Dr0dbSQTAU9UaoAvimGjR+fsvwx2twJ5KR0s/jyAz88= github.com/openshift/cluster-network-operator v0.0.0-20240708200319-1cd8678b38fb/go.mod h1:LnhqxbWhAnhPwilJ4yX1/ly7wCMCYJKkaiSJQSh+Wjg= github.com/openshift/kubernetes v1.30.1-0.20250320083338-1601b9e27d85 h1:GGa1y6SWhlKjw9Utv+Q5bNH4dEk5ArVFRwaqlYsNS2Q= From 2f5445eaaaf4016b8ad04a69b3afa222bc9d4c76 Mon Sep 17 00:00:00 2001 From: Isabella Janssen Date: Wed, 23 Apr 2025 14:26:39 -0400 Subject: [PATCH 3/4] bump(api & client-go): go mod vendor --- .../api/config/v1/types_infrastructure.go | 1 - ..._generated.featuregated-crd-manifests.yaml | 1 - vendor/github.com/openshift/api/features.md | 2 +- .../openshift/api/features/features.go | 16 +- .../api/machineconfiguration/v1/register.go | 2 + .../v1/types_machineconfignode.go | 245 +++++++++++++++++ .../v1/zz_generated.deepcopy.go | 177 +++++++++++++ ..._generated.featuregated-crd-manifests.yaml | 77 +++++- .../v1/zz_generated.swagger_doc_generated.go | 85 ++++++ .../config/v1/apiserverencryption.go | 11 +- .../config/v1/awskmsconfig.go | 32 +++ .../config/v1/kmsconfig.go | 36 +++ .../applyconfigurations/internal/internal.go | 34 +++ .../config/applyconfigurations/utils.go | 4 + .../applyconfigurations/internal/internal.go | 32 +-- .../v1/machineconfignode.go | 246 ++++++++++++++++++ .../v1/machineconfignodespec.go | 41 +++ ...chineconfignodespecmachineconfigversion.go | 23 ++ .../v1/machineconfignodestatus.go | 64 +++++ ...ineconfignodestatusmachineconfigversion.go | 32 +++ .../machineconfignodestatuspinnedimageset.go | 59 +++++ .../v1/mcoobjectreference.go | 23 ++ .../v1alpha1/machineconfignodespec.go | 20 +- .../machineconfignodespecpinnedimageset.go | 23 -- .../machineconfignodestatuspinnedimageset.go | 22 +- .../v1/generated_expansion.go | 2 + .../v1/machineconfignode.go | 60 +++++ .../v1/machineconfiguration_client.go | 5 + .../applyconfigurations/internal/internal.go | 55 ++++ .../operator/v1/configmapfilereference.go | 32 +++ .../operator/v1/consolecustomization.go | 14 + .../operator/v1/filereferencesource.go | 36 +++ .../applyconfigurations/operator/v1/logo.go | 41 +++ .../applyconfigurations/operator/v1/theme.go | 36 +++ vendor/modules.txt | 6 +- 35 files changed, 1508 insertions(+), 87 deletions(-) create mode 100644 vendor/github.com/openshift/api/machineconfiguration/v1/types_machineconfignode.go create mode 100644 vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/awskmsconfig.go create mode 100644 vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/kmsconfig.go create mode 100644 vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfignode.go create mode 100644 vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfignodespec.go create mode 100644 vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfignodespecmachineconfigversion.go create mode 100644 vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfignodestatus.go create mode 100644 vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfignodestatusmachineconfigversion.go create mode 100644 vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfignodestatuspinnedimageset.go create mode 100644 vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/mcoobjectreference.go delete mode 100644 vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineconfignodespecpinnedimageset.go create mode 100644 vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/machineconfignode.go create mode 100644 vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/configmapfilereference.go create mode 100644 vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/filereferencesource.go create mode 100644 vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/logo.go create mode 100644 vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/theme.go diff --git a/vendor/github.com/openshift/api/config/v1/types_infrastructure.go b/vendor/github.com/openshift/api/config/v1/types_infrastructure.go index f10ccb85573e..e0c46ade11c2 100644 --- a/vendor/github.com/openshift/api/config/v1/types_infrastructure.go +++ b/vendor/github.com/openshift/api/config/v1/types_infrastructure.go @@ -1390,7 +1390,6 @@ type VSpherePlatformTopology struct { // VSpherePlatformFailureDomainSpec. // For example, for zone=zonea, region=region1, and infrastructure name=test, // the template path would be calculated as //vm/test-rhcos-region1-zonea. - // +openshift:enable:FeatureGate=VSphereControlPlaneMachineSet // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=2048 // +kubebuilder:validation:Pattern=`^/.*?/vm/.*?` diff --git a/vendor/github.com/openshift/api/config/v1/zz_generated.featuregated-crd-manifests.yaml b/vendor/github.com/openshift/api/config/v1/zz_generated.featuregated-crd-manifests.yaml index c53b4772e019..6ced2292acc1 100644 --- a/vendor/github.com/openshift/api/config/v1/zz_generated.featuregated-crd-manifests.yaml +++ b/vendor/github.com/openshift/api/config/v1/zz_generated.featuregated-crd-manifests.yaml @@ -321,7 +321,6 @@ infrastructures.config.openshift.io: - GCPLabelsTags - HighlyAvailableArbiter - NutanixMultiSubnets - - VSphereControlPlaneMachineSet - VSphereHostVMGroupZonal - VSphereMultiNetworks - VSphereMultiVCenters diff --git a/vendor/github.com/openshift/api/features.md b/vendor/github.com/openshift/api/features.md index b12d64521a95..abb60e484acb 100644 --- a/vendor/github.com/openshift/api/features.md +++ b/vendor/github.com/openshift/api/features.md @@ -8,6 +8,7 @@ | ClusterVersionOperatorConfiguration| | | Enabled | Enabled | | | | Example2| | | Enabled | Enabled | | | | NewOLMCatalogdAPIV1Metas| | | | Enabled | | Enabled | +| NewOLMPreflightPermissionChecks| | | | Enabled | | Enabled | | SELinuxChangePolicy| | | Enabled | Enabled | | | | SELinuxMount| | | Enabled | Enabled | | | | ShortCertRotation| | | Enabled | Enabled | | | @@ -93,7 +94,6 @@ | PersistentIPsForVirtualization| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | | PrivateHostedZoneAWS| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | | SetEIPForNLBIngressController| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | -| VSphereControlPlaneMachineSet| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | | VSphereDriverConfiguration| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | | VSphereMultiVCenters| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | | VSphereStaticIPs| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | diff --git a/vendor/github.com/openshift/api/features/features.go b/vendor/github.com/openshift/api/features/features.go index fbce6abdafc5..184f25451441 100644 --- a/vendor/github.com/openshift/api/features/features.go +++ b/vendor/github.com/openshift/api/features/features.go @@ -346,14 +346,6 @@ var ( enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() - FeatureGateVSphereControlPlaneMachineset = newFeatureGate("VSphereControlPlaneMachineSet"). - reportProblemsToJiraComponent("splat"). - contactPerson("rvanderp3"). - productScope(ocpSpecific). - enhancementPR(legacyFeatureGateWithoutEnhancement). - enableIn(configv1.Default, configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). - mustRegister() - FeatureGateMachineConfigNodes = newFeatureGate("MachineConfigNodes"). reportProblemsToJiraComponent("MachineConfigOperator"). contactPerson("cdoern"). @@ -538,6 +530,14 @@ var ( enableForClusterProfile(SelfManaged, configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() + FeatureGateNewOLMPreflightPermissionChecks = newFeatureGate("NewOLMPreflightPermissionChecks"). + reportProblemsToJiraComponent("olm"). + contactPerson("tshort"). + productScope(ocpSpecific). + enhancementPR("https://github.com/openshift/enhancements/pull/1768"). + enableForClusterProfile(SelfManaged, configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). + mustRegister() + FeatureGateInsightsOnDemandDataGather = newFeatureGate("InsightsOnDemandDataGather"). reportProblemsToJiraComponent("insights"). contactPerson("tremes"). diff --git a/vendor/github.com/openshift/api/machineconfiguration/v1/register.go b/vendor/github.com/openshift/api/machineconfiguration/v1/register.go index 46cf07a95df5..d0a88324f7f2 100644 --- a/vendor/github.com/openshift/api/machineconfiguration/v1/register.go +++ b/vendor/github.com/openshift/api/machineconfiguration/v1/register.go @@ -40,6 +40,8 @@ func addKnownTypes(scheme *runtime.Scheme) error { &MachineOSBuildList{}, &PinnedImageSet{}, &PinnedImageSetList{}, + &MachineConfigNode{}, + &MachineConfigNodeList{}, ) metav1.AddToGroupVersion(scheme, GroupVersion) diff --git a/vendor/github.com/openshift/api/machineconfiguration/v1/types_machineconfignode.go b/vendor/github.com/openshift/api/machineconfiguration/v1/types_machineconfignode.go new file mode 100644 index 000000000000..a1d37f0c9ad8 --- /dev/null +++ b/vendor/github.com/openshift/api/machineconfiguration/v1/types_machineconfignode.go @@ -0,0 +1,245 @@ +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true +// +kubebuilder:resource:path=machineconfignodes,scope=Cluster +// +kubebuilder:subresource:status +// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/2255 +// +openshift:file-pattern=cvoRunLevel=0000_80,operatorName=machine-config,operatorOrdering=01 +// +openshift:enable:FeatureGate=MachineConfigNodes +// +kubebuilder:printcolumn:name="PoolName",type="string",JSONPath=.spec.pool.name,priority=0 +// +kubebuilder:printcolumn:name="DesiredConfig",type="string",JSONPath=.spec.configVersion.desired,priority=0 +// +kubebuilder:printcolumn:name="CurrentConfig",type="string",JSONPath=.status.configVersion.current,priority=0 +// +kubebuilder:printcolumn:name="Updated",type="string",JSONPath=.status.conditions[?(@.type=="Updated")].status,priority=0 +// +kubebuilder:printcolumn:name="UpdatePrepared",type="string",JSONPath=.status.conditions[?(@.type=="UpdatePrepared")].status,priority=1 +// +kubebuilder:printcolumn:name="UpdateExecuted",type="string",JSONPath=.status.conditions[?(@.type=="UpdateExecuted")].status,priority=1 +// +kubebuilder:printcolumn:name="UpdatePostActionComplete",type="string",JSONPath=.status.conditions[?(@.type=="UpdatePostActionComplete")].status,priority=1 +// +kubebuilder:printcolumn:name="UpdateComplete",type="string",JSONPath=.status.conditions[?(@.type=="UpdateComplete")].status,priority=1 +// +kubebuilder:printcolumn:name="Resumed",type="string",JSONPath=.status.conditions[?(@.type=="Resumed")].status,priority=1 +// +kubebuilder:printcolumn:name="UpdatedFilesAndOS",type="string",JSONPath=.status.conditions[?(@.type=="AppliedFilesAndOS")].status,priority=1 +// +kubebuilder:printcolumn:name="CordonedNode",type="string",JSONPath=.status.conditions[?(@.type=="Cordoned")].status,priority=1 +// +kubebuilder:printcolumn:name="DrainedNode",type="string",JSONPath=.status.conditions[?(@.type=="Drained")].status,priority=1 +// +kubebuilder:printcolumn:name="RebootedNode",type="string",JSONPath=.status.conditions[?(@.type=="RebootedNode")].status,priority=1 +// +kubebuilder:printcolumn:name="UncordonedNode",type="string",JSONPath=.status.conditions[?(@.type=="Uncordoned")].status,priority=1 +// +kubebuilder:metadata:labels=openshift.io/operator-managed= + +// MachineConfigNode describes the health of the Machines on the system +// 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="self.metadata.name == self.spec.node.name",message="spec.node.name should match metadata.name" +type MachineConfigNode struct { + metav1.TypeMeta `json:",inline"` + + // metadata is the standard object metadata. + // +optional + metav1.ObjectMeta `json:"metadata,omitempty"` + + // spec describes the configuration of the machine config node. + // +required + Spec MachineConfigNodeSpec `json:"spec"` + + // status describes the last observed state of this machine config node. + // +optional + Status MachineConfigNodeStatus `json:"status"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// MachineConfigNodeList describes all of the MachinesStates on the system +// +// 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 MachineConfigNodeList struct { + metav1.TypeMeta `json:",inline"` + + // metadata is the standard list metadata. + // +optional + metav1.ListMeta `json:"metadata"` + + // items contains a collection of MachineConfigNode resources. + // +kubebuilder:validation:MaxItems=100 + // +optional + Items []MachineConfigNode `json:"items"` +} + +// MCOObjectReference holds information about an object the MCO either owns +// or modifies in some way +type MCOObjectReference struct { + // name is the name of the object being referenced. For example, this can represent a machine + // config pool or node name. + // Must be a lowercase RFC-1123 subdomain name (https://tools.ietf.org/html/rfc1123) consisting + // of only lowercase alphanumeric characters, hyphens (-), and periods (.), and must start and end + // with an alphanumeric character, and be at most 253 characters in length. + // +kubebuilder:validation:MaxLength:=253 + // +kubebuilder:validation:XValidation:rule="!format.dns1123Subdomain().validate(self).hasValue()",message="a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character." + // +required + Name string `json:"name"` +} + +// MachineConfigNodeSpec describes the MachineConfigNode we are managing. +type MachineConfigNodeSpec struct { + // node contains a reference to the node for this machine config node. + // +required + Node MCOObjectReference `json:"node"` + + // pool contains a reference to the machine config pool that this machine config node's + // referenced node belongs to. + // +required + Pool MCOObjectReference `json:"pool"` + + // configVersion holds the desired config version for the node targeted by this machine config node resource. + // The desired version represents the machine config the node will attempt to update to and gets set before the machine config operator validates + // the new machine config against the current machine config. + // +required + ConfigVersion MachineConfigNodeSpecMachineConfigVersion `json:"configVersion"` +} + +// MachineConfigNodeStatus holds the reported information on a particular machine config node. +type MachineConfigNodeStatus struct { + // conditions represent the observations of a machine config node's current state. Valid types are: + // UpdatePrepared, UpdateExecuted, UpdatePostActionComplete, UpdateComplete, Updated, Resumed, + // Drained, AppliedFilesAndOS, Cordoned, Uncordoned, RebootedNode, NodeDegraded, PinnedImageSetsProgressing, + // and PinnedImageSetsDegraded. + // +listType=map + // +listMapKey=type + // +kubebuilder:validation:MaxItems=20 + // +optional + Conditions []metav1.Condition `json:"conditions,omitempty"` + // observedGeneration represents the generation of the MachineConfigNode object observed by the Machine Config Operator's controller. + // This field is updated when the controller observes a change to the desiredConfig in the configVersion of the machine config node spec. + // +kubebuilder:validation:XValidation:rule="self >= oldSelf", message="observedGeneration must not decrease" + // +kubebuilder:validation:Minimum=1 + // +optional + ObservedGeneration int64 `json:"observedGeneration,omitempty"` + // configVersion describes the current and desired machine config version for this node. + // +optional + ConfigVersion *MachineConfigNodeStatusMachineConfigVersion `json:"configVersion,omitempty"` + // pinnedImageSets describes the current and desired pinned image sets for this node. + // +listType=map + // +listMapKey=name + // +kubebuilder:validation:MaxItems=100 + // +optional + PinnedImageSets []MachineConfigNodeStatusPinnedImageSet `json:"pinnedImageSets,omitempty"` +} + +// MachineConfigNodeStatusPinnedImageSet holds information about the current, desired, and failed pinned image sets for the observed machine config node. +// +kubebuilder:validation:XValidation:rule="has(self.desiredGeneration) && has(self.currentGeneration) ? self.desiredGeneration >= self.currentGeneration : true",message="desired generation must be greater than or equal to the current generation" +// +kubebuilder:validation:XValidation:rule="has(self.lastFailedGeneration) && has(self.desiredGeneration) ? self.desiredGeneration >= self.lastFailedGeneration : true",message="desired generation must be greater than or equal to the last failed generation" +// +kubebuilder:validation:XValidation:rule="has(self.lastFailedGeneration) ? has(self.lastFailedGenerationError) : true",message="last failed generation error must be defined on image pull and pin failure" +type MachineConfigNodeStatusPinnedImageSet struct { + // name is the name of the pinned image set. + // Must be a lowercase RFC-1123 subdomain name (https://tools.ietf.org/html/rfc1123) consisting + // of only lowercase alphanumeric characters, hyphens (-), and periods (.), and must start and end + // with an alphanumeric character, and be at most 253 characters in length. + // +kubebuilder:validation:MaxLength:=253 + // +kubebuilder:validation:XValidation:rule="!format.dns1123Subdomain().validate(self).hasValue()",message="a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character." + // +required + Name string `json:"name"` + // currentGeneration is the generation of the pinned image set that has most recently been successfully pulled and pinned on this node. + // +kubebuilder:validation:XValidation:rule="self >= oldSelf", message="currentGeneration must not decrease" + // +kubebuilder:validation:Minimum=1 + // +optional + CurrentGeneration int32 `json:"currentGeneration,omitempty"` + // desiredGeneration is the generation of the pinned image set that is targeted to be pulled and pinned on this node. + // +kubebuilder:validation:XValidation:rule="self >= oldSelf", message="desiredGeneration must not decrease" + // +kubebuilder:validation:Minimum=1 + // +optional + DesiredGeneration int32 `json:"desiredGeneration,omitempty"` + // lastFailedGeneration is the generation of the most recent pinned image set that failed to be pulled and pinned on this node. + // +kubebuilder:validation:XValidation:rule="self >= oldSelf", message="lastFailedGeneration must not decrease" + // +kubebuilder:validation:Minimum=1 + // +optional + LastFailedGeneration int32 `json:"lastFailedGeneration,omitempty"` + // lastFailedGenerationError is the error explaining why the desired images failed to be pulled and pinned. + // The error is an empty string if the image pull and pin is successful. + // +kubebuilder:validation:MaxLength=32768 + // +optional + LastFailedGenerationError string `json:"lastFailedGenerationError,omitempty"` +} + +// MachineConfigNodeStatusMachineConfigVersion holds the current and desired config versions as last updated in the MCN status. +// When the current and desired versions do not match, the machine config pool is processing an upgrade and the machine config node will +// monitor the upgrade process. +// When the current and desired versions do match, the machine config node will ignore these events given that certain operations +// happen both during the MCO's upgrade mode and the daily operations mode. +type MachineConfigNodeStatusMachineConfigVersion struct { + // current is the name of the machine config currently in use on the node. + // This value is updated once the machine config daemon has completed the update of the configuration for the node. + // This value should match the desired version unless an upgrade is in progress. + // Must be a lowercase RFC-1123 subdomain name (https://tools.ietf.org/html/rfc1123) consisting + // of only lowercase alphanumeric characters, hyphens (-), and periods (.), and must start and end + // with an alphanumeric character, and be at most 253 characters in length. + // +kubebuilder:validation:MaxLength:=253 + // +kubebuilder:validation:XValidation:rule="!format.dns1123Subdomain().validate(self).hasValue()",message="a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character." + // +optional + Current string `json:"current"` + // desired is the MachineConfig the node wants to upgrade to. + // This value gets set in the machine config node status once the machine config has been validated + // against the current machine config. + // Must be a lowercase RFC-1123 subdomain name (https://tools.ietf.org/html/rfc1123) consisting + // of only lowercase alphanumeric characters, hyphens (-), and periods (.), and must start and end + // with an alphanumeric character, and be at most 253 characters in length. + // +kubebuilder:validation:MaxLength:=253 + // +kubebuilder:validation:XValidation:rule="!format.dns1123Subdomain().validate(self).hasValue()",message="a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character." + // +required + Desired string `json:"desired"` +} + +// MachineConfigNodeSpecMachineConfigVersion holds the desired config version for the current observed machine config node. +// When Current is not equal to Desired, the MachineConfigOperator is in an upgrade phase and the machine config node will +// take account of upgrade related events. Otherwise, they will be ignored given that certain operations +// happen both during the MCO's upgrade mode and the daily operations mode. +type MachineConfigNodeSpecMachineConfigVersion struct { + // desired is the name of the machine config that the the node should be upgraded to. + // This value is set when the machine config pool generates a new version of its rendered configuration. + // When this value is changed, the machine config daemon starts the node upgrade process. + // This value gets set in the machine config node spec once the machine config has been targeted for upgrade and before it is validated. + // Must be a lowercase RFC-1123 subdomain name (https://tools.ietf.org/html/rfc1123) consisting + // of only lowercase alphanumeric characters, hyphens (-), and periods (.), and must start and end + // with an alphanumeric character, and be at most 253 characters in length. + // +kubebuilder:validation:MaxLength:=253 + // +kubebuilder:validation:XValidation:rule="!format.dns1123Subdomain().validate(self).hasValue()",message="a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character." + // +required + Desired string `json:"desired"` +} + +// StateProgress is each possible state for each possible MachineConfigNodeType +// +enum +type StateProgress string + +const ( + // MachineConfigNodeUpdatePrepared describes a machine that is preparing in the daemon to trigger an update + MachineConfigNodeUpdatePrepared StateProgress = "UpdatePrepared" + // MachineConfigNodeUpdateExecuted describes a machine that has executed the body of the upgrade + MachineConfigNodeUpdateExecuted StateProgress = "UpdateExecuted" + // MachineConfigNodeUpdatePostActionComplete describes a machine that has executed its post update action + MachineConfigNodeUpdatePostActionComplete StateProgress = "UpdatePostActionComplete" + // MachineConfigNodeUpdateComplete describes a machine that has completed the core parts of an upgrade + MachineConfigNodeUpdateComplete StateProgress = "UpdateComplete" + // MachineConfigNodeUpdated describes a machine that is fully updated and has a matching desired and current config + MachineConfigNodeUpdated StateProgress = "Updated" + // MachineConfigNodeUpdateResumed describes a machine that has resumed normal processes + MachineConfigNodeResumed StateProgress = "Resumed" + // MachineConfigNodeUpdateDrained describes the part of the in progress phase where the node drains + MachineConfigNodeUpdateDrained StateProgress = "Drained" + // MachineConfigNodeUpdateFilesAndOS describes the part of the in progress phase where the nodes files and OS config change + MachineConfigNodeUpdateFilesAndOS StateProgress = "AppliedFilesAndOS" + // MachineConfigNodeUpdateCordoned describes the part of the in progress phase where the node cordons + MachineConfigNodeUpdateCordoned StateProgress = "Cordoned" + // MachineConfigNodeUpdateUncordoned describes the part of the completing phase where the node uncordons + MachineConfigNodeUpdateUncordoned StateProgress = "Uncordoned" + // MachineConfigNodeUpdateRebooted describes the part of the post action phase where the node reboots itself + MachineConfigNodeUpdateRebooted StateProgress = "RebootedNode" + // MachineConfigNodeNodeDegraded describes a machine that has failed to update to the desired machine config and is in a degraded state + MachineConfigNodeNodeDegraded StateProgress = "NodeDegraded" + // MachineConfigNodePinnedImageSetsProgressing describes a machine currently progressing to the desired pinned image sets + MachineConfigNodePinnedImageSetsProgressing StateProgress = "PinnedImageSetsProgressing" + // MachineConfigNodePinnedImageSetsDegraded describes a machine that has failed to progress to the desired pinned image sets + MachineConfigNodePinnedImageSetsDegraded StateProgress = "PinnedImageSetsDegraded" +) diff --git a/vendor/github.com/openshift/api/machineconfiguration/v1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/machineconfiguration/v1/zz_generated.deepcopy.go index 36d4fb0c97c9..f153cc023786 100644 --- a/vendor/github.com/openshift/api/machineconfiguration/v1/zz_generated.deepcopy.go +++ b/vendor/github.com/openshift/api/machineconfiguration/v1/zz_generated.deepcopy.go @@ -589,6 +589,22 @@ func (in *KubeletConfigStatus) DeepCopy() *KubeletConfigStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MCOObjectReference) DeepCopyInto(out *MCOObjectReference) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MCOObjectReference. +func (in *MCOObjectReference) DeepCopy() *MCOObjectReference { + if in == nil { + return nil + } + out := new(MCOObjectReference) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MachineConfig) DeepCopyInto(out *MachineConfig) { *out = *in @@ -649,6 +665,167 @@ func (in *MachineConfigList) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachineConfigNode) DeepCopyInto(out *MachineConfigNode) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineConfigNode. +func (in *MachineConfigNode) DeepCopy() *MachineConfigNode { + if in == nil { + return nil + } + out := new(MachineConfigNode) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *MachineConfigNode) 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 *MachineConfigNodeList) DeepCopyInto(out *MachineConfigNodeList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]MachineConfigNode, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineConfigNodeList. +func (in *MachineConfigNodeList) DeepCopy() *MachineConfigNodeList { + if in == nil { + return nil + } + out := new(MachineConfigNodeList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *MachineConfigNodeList) 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 *MachineConfigNodeSpec) DeepCopyInto(out *MachineConfigNodeSpec) { + *out = *in + out.Node = in.Node + out.Pool = in.Pool + out.ConfigVersion = in.ConfigVersion + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineConfigNodeSpec. +func (in *MachineConfigNodeSpec) DeepCopy() *MachineConfigNodeSpec { + if in == nil { + return nil + } + out := new(MachineConfigNodeSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachineConfigNodeSpecMachineConfigVersion) DeepCopyInto(out *MachineConfigNodeSpecMachineConfigVersion) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineConfigNodeSpecMachineConfigVersion. +func (in *MachineConfigNodeSpecMachineConfigVersion) DeepCopy() *MachineConfigNodeSpecMachineConfigVersion { + if in == nil { + return nil + } + out := new(MachineConfigNodeSpecMachineConfigVersion) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachineConfigNodeStatus) DeepCopyInto(out *MachineConfigNodeStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]metav1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ConfigVersion != nil { + in, out := &in.ConfigVersion, &out.ConfigVersion + *out = new(MachineConfigNodeStatusMachineConfigVersion) + **out = **in + } + if in.PinnedImageSets != nil { + in, out := &in.PinnedImageSets, &out.PinnedImageSets + *out = make([]MachineConfigNodeStatusPinnedImageSet, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineConfigNodeStatus. +func (in *MachineConfigNodeStatus) DeepCopy() *MachineConfigNodeStatus { + if in == nil { + return nil + } + out := new(MachineConfigNodeStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachineConfigNodeStatusMachineConfigVersion) DeepCopyInto(out *MachineConfigNodeStatusMachineConfigVersion) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineConfigNodeStatusMachineConfigVersion. +func (in *MachineConfigNodeStatusMachineConfigVersion) DeepCopy() *MachineConfigNodeStatusMachineConfigVersion { + if in == nil { + return nil + } + out := new(MachineConfigNodeStatusMachineConfigVersion) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachineConfigNodeStatusPinnedImageSet) DeepCopyInto(out *MachineConfigNodeStatusPinnedImageSet) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineConfigNodeStatusPinnedImageSet. +func (in *MachineConfigNodeStatusPinnedImageSet) DeepCopy() *MachineConfigNodeStatusPinnedImageSet { + if in == nil { + return nil + } + out := new(MachineConfigNodeStatusPinnedImageSet) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MachineConfigPool) DeepCopyInto(out *MachineConfigPool) { *out = *in diff --git a/vendor/github.com/openshift/api/machineconfiguration/v1/zz_generated.featuregated-crd-manifests.yaml b/vendor/github.com/openshift/api/machineconfiguration/v1/zz_generated.featuregated-crd-manifests.yaml index de45be4c726b..2e1b258857cb 100644 --- a/vendor/github.com/openshift/api/machineconfiguration/v1/zz_generated.featuregated-crd-manifests.yaml +++ b/vendor/github.com/openshift/api/machineconfiguration/v1/zz_generated.featuregated-crd-manifests.yaml @@ -37,7 +37,6 @@ controllerconfigs.machineconfiguration.openshift.io: - GCPLabelsTags - HighlyAvailableArbiter - NutanixMultiSubnets - - VSphereControlPlaneMachineSet - VSphereMultiNetworks - VSphereMultiVCenters FilenameOperatorName: machine-config @@ -112,6 +111,82 @@ machineconfigs.machineconfiguration.openshift.io: TopLevelFeatureGates: [] Version: v1 +machineconfignodes.machineconfiguration.openshift.io: + Annotations: {} + ApprovedPRNumber: https://github.com/openshift/api/pull/2255 + CRDName: machineconfignodes.machineconfiguration.openshift.io + Capability: "" + Category: "" + FeatureGates: + - MachineConfigNodes + FilenameOperatorName: machine-config + FilenameOperatorOrdering: "01" + FilenameRunLevel: "0000_80" + GroupName: machineconfiguration.openshift.io + HasStatus: true + KindName: MachineConfigNode + Labels: + openshift.io/operator-managed: "" + PluralName: machineconfignodes + PrinterColumns: + - jsonPath: .spec.pool.name + name: PoolName + type: string + - jsonPath: .spec.configVersion.desired + name: DesiredConfig + type: string + - jsonPath: .status.configVersion.current + name: CurrentConfig + type: string + - jsonPath: .status.conditions[?(@.type=="Updated")].status + name: Updated + type: string + - jsonPath: .status.conditions[?(@.type=="UpdatePrepared")].status + name: UpdatePrepared + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="UpdateExecuted")].status + name: UpdateExecuted + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="UpdatePostActionComplete")].status + name: UpdatePostActionComplete + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="UpdateComplete")].status + name: UpdateComplete + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="Resumed")].status + name: Resumed + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="AppliedFilesAndOS")].status + name: UpdatedFilesAndOS + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="Cordoned")].status + name: CordonedNode + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="Drained")].status + name: DrainedNode + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="RebootedNode")].status + name: RebootedNode + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="Uncordoned")].status + name: UncordonedNode + priority: 1 + type: string + Scope: Cluster + ShortNames: null + TopLevelFeatureGates: + - MachineConfigNodes + Version: v1 + machineconfigpools.machineconfiguration.openshift.io: Annotations: {} ApprovedPRNumber: https://github.com/openshift/api/pull/1453 diff --git a/vendor/github.com/openshift/api/machineconfiguration/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/machineconfiguration/v1/zz_generated.swagger_doc_generated.go index a5d9ff6f23e8..8a92be70f4f4 100644 --- a/vendor/github.com/openshift/api/machineconfiguration/v1/zz_generated.swagger_doc_generated.go +++ b/vendor/github.com/openshift/api/machineconfiguration/v1/zz_generated.swagger_doc_generated.go @@ -368,6 +368,91 @@ func (PoolSynchronizerStatus) SwaggerDoc() map[string]string { return map_PoolSynchronizerStatus } +var map_MCOObjectReference = map[string]string{ + "": "MCOObjectReference holds information about an object the MCO either owns or modifies in some way", + "name": "name is the name of the object being referenced. For example, this can represent a machine config pool or node name. Must be a lowercase RFC-1123 subdomain name (https://tools.ietf.org/html/rfc1123) consisting of only lowercase alphanumeric characters, hyphens (-), and periods (.), and must start and end with an alphanumeric character, and be at most 253 characters in length.", +} + +func (MCOObjectReference) SwaggerDoc() map[string]string { + return map_MCOObjectReference +} + +var map_MachineConfigNode = map[string]string{ + "": "MachineConfigNode describes the health of the Machines on the system Compatibility 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 metadata.", + "spec": "spec describes the configuration of the machine config node.", + "status": "status describes the last observed state of this machine config node.", +} + +func (MachineConfigNode) SwaggerDoc() map[string]string { + return map_MachineConfigNode +} + +var map_MachineConfigNodeList = map[string]string{ + "": "MachineConfigNodeList describes all of the MachinesStates on the system\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 metadata.", + "items": "items contains a collection of MachineConfigNode resources.", +} + +func (MachineConfigNodeList) SwaggerDoc() map[string]string { + return map_MachineConfigNodeList +} + +var map_MachineConfigNodeSpec = map[string]string{ + "": "MachineConfigNodeSpec describes the MachineConfigNode we are managing.", + "node": "node contains a reference to the node for this machine config node.", + "pool": "pool contains a reference to the machine config pool that this machine config node's referenced node belongs to.", + "configVersion": "configVersion holds the desired config version for the node targeted by this machine config node resource. The desired version represents the machine config the node will attempt to update to and gets set before the machine config operator validates the new machine config against the current machine config.", +} + +func (MachineConfigNodeSpec) SwaggerDoc() map[string]string { + return map_MachineConfigNodeSpec +} + +var map_MachineConfigNodeSpecMachineConfigVersion = map[string]string{ + "": "MachineConfigNodeSpecMachineConfigVersion holds the desired config version for the current observed machine config node. When Current is not equal to Desired, the MachineConfigOperator is in an upgrade phase and the machine config node will take account of upgrade related events. Otherwise, they will be ignored given that certain operations happen both during the MCO's upgrade mode and the daily operations mode.", + "desired": "desired is the name of the machine config that the the node should be upgraded to. This value is set when the machine config pool generates a new version of its rendered configuration. When this value is changed, the machine config daemon starts the node upgrade process. This value gets set in the machine config node spec once the machine config has been targeted for upgrade and before it is validated. Must be a lowercase RFC-1123 subdomain name (https://tools.ietf.org/html/rfc1123) consisting of only lowercase alphanumeric characters, hyphens (-), and periods (.), and must start and end with an alphanumeric character, and be at most 253 characters in length.", +} + +func (MachineConfigNodeSpecMachineConfigVersion) SwaggerDoc() map[string]string { + return map_MachineConfigNodeSpecMachineConfigVersion +} + +var map_MachineConfigNodeStatus = map[string]string{ + "": "MachineConfigNodeStatus holds the reported information on a particular machine config node.", + "conditions": "conditions represent the observations of a machine config node's current state. Valid types are: UpdatePrepared, UpdateExecuted, UpdatePostActionComplete, UpdateComplete, Updated, Resumed, Drained, AppliedFilesAndOS, Cordoned, Uncordoned, RebootedNode, NodeDegraded, PinnedImageSetsProgressing, and PinnedImageSetsDegraded.", + "observedGeneration": "observedGeneration represents the generation of the MachineConfigNode object observed by the Machine Config Operator's controller. This field is updated when the controller observes a change to the desiredConfig in the configVersion of the machine config node spec.", + "configVersion": "configVersion describes the current and desired machine config version for this node.", + "pinnedImageSets": "pinnedImageSets describes the current and desired pinned image sets for this node.", +} + +func (MachineConfigNodeStatus) SwaggerDoc() map[string]string { + return map_MachineConfigNodeStatus +} + +var map_MachineConfigNodeStatusMachineConfigVersion = map[string]string{ + "": "MachineConfigNodeStatusMachineConfigVersion holds the current and desired config versions as last updated in the MCN status. When the current and desired versions do not match, the machine config pool is processing an upgrade and the machine config node will monitor the upgrade process. When the current and desired versions do match, the machine config node will ignore these events given that certain operations happen both during the MCO's upgrade mode and the daily operations mode.", + "current": "current is the name of the machine config currently in use on the node. This value is updated once the machine config daemon has completed the update of the configuration for the node. This value should match the desired version unless an upgrade is in progress. Must be a lowercase RFC-1123 subdomain name (https://tools.ietf.org/html/rfc1123) consisting of only lowercase alphanumeric characters, hyphens (-), and periods (.), and must start and end with an alphanumeric character, and be at most 253 characters in length.", + "desired": "desired is the MachineConfig the node wants to upgrade to. This value gets set in the machine config node status once the machine config has been validated against the current machine config. Must be a lowercase RFC-1123 subdomain name (https://tools.ietf.org/html/rfc1123) consisting of only lowercase alphanumeric characters, hyphens (-), and periods (.), and must start and end with an alphanumeric character, and be at most 253 characters in length.", +} + +func (MachineConfigNodeStatusMachineConfigVersion) SwaggerDoc() map[string]string { + return map_MachineConfigNodeStatusMachineConfigVersion +} + +var map_MachineConfigNodeStatusPinnedImageSet = map[string]string{ + "": "MachineConfigNodeStatusPinnedImageSet holds information about the current, desired, and failed pinned image sets for the observed machine config node.", + "name": "name is the name of the pinned image set. Must be a lowercase RFC-1123 subdomain name (https://tools.ietf.org/html/rfc1123) consisting of only lowercase alphanumeric characters, hyphens (-), and periods (.), and must start and end with an alphanumeric character, and be at most 253 characters in length.", + "currentGeneration": "currentGeneration is the generation of the pinned image set that has most recently been successfully pulled and pinned on this node.", + "desiredGeneration": "desiredGeneration is the generation of the pinned image set that is targeted to be pulled and pinned on this node.", + "lastFailedGeneration": "lastFailedGeneration is the generation of the most recent pinned image set that failed to be pulled and pinned on this node.", + "lastFailedGenerationError": "lastFailedGenerationError is the error explaining why the desired images failed to be pulled and pinned. The error is an empty string if the image pull and pin is successful.", +} + +func (MachineConfigNodeStatusPinnedImageSet) SwaggerDoc() map[string]string { + return map_MachineConfigNodeStatusPinnedImageSet +} + var map_MachineConfigReference = map[string]string{ "": "Refers to the name of a rendered MachineConfig (e.g., \"rendered-worker-ec40d2965ff81bce7cd7a7e82a680739\", etc.): the build targets this MachineConfig, this is often used to tell us whether we need an update.", "name": "name is the name of the rendered MachineConfig object. This value should be between 10 and 253 characters, and must contain only lowercase alphanumeric characters, hyphens and periods, and should start and end with an alphanumeric character.", diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/apiserverencryption.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/apiserverencryption.go index 6f0deb125a31..06b34856cf1f 100644 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/apiserverencryption.go +++ b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/apiserverencryption.go @@ -9,7 +9,8 @@ import ( // APIServerEncryptionApplyConfiguration represents a declarative configuration of the APIServerEncryption type for use // with apply. type APIServerEncryptionApplyConfiguration struct { - Type *configv1.EncryptionType `json:"type,omitempty"` + Type *configv1.EncryptionType `json:"type,omitempty"` + KMS *KMSConfigApplyConfiguration `json:"kms,omitempty"` } // APIServerEncryptionApplyConfiguration constructs a declarative configuration of the APIServerEncryption type for use with @@ -25,3 +26,11 @@ func (b *APIServerEncryptionApplyConfiguration) WithType(value configv1.Encrypti b.Type = &value return b } + +// WithKMS sets the KMS field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the KMS field is set to the value of the last call. +func (b *APIServerEncryptionApplyConfiguration) WithKMS(value *KMSConfigApplyConfiguration) *APIServerEncryptionApplyConfiguration { + b.KMS = value + return b +} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/awskmsconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/awskmsconfig.go new file mode 100644 index 000000000000..d09f6cbf6196 --- /dev/null +++ b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/awskmsconfig.go @@ -0,0 +1,32 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +// AWSKMSConfigApplyConfiguration represents a declarative configuration of the AWSKMSConfig type for use +// with apply. +type AWSKMSConfigApplyConfiguration struct { + KeyARN *string `json:"keyARN,omitempty"` + Region *string `json:"region,omitempty"` +} + +// AWSKMSConfigApplyConfiguration constructs a declarative configuration of the AWSKMSConfig type for use with +// apply. +func AWSKMSConfig() *AWSKMSConfigApplyConfiguration { + return &AWSKMSConfigApplyConfiguration{} +} + +// WithKeyARN sets the KeyARN field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the KeyARN field is set to the value of the last call. +func (b *AWSKMSConfigApplyConfiguration) WithKeyARN(value string) *AWSKMSConfigApplyConfiguration { + b.KeyARN = &value + return b +} + +// WithRegion sets the Region field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Region field is set to the value of the last call. +func (b *AWSKMSConfigApplyConfiguration) WithRegion(value string) *AWSKMSConfigApplyConfiguration { + b.Region = &value + return b +} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/kmsconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/kmsconfig.go new file mode 100644 index 000000000000..564619f41855 --- /dev/null +++ b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/kmsconfig.go @@ -0,0 +1,36 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + configv1 "github.com/openshift/api/config/v1" +) + +// KMSConfigApplyConfiguration represents a declarative configuration of the KMSConfig type for use +// with apply. +type KMSConfigApplyConfiguration struct { + Type *configv1.KMSProviderType `json:"type,omitempty"` + AWS *AWSKMSConfigApplyConfiguration `json:"aws,omitempty"` +} + +// KMSConfigApplyConfiguration constructs a declarative configuration of the KMSConfig type for use with +// apply. +func KMSConfig() *KMSConfigApplyConfiguration { + return &KMSConfigApplyConfiguration{} +} + +// WithType sets the Type field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Type field is set to the value of the last call. +func (b *KMSConfigApplyConfiguration) WithType(value configv1.KMSProviderType) *KMSConfigApplyConfiguration { + b.Type = &value + return b +} + +// WithAWS sets the AWS field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the AWS field is set to the value of the last call. +func (b *KMSConfigApplyConfiguration) WithAWS(value *AWSKMSConfigApplyConfiguration) *KMSConfigApplyConfiguration { + b.AWS = value + return b +} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/internal/internal.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/internal/internal.go index 8e00277fd4f7..636d30505218 100644 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/internal/internal.go +++ b/vendor/github.com/openshift/client-go/config/applyconfigurations/internal/internal.go @@ -47,9 +47,17 @@ var schemaYAML = typed.YAMLObject(`types: - name: com.github.openshift.api.config.v1.APIServerEncryption map: fields: + - name: kms + type: + namedType: com.github.openshift.api.config.v1.KMSConfig - name: type type: scalar: string + unions: + - discriminator: type + fields: + - fieldName: kms + discriminatorValue: KMS - name: com.github.openshift.api.config.v1.APIServerNamedServingCert map: fields: @@ -127,6 +135,17 @@ var schemaYAML = typed.YAMLObject(`types: scalar: string unions: - discriminator: type +- name: com.github.openshift.api.config.v1.AWSKMSConfig + map: + fields: + - name: keyARN + type: + scalar: string + default: "" + - name: region + type: + scalar: string + default: "" - name: com.github.openshift.api.config.v1.AWSPlatformSpec map: fields: @@ -1885,6 +1904,21 @@ var schemaYAML = typed.YAMLObject(`types: elementType: namedType: __untyped_deduced_ elementRelationship: separable +- name: com.github.openshift.api.config.v1.KMSConfig + map: + fields: + - name: aws + type: + namedType: com.github.openshift.api.config.v1.AWSKMSConfig + - name: type + type: + scalar: string + default: "" + unions: + - discriminator: type + fields: + - fieldName: aws + discriminatorValue: AWS - name: com.github.openshift.api.config.v1.KeystoneIdentityProvider map: fields: diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/utils.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/utils.go index c84978c5e028..18d3cef1333f 100644 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/utils.go +++ b/vendor/github.com/openshift/client-go/config/applyconfigurations/utils.go @@ -46,6 +46,8 @@ func ForKind(kind schema.GroupVersionKind) interface{} { return &configv1.AWSDNSSpecApplyConfiguration{} case v1.SchemeGroupVersion.WithKind("AWSIngressSpec"): return &configv1.AWSIngressSpecApplyConfiguration{} + case v1.SchemeGroupVersion.WithKind("AWSKMSConfig"): + return &configv1.AWSKMSConfigApplyConfiguration{} case v1.SchemeGroupVersion.WithKind("AWSPlatformSpec"): return &configv1.AWSPlatformSpecApplyConfiguration{} case v1.SchemeGroupVersion.WithKind("AWSPlatformStatus"): @@ -228,6 +230,8 @@ func ForKind(kind schema.GroupVersionKind) interface{} { return &configv1.IngressStatusApplyConfiguration{} case v1.SchemeGroupVersion.WithKind("KeystoneIdentityProvider"): return &configv1.KeystoneIdentityProviderApplyConfiguration{} + case v1.SchemeGroupVersion.WithKind("KMSConfig"): + return &configv1.KMSConfigApplyConfiguration{} case v1.SchemeGroupVersion.WithKind("KubevirtPlatformStatus"): return &configv1.KubevirtPlatformStatusApplyConfiguration{} case v1.SchemeGroupVersion.WithKind("LDAPAttributeMapping"): diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/internal/internal.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/internal/internal.go index af470dbbf243..353e64e1ecd1 100644 --- a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/internal/internal.go +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/internal/internal.go @@ -63,6 +63,16 @@ var schemaYAML = typed.YAMLObject(`types: elementType: namedType: __untyped_deduced_ elementRelationship: separable +- name: com.github.openshift.api.machineconfiguration.v1.MachineConfigNode + scalar: untyped + list: + elementType: + namedType: __untyped_atomic_ + elementRelationship: atomic + map: + elementType: + namedType: __untyped_deduced_ + elementRelationship: separable - name: com.github.openshift.api.machineconfiguration.v1.MachineConfigPool scalar: untyped list: @@ -195,14 +205,6 @@ var schemaYAML = typed.YAMLObject(`types: type: namedType: com.github.openshift.api.machineconfiguration.v1alpha1.MCOObjectReference default: {} - - name: pinnedImageSets - type: - list: - elementType: - namedType: com.github.openshift.api.machineconfiguration.v1alpha1.MachineConfigNodeSpecPinnedImageSet - elementRelationship: associative - keys: - - name - name: pool type: namedType: com.github.openshift.api.machineconfiguration.v1alpha1.MCOObjectReference @@ -214,13 +216,6 @@ var schemaYAML = typed.YAMLObject(`types: type: scalar: string default: "" -- name: com.github.openshift.api.machineconfiguration.v1alpha1.MachineConfigNodeSpecPinnedImageSet - map: - fields: - - name: name - type: - scalar: string - default: "" - name: com.github.openshift.api.machineconfiguration.v1alpha1.MachineConfigNodeStatus map: fields: @@ -270,12 +265,9 @@ var schemaYAML = typed.YAMLObject(`types: - name: lastFailedGeneration type: scalar: numeric - - name: lastFailedGenerationErrors + - name: lastFailedGenerationError type: - list: - elementType: - scalar: string - elementRelationship: atomic + scalar: string - name: name type: scalar: string diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfignode.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfignode.go new file mode 100644 index 000000000000..1f55801861cd --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfignode.go @@ -0,0 +1,246 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + machineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1" + internal "github.com/openshift/client-go/machineconfiguration/applyconfigurations/internal" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + managedfields "k8s.io/apimachinery/pkg/util/managedfields" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// MachineConfigNodeApplyConfiguration represents a declarative configuration of the MachineConfigNode type for use +// with apply. +type MachineConfigNodeApplyConfiguration struct { + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *MachineConfigNodeSpecApplyConfiguration `json:"spec,omitempty"` + Status *MachineConfigNodeStatusApplyConfiguration `json:"status,omitempty"` +} + +// MachineConfigNode constructs a declarative configuration of the MachineConfigNode type for use with +// apply. +func MachineConfigNode(name string) *MachineConfigNodeApplyConfiguration { + b := &MachineConfigNodeApplyConfiguration{} + b.WithName(name) + b.WithKind("MachineConfigNode") + b.WithAPIVersion("machineconfiguration.openshift.io/v1") + return b +} + +// ExtractMachineConfigNode extracts the applied configuration owned by fieldManager from +// machineConfigNode. If no managedFields are found in machineConfigNode for fieldManager, a +// MachineConfigNodeApplyConfiguration is returned with only the Name, Namespace (if applicable), +// APIVersion and Kind populated. It is possible that no managed fields were found for because other +// field managers have taken ownership of all the fields previously owned by fieldManager, or because +// the fieldManager never owned fields any fields. +// machineConfigNode must be a unmodified MachineConfigNode API object that was retrieved from the Kubernetes API. +// ExtractMachineConfigNode provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +// Experimental! +func ExtractMachineConfigNode(machineConfigNode *machineconfigurationv1.MachineConfigNode, fieldManager string) (*MachineConfigNodeApplyConfiguration, error) { + return extractMachineConfigNode(machineConfigNode, fieldManager, "") +} + +// ExtractMachineConfigNodeStatus is the same as ExtractMachineConfigNode except +// that it extracts the status subresource applied configuration. +// Experimental! +func ExtractMachineConfigNodeStatus(machineConfigNode *machineconfigurationv1.MachineConfigNode, fieldManager string) (*MachineConfigNodeApplyConfiguration, error) { + return extractMachineConfigNode(machineConfigNode, fieldManager, "status") +} + +func extractMachineConfigNode(machineConfigNode *machineconfigurationv1.MachineConfigNode, fieldManager string, subresource string) (*MachineConfigNodeApplyConfiguration, error) { + b := &MachineConfigNodeApplyConfiguration{} + err := managedfields.ExtractInto(machineConfigNode, internal.Parser().Type("com.github.openshift.api.machineconfiguration.v1.MachineConfigNode"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(machineConfigNode.Name) + + b.WithKind("MachineConfigNode") + b.WithAPIVersion("machineconfiguration.openshift.io/v1") + return b, nil +} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *MachineConfigNodeApplyConfiguration) WithKind(value string) *MachineConfigNodeApplyConfiguration { + b.TypeMetaApplyConfiguration.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIVersion field is set to the value of the last call. +func (b *MachineConfigNodeApplyConfiguration) WithAPIVersion(value string) *MachineConfigNodeApplyConfiguration { + b.TypeMetaApplyConfiguration.APIVersion = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *MachineConfigNodeApplyConfiguration) WithName(value string) *MachineConfigNodeApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Name = &value + return b +} + +// WithGenerateName sets the GenerateName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GenerateName field is set to the value of the last call. +func (b *MachineConfigNodeApplyConfiguration) WithGenerateName(value string) *MachineConfigNodeApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.GenerateName = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *MachineConfigNodeApplyConfiguration) WithNamespace(value string) *MachineConfigNodeApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Namespace = &value + return b +} + +// WithUID sets the UID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the UID field is set to the value of the last call. +func (b *MachineConfigNodeApplyConfiguration) WithUID(value types.UID) *MachineConfigNodeApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ResourceVersion field is set to the value of the last call. +func (b *MachineConfigNodeApplyConfiguration) WithResourceVersion(value string) *MachineConfigNodeApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Generation field is set to the value of the last call. +func (b *MachineConfigNodeApplyConfiguration) WithGeneration(value int64) *MachineConfigNodeApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CreationTimestamp field is set to the value of the last call. +func (b *MachineConfigNodeApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *MachineConfigNodeApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionTimestamp field is set to the value of the last call. +func (b *MachineConfigNodeApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *MachineConfigNodeApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *MachineConfigNodeApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *MachineConfigNodeApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *MachineConfigNodeApplyConfiguration) WithLabels(entries map[string]string) *MachineConfigNodeApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ObjectMetaApplyConfiguration.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *MachineConfigNodeApplyConfiguration) WithAnnotations(entries map[string]string) *MachineConfigNodeApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ObjectMetaApplyConfiguration.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *MachineConfigNodeApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *MachineConfigNodeApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *MachineConfigNodeApplyConfiguration) WithFinalizers(values ...string) *MachineConfigNodeApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) + } + return b +} + +func (b *MachineConfigNodeApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} + } +} + +// WithSpec sets the Spec field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Spec field is set to the value of the last call. +func (b *MachineConfigNodeApplyConfiguration) WithSpec(value *MachineConfigNodeSpecApplyConfiguration) *MachineConfigNodeApplyConfiguration { + b.Spec = value + return b +} + +// WithStatus sets the Status field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Status field is set to the value of the last call. +func (b *MachineConfigNodeApplyConfiguration) WithStatus(value *MachineConfigNodeStatusApplyConfiguration) *MachineConfigNodeApplyConfiguration { + b.Status = value + return b +} + +// GetName retrieves the value of the Name field in the declarative configuration. +func (b *MachineConfigNodeApplyConfiguration) GetName() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Name +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfignodespec.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfignodespec.go new file mode 100644 index 000000000000..d1e04cef84d2 --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfignodespec.go @@ -0,0 +1,41 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +// MachineConfigNodeSpecApplyConfiguration represents a declarative configuration of the MachineConfigNodeSpec type for use +// with apply. +type MachineConfigNodeSpecApplyConfiguration struct { + Node *MCOObjectReferenceApplyConfiguration `json:"node,omitempty"` + Pool *MCOObjectReferenceApplyConfiguration `json:"pool,omitempty"` + ConfigVersion *MachineConfigNodeSpecMachineConfigVersionApplyConfiguration `json:"configVersion,omitempty"` +} + +// MachineConfigNodeSpecApplyConfiguration constructs a declarative configuration of the MachineConfigNodeSpec type for use with +// apply. +func MachineConfigNodeSpec() *MachineConfigNodeSpecApplyConfiguration { + return &MachineConfigNodeSpecApplyConfiguration{} +} + +// WithNode sets the Node field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Node field is set to the value of the last call. +func (b *MachineConfigNodeSpecApplyConfiguration) WithNode(value *MCOObjectReferenceApplyConfiguration) *MachineConfigNodeSpecApplyConfiguration { + b.Node = value + return b +} + +// WithPool sets the Pool field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Pool field is set to the value of the last call. +func (b *MachineConfigNodeSpecApplyConfiguration) WithPool(value *MCOObjectReferenceApplyConfiguration) *MachineConfigNodeSpecApplyConfiguration { + b.Pool = value + return b +} + +// WithConfigVersion sets the ConfigVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ConfigVersion field is set to the value of the last call. +func (b *MachineConfigNodeSpecApplyConfiguration) WithConfigVersion(value *MachineConfigNodeSpecMachineConfigVersionApplyConfiguration) *MachineConfigNodeSpecApplyConfiguration { + b.ConfigVersion = value + return b +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfignodespecmachineconfigversion.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfignodespecmachineconfigversion.go new file mode 100644 index 000000000000..3657f3352f38 --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfignodespecmachineconfigversion.go @@ -0,0 +1,23 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +// MachineConfigNodeSpecMachineConfigVersionApplyConfiguration represents a declarative configuration of the MachineConfigNodeSpecMachineConfigVersion type for use +// with apply. +type MachineConfigNodeSpecMachineConfigVersionApplyConfiguration struct { + Desired *string `json:"desired,omitempty"` +} + +// MachineConfigNodeSpecMachineConfigVersionApplyConfiguration constructs a declarative configuration of the MachineConfigNodeSpecMachineConfigVersion type for use with +// apply. +func MachineConfigNodeSpecMachineConfigVersion() *MachineConfigNodeSpecMachineConfigVersionApplyConfiguration { + return &MachineConfigNodeSpecMachineConfigVersionApplyConfiguration{} +} + +// WithDesired sets the Desired field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Desired field is set to the value of the last call. +func (b *MachineConfigNodeSpecMachineConfigVersionApplyConfiguration) WithDesired(value string) *MachineConfigNodeSpecMachineConfigVersionApplyConfiguration { + b.Desired = &value + return b +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfignodestatus.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfignodestatus.go new file mode 100644 index 000000000000..abfc04d09cda --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfignodestatus.go @@ -0,0 +1,64 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// MachineConfigNodeStatusApplyConfiguration represents a declarative configuration of the MachineConfigNodeStatus type for use +// with apply. +type MachineConfigNodeStatusApplyConfiguration struct { + Conditions []metav1.ConditionApplyConfiguration `json:"conditions,omitempty"` + ObservedGeneration *int64 `json:"observedGeneration,omitempty"` + ConfigVersion *MachineConfigNodeStatusMachineConfigVersionApplyConfiguration `json:"configVersion,omitempty"` + PinnedImageSets []MachineConfigNodeStatusPinnedImageSetApplyConfiguration `json:"pinnedImageSets,omitempty"` +} + +// MachineConfigNodeStatusApplyConfiguration constructs a declarative configuration of the MachineConfigNodeStatus type for use with +// apply. +func MachineConfigNodeStatus() *MachineConfigNodeStatusApplyConfiguration { + return &MachineConfigNodeStatusApplyConfiguration{} +} + +// WithConditions adds the given value to the Conditions field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Conditions field. +func (b *MachineConfigNodeStatusApplyConfiguration) WithConditions(values ...*metav1.ConditionApplyConfiguration) *MachineConfigNodeStatusApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithConditions") + } + b.Conditions = append(b.Conditions, *values[i]) + } + return b +} + +// WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ObservedGeneration field is set to the value of the last call. +func (b *MachineConfigNodeStatusApplyConfiguration) WithObservedGeneration(value int64) *MachineConfigNodeStatusApplyConfiguration { + b.ObservedGeneration = &value + return b +} + +// WithConfigVersion sets the ConfigVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ConfigVersion field is set to the value of the last call. +func (b *MachineConfigNodeStatusApplyConfiguration) WithConfigVersion(value *MachineConfigNodeStatusMachineConfigVersionApplyConfiguration) *MachineConfigNodeStatusApplyConfiguration { + b.ConfigVersion = value + return b +} + +// WithPinnedImageSets adds the given value to the PinnedImageSets field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the PinnedImageSets field. +func (b *MachineConfigNodeStatusApplyConfiguration) WithPinnedImageSets(values ...*MachineConfigNodeStatusPinnedImageSetApplyConfiguration) *MachineConfigNodeStatusApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithPinnedImageSets") + } + b.PinnedImageSets = append(b.PinnedImageSets, *values[i]) + } + return b +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfignodestatusmachineconfigversion.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfignodestatusmachineconfigversion.go new file mode 100644 index 000000000000..1b6276d9a219 --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfignodestatusmachineconfigversion.go @@ -0,0 +1,32 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +// MachineConfigNodeStatusMachineConfigVersionApplyConfiguration represents a declarative configuration of the MachineConfigNodeStatusMachineConfigVersion type for use +// with apply. +type MachineConfigNodeStatusMachineConfigVersionApplyConfiguration struct { + Current *string `json:"current,omitempty"` + Desired *string `json:"desired,omitempty"` +} + +// MachineConfigNodeStatusMachineConfigVersionApplyConfiguration constructs a declarative configuration of the MachineConfigNodeStatusMachineConfigVersion type for use with +// apply. +func MachineConfigNodeStatusMachineConfigVersion() *MachineConfigNodeStatusMachineConfigVersionApplyConfiguration { + return &MachineConfigNodeStatusMachineConfigVersionApplyConfiguration{} +} + +// WithCurrent sets the Current field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Current field is set to the value of the last call. +func (b *MachineConfigNodeStatusMachineConfigVersionApplyConfiguration) WithCurrent(value string) *MachineConfigNodeStatusMachineConfigVersionApplyConfiguration { + b.Current = &value + return b +} + +// WithDesired sets the Desired field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Desired field is set to the value of the last call. +func (b *MachineConfigNodeStatusMachineConfigVersionApplyConfiguration) WithDesired(value string) *MachineConfigNodeStatusMachineConfigVersionApplyConfiguration { + b.Desired = &value + return b +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfignodestatuspinnedimageset.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfignodestatuspinnedimageset.go new file mode 100644 index 000000000000..35af40046103 --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfignodestatuspinnedimageset.go @@ -0,0 +1,59 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +// MachineConfigNodeStatusPinnedImageSetApplyConfiguration represents a declarative configuration of the MachineConfigNodeStatusPinnedImageSet type for use +// with apply. +type MachineConfigNodeStatusPinnedImageSetApplyConfiguration struct { + Name *string `json:"name,omitempty"` + CurrentGeneration *int32 `json:"currentGeneration,omitempty"` + DesiredGeneration *int32 `json:"desiredGeneration,omitempty"` + LastFailedGeneration *int32 `json:"lastFailedGeneration,omitempty"` + LastFailedGenerationError *string `json:"lastFailedGenerationError,omitempty"` +} + +// MachineConfigNodeStatusPinnedImageSetApplyConfiguration constructs a declarative configuration of the MachineConfigNodeStatusPinnedImageSet type for use with +// apply. +func MachineConfigNodeStatusPinnedImageSet() *MachineConfigNodeStatusPinnedImageSetApplyConfiguration { + return &MachineConfigNodeStatusPinnedImageSetApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *MachineConfigNodeStatusPinnedImageSetApplyConfiguration) WithName(value string) *MachineConfigNodeStatusPinnedImageSetApplyConfiguration { + b.Name = &value + return b +} + +// WithCurrentGeneration sets the CurrentGeneration field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CurrentGeneration field is set to the value of the last call. +func (b *MachineConfigNodeStatusPinnedImageSetApplyConfiguration) WithCurrentGeneration(value int32) *MachineConfigNodeStatusPinnedImageSetApplyConfiguration { + b.CurrentGeneration = &value + return b +} + +// WithDesiredGeneration sets the DesiredGeneration field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DesiredGeneration field is set to the value of the last call. +func (b *MachineConfigNodeStatusPinnedImageSetApplyConfiguration) WithDesiredGeneration(value int32) *MachineConfigNodeStatusPinnedImageSetApplyConfiguration { + b.DesiredGeneration = &value + return b +} + +// WithLastFailedGeneration sets the LastFailedGeneration field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the LastFailedGeneration field is set to the value of the last call. +func (b *MachineConfigNodeStatusPinnedImageSetApplyConfiguration) WithLastFailedGeneration(value int32) *MachineConfigNodeStatusPinnedImageSetApplyConfiguration { + b.LastFailedGeneration = &value + return b +} + +// WithLastFailedGenerationError sets the LastFailedGenerationError field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the LastFailedGenerationError field is set to the value of the last call. +func (b *MachineConfigNodeStatusPinnedImageSetApplyConfiguration) WithLastFailedGenerationError(value string) *MachineConfigNodeStatusPinnedImageSetApplyConfiguration { + b.LastFailedGenerationError = &value + return b +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/mcoobjectreference.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/mcoobjectreference.go new file mode 100644 index 000000000000..a8101be27225 --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1/mcoobjectreference.go @@ -0,0 +1,23 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +// MCOObjectReferenceApplyConfiguration represents a declarative configuration of the MCOObjectReference type for use +// with apply. +type MCOObjectReferenceApplyConfiguration struct { + Name *string `json:"name,omitempty"` +} + +// MCOObjectReferenceApplyConfiguration constructs a declarative configuration of the MCOObjectReference type for use with +// apply. +func MCOObjectReference() *MCOObjectReferenceApplyConfiguration { + return &MCOObjectReferenceApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *MCOObjectReferenceApplyConfiguration) WithName(value string) *MCOObjectReferenceApplyConfiguration { + b.Name = &value + return b +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineconfignodespec.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineconfignodespec.go index 8c9ebb7058d1..63d718a6b3bc 100644 --- a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineconfignodespec.go +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineconfignodespec.go @@ -5,10 +5,9 @@ package v1alpha1 // MachineConfigNodeSpecApplyConfiguration represents a declarative configuration of the MachineConfigNodeSpec type for use // with apply. type MachineConfigNodeSpecApplyConfiguration struct { - Node *MCOObjectReferenceApplyConfiguration `json:"node,omitempty"` - Pool *MCOObjectReferenceApplyConfiguration `json:"pool,omitempty"` - ConfigVersion *MachineConfigNodeSpecMachineConfigVersionApplyConfiguration `json:"configVersion,omitempty"` - PinnedImageSets []MachineConfigNodeSpecPinnedImageSetApplyConfiguration `json:"pinnedImageSets,omitempty"` + Node *MCOObjectReferenceApplyConfiguration `json:"node,omitempty"` + Pool *MCOObjectReferenceApplyConfiguration `json:"pool,omitempty"` + ConfigVersion *MachineConfigNodeSpecMachineConfigVersionApplyConfiguration `json:"configVersion,omitempty"` } // MachineConfigNodeSpecApplyConfiguration constructs a declarative configuration of the MachineConfigNodeSpec type for use with @@ -40,16 +39,3 @@ func (b *MachineConfigNodeSpecApplyConfiguration) WithConfigVersion(value *Machi b.ConfigVersion = value return b } - -// WithPinnedImageSets adds the given value to the PinnedImageSets field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the PinnedImageSets field. -func (b *MachineConfigNodeSpecApplyConfiguration) WithPinnedImageSets(values ...*MachineConfigNodeSpecPinnedImageSetApplyConfiguration) *MachineConfigNodeSpecApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithPinnedImageSets") - } - b.PinnedImageSets = append(b.PinnedImageSets, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineconfignodespecpinnedimageset.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineconfignodespecpinnedimageset.go deleted file mode 100644 index c49f285fd9b5..000000000000 --- a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineconfignodespecpinnedimageset.go +++ /dev/null @@ -1,23 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -// MachineConfigNodeSpecPinnedImageSetApplyConfiguration represents a declarative configuration of the MachineConfigNodeSpecPinnedImageSet type for use -// with apply. -type MachineConfigNodeSpecPinnedImageSetApplyConfiguration struct { - Name *string `json:"name,omitempty"` -} - -// MachineConfigNodeSpecPinnedImageSetApplyConfiguration constructs a declarative configuration of the MachineConfigNodeSpecPinnedImageSet type for use with -// apply. -func MachineConfigNodeSpecPinnedImageSet() *MachineConfigNodeSpecPinnedImageSetApplyConfiguration { - return &MachineConfigNodeSpecPinnedImageSetApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *MachineConfigNodeSpecPinnedImageSetApplyConfiguration) WithName(value string) *MachineConfigNodeSpecPinnedImageSetApplyConfiguration { - b.Name = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineconfignodestatuspinnedimageset.go b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineconfignodestatuspinnedimageset.go index 30bf49ceff8c..938d048f1e80 100644 --- a/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineconfignodestatuspinnedimageset.go +++ b/vendor/github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineconfignodestatuspinnedimageset.go @@ -5,11 +5,11 @@ package v1alpha1 // MachineConfigNodeStatusPinnedImageSetApplyConfiguration represents a declarative configuration of the MachineConfigNodeStatusPinnedImageSet type for use // with apply. type MachineConfigNodeStatusPinnedImageSetApplyConfiguration struct { - Name *string `json:"name,omitempty"` - CurrentGeneration *int32 `json:"currentGeneration,omitempty"` - DesiredGeneration *int32 `json:"desiredGeneration,omitempty"` - LastFailedGeneration *int32 `json:"lastFailedGeneration,omitempty"` - LastFailedGenerationErrors []string `json:"lastFailedGenerationErrors,omitempty"` + Name *string `json:"name,omitempty"` + CurrentGeneration *int32 `json:"currentGeneration,omitempty"` + DesiredGeneration *int32 `json:"desiredGeneration,omitempty"` + LastFailedGeneration *int32 `json:"lastFailedGeneration,omitempty"` + LastFailedGenerationError *string `json:"lastFailedGenerationError,omitempty"` } // MachineConfigNodeStatusPinnedImageSetApplyConfiguration constructs a declarative configuration of the MachineConfigNodeStatusPinnedImageSet type for use with @@ -50,12 +50,10 @@ func (b *MachineConfigNodeStatusPinnedImageSetApplyConfiguration) WithLastFailed return b } -// WithLastFailedGenerationErrors adds the given value to the LastFailedGenerationErrors field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the LastFailedGenerationErrors field. -func (b *MachineConfigNodeStatusPinnedImageSetApplyConfiguration) WithLastFailedGenerationErrors(values ...string) *MachineConfigNodeStatusPinnedImageSetApplyConfiguration { - for i := range values { - b.LastFailedGenerationErrors = append(b.LastFailedGenerationErrors, values[i]) - } +// WithLastFailedGenerationError sets the LastFailedGenerationError field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the LastFailedGenerationError field is set to the value of the last call. +func (b *MachineConfigNodeStatusPinnedImageSetApplyConfiguration) WithLastFailedGenerationError(value string) *MachineConfigNodeStatusPinnedImageSetApplyConfiguration { + b.LastFailedGenerationError = &value return b } diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/generated_expansion.go b/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/generated_expansion.go index 185b67c3d202..c3262559515f 100644 --- a/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/generated_expansion.go +++ b/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/generated_expansion.go @@ -10,6 +10,8 @@ type KubeletConfigExpansion interface{} type MachineConfigExpansion interface{} +type MachineConfigNodeExpansion interface{} + type MachineConfigPoolExpansion interface{} type MachineOSBuildExpansion interface{} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/machineconfignode.go b/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/machineconfignode.go new file mode 100644 index 000000000000..72ea1044cba8 --- /dev/null +++ b/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/machineconfignode.go @@ -0,0 +1,60 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + context "context" + + machineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1" + applyconfigurationsmachineconfigurationv1 "github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1" + scheme "github.com/openshift/client-go/machineconfiguration/clientset/versioned/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + gentype "k8s.io/client-go/gentype" +) + +// MachineConfigNodesGetter has a method to return a MachineConfigNodeInterface. +// A group's client should implement this interface. +type MachineConfigNodesGetter interface { + MachineConfigNodes() MachineConfigNodeInterface +} + +// MachineConfigNodeInterface has methods to work with MachineConfigNode resources. +type MachineConfigNodeInterface interface { + Create(ctx context.Context, machineConfigNode *machineconfigurationv1.MachineConfigNode, opts metav1.CreateOptions) (*machineconfigurationv1.MachineConfigNode, error) + Update(ctx context.Context, machineConfigNode *machineconfigurationv1.MachineConfigNode, opts metav1.UpdateOptions) (*machineconfigurationv1.MachineConfigNode, error) + // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). + UpdateStatus(ctx context.Context, machineConfigNode *machineconfigurationv1.MachineConfigNode, opts metav1.UpdateOptions) (*machineconfigurationv1.MachineConfigNode, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*machineconfigurationv1.MachineConfigNode, error) + List(ctx context.Context, opts metav1.ListOptions) (*machineconfigurationv1.MachineConfigNodeList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *machineconfigurationv1.MachineConfigNode, err error) + Apply(ctx context.Context, machineConfigNode *applyconfigurationsmachineconfigurationv1.MachineConfigNodeApplyConfiguration, opts metav1.ApplyOptions) (result *machineconfigurationv1.MachineConfigNode, err error) + // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). + ApplyStatus(ctx context.Context, machineConfigNode *applyconfigurationsmachineconfigurationv1.MachineConfigNodeApplyConfiguration, opts metav1.ApplyOptions) (result *machineconfigurationv1.MachineConfigNode, err error) + MachineConfigNodeExpansion +} + +// machineConfigNodes implements MachineConfigNodeInterface +type machineConfigNodes struct { + *gentype.ClientWithListAndApply[*machineconfigurationv1.MachineConfigNode, *machineconfigurationv1.MachineConfigNodeList, *applyconfigurationsmachineconfigurationv1.MachineConfigNodeApplyConfiguration] +} + +// newMachineConfigNodes returns a MachineConfigNodes +func newMachineConfigNodes(c *MachineconfigurationV1Client) *machineConfigNodes { + return &machineConfigNodes{ + gentype.NewClientWithListAndApply[*machineconfigurationv1.MachineConfigNode, *machineconfigurationv1.MachineConfigNodeList, *applyconfigurationsmachineconfigurationv1.MachineConfigNodeApplyConfiguration]( + "machineconfignodes", + c.RESTClient(), + scheme.ParameterCodec, + "", + func() *machineconfigurationv1.MachineConfigNode { return &machineconfigurationv1.MachineConfigNode{} }, + func() *machineconfigurationv1.MachineConfigNodeList { + return &machineconfigurationv1.MachineConfigNodeList{} + }, + ), + } +} diff --git a/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/machineconfiguration_client.go b/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/machineconfiguration_client.go index 10a035175369..ca0d13d58927 100644 --- a/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/machineconfiguration_client.go +++ b/vendor/github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/machineconfiguration_client.go @@ -16,6 +16,7 @@ type MachineconfigurationV1Interface interface { ControllerConfigsGetter KubeletConfigsGetter MachineConfigsGetter + MachineConfigNodesGetter MachineConfigPoolsGetter MachineOSBuildsGetter MachineOSConfigsGetter @@ -43,6 +44,10 @@ func (c *MachineconfigurationV1Client) MachineConfigs() MachineConfigInterface { return newMachineConfigs(c) } +func (c *MachineconfigurationV1Client) MachineConfigNodes() MachineConfigNodeInterface { + return newMachineConfigNodes(c) +} + func (c *MachineconfigurationV1Client) MachineConfigPools() MachineConfigPoolInterface { return newMachineConfigPools(c) } diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/internal/internal.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/internal/internal.go index 1ef3ef6c4892..bdeaa76d916a 100644 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/internal/internal.go +++ b/vendor/github.com/openshift/client-go/operator/applyconfigurations/internal/internal.go @@ -727,6 +727,17 @@ var schemaYAML = typed.YAMLObject(`types: type: namedType: com.github.openshift.api.operator.v1.ConfigStatus default: {} +- name: com.github.openshift.api.operator.v1.ConfigMapFileReference + map: + fields: + - name: key + type: + scalar: string + default: "" + - name: name + type: + scalar: string + default: "" - name: com.github.openshift.api.operator.v1.ConfigSpec map: fields: @@ -845,6 +856,14 @@ var schemaYAML = typed.YAMLObject(`types: - name: documentationBaseURL type: scalar: string + - name: logos + type: + list: + elementType: + namedType: com.github.openshift.api.operator.v1.Logo + elementRelationship: associative + keys: + - type - name: perspectives type: list: @@ -1327,6 +1346,16 @@ var schemaYAML = typed.YAMLObject(`types: - name: multicast type: scalar: boolean +- name: com.github.openshift.api.operator.v1.FileReferenceSource + map: + fields: + - name: configMap + type: + namedType: com.github.openshift.api.operator.v1.ConfigMapFileReference + - name: from + type: + scalar: string + default: "" - name: com.github.openshift.api.operator.v1.ForwardPlugin map: fields: @@ -2409,6 +2438,21 @@ var schemaYAML = typed.YAMLObject(`types: discriminatorValue: Container - fieldName: syslog discriminatorValue: Syslog +- name: com.github.openshift.api.operator.v1.Logo + map: + fields: + - name: themes + type: + list: + elementType: + namedType: com.github.openshift.api.operator.v1.Theme + elementRelationship: associative + keys: + - mode + - name: type + type: + scalar: string + default: "" - name: com.github.openshift.api.operator.v1.MTUMigration map: fields: @@ -3845,6 +3889,17 @@ var schemaYAML = typed.YAMLObject(`types: type: scalar: numeric default: 0 +- name: com.github.openshift.api.operator.v1.Theme + map: + fields: + - name: mode + type: + scalar: string + default: "" + - name: source + type: + namedType: com.github.openshift.api.operator.v1.FileReferenceSource + default: {} - name: com.github.openshift.api.operator.v1.Upstream map: fields: diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/configmapfilereference.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/configmapfilereference.go new file mode 100644 index 000000000000..3c70be2c1e8a --- /dev/null +++ b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/configmapfilereference.go @@ -0,0 +1,32 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +// ConfigMapFileReferenceApplyConfiguration represents a declarative configuration of the ConfigMapFileReference type for use +// with apply. +type ConfigMapFileReferenceApplyConfiguration struct { + Name *string `json:"name,omitempty"` + Key *string `json:"key,omitempty"` +} + +// ConfigMapFileReferenceApplyConfiguration constructs a declarative configuration of the ConfigMapFileReference type for use with +// apply. +func ConfigMapFileReference() *ConfigMapFileReferenceApplyConfiguration { + return &ConfigMapFileReferenceApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *ConfigMapFileReferenceApplyConfiguration) WithName(value string) *ConfigMapFileReferenceApplyConfiguration { + b.Name = &value + return b +} + +// WithKey sets the Key field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Key field is set to the value of the last call. +func (b *ConfigMapFileReferenceApplyConfiguration) WithKey(value string) *ConfigMapFileReferenceApplyConfiguration { + b.Key = &value + return b +} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/consolecustomization.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/consolecustomization.go index 2868e17d717e..884955628005 100644 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/consolecustomization.go +++ b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/consolecustomization.go @@ -10,6 +10,7 @@ import ( // ConsoleCustomizationApplyConfiguration represents a declarative configuration of the ConsoleCustomization type for use // with apply. type ConsoleCustomizationApplyConfiguration struct { + Logos []LogoApplyConfiguration `json:"logos,omitempty"` Capabilities []CapabilityApplyConfiguration `json:"capabilities,omitempty"` Brand *operatorv1.Brand `json:"brand,omitempty"` DocumentationBaseURL *string `json:"documentationBaseURL,omitempty"` @@ -28,6 +29,19 @@ func ConsoleCustomization() *ConsoleCustomizationApplyConfiguration { return &ConsoleCustomizationApplyConfiguration{} } +// WithLogos adds the given value to the Logos field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Logos field. +func (b *ConsoleCustomizationApplyConfiguration) WithLogos(values ...*LogoApplyConfiguration) *ConsoleCustomizationApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithLogos") + } + b.Logos = append(b.Logos, *values[i]) + } + return b +} + // WithCapabilities adds the given value to the Capabilities field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Capabilities field. diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/filereferencesource.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/filereferencesource.go new file mode 100644 index 000000000000..bd8c6f54c0cb --- /dev/null +++ b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/filereferencesource.go @@ -0,0 +1,36 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + operatorv1 "github.com/openshift/api/operator/v1" +) + +// FileReferenceSourceApplyConfiguration represents a declarative configuration of the FileReferenceSource type for use +// with apply. +type FileReferenceSourceApplyConfiguration struct { + From *operatorv1.SourceType `json:"from,omitempty"` + ConfigMap *ConfigMapFileReferenceApplyConfiguration `json:"configMap,omitempty"` +} + +// FileReferenceSourceApplyConfiguration constructs a declarative configuration of the FileReferenceSource type for use with +// apply. +func FileReferenceSource() *FileReferenceSourceApplyConfiguration { + return &FileReferenceSourceApplyConfiguration{} +} + +// WithFrom sets the From field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the From field is set to the value of the last call. +func (b *FileReferenceSourceApplyConfiguration) WithFrom(value operatorv1.SourceType) *FileReferenceSourceApplyConfiguration { + b.From = &value + return b +} + +// WithConfigMap sets the ConfigMap field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ConfigMap field is set to the value of the last call. +func (b *FileReferenceSourceApplyConfiguration) WithConfigMap(value *ConfigMapFileReferenceApplyConfiguration) *FileReferenceSourceApplyConfiguration { + b.ConfigMap = value + return b +} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/logo.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/logo.go new file mode 100644 index 000000000000..dfa08aaf83bc --- /dev/null +++ b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/logo.go @@ -0,0 +1,41 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + operatorv1 "github.com/openshift/api/operator/v1" +) + +// LogoApplyConfiguration represents a declarative configuration of the Logo type for use +// with apply. +type LogoApplyConfiguration struct { + Type *operatorv1.LogoType `json:"type,omitempty"` + Themes []ThemeApplyConfiguration `json:"themes,omitempty"` +} + +// LogoApplyConfiguration constructs a declarative configuration of the Logo type for use with +// apply. +func Logo() *LogoApplyConfiguration { + return &LogoApplyConfiguration{} +} + +// WithType sets the Type field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Type field is set to the value of the last call. +func (b *LogoApplyConfiguration) WithType(value operatorv1.LogoType) *LogoApplyConfiguration { + b.Type = &value + return b +} + +// WithThemes adds the given value to the Themes field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Themes field. +func (b *LogoApplyConfiguration) WithThemes(values ...*ThemeApplyConfiguration) *LogoApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithThemes") + } + b.Themes = append(b.Themes, *values[i]) + } + return b +} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/theme.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/theme.go new file mode 100644 index 000000000000..11d3223b49db --- /dev/null +++ b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/theme.go @@ -0,0 +1,36 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + operatorv1 "github.com/openshift/api/operator/v1" +) + +// ThemeApplyConfiguration represents a declarative configuration of the Theme type for use +// with apply. +type ThemeApplyConfiguration struct { + Mode *operatorv1.ThemeMode `json:"mode,omitempty"` + Source *FileReferenceSourceApplyConfiguration `json:"source,omitempty"` +} + +// ThemeApplyConfiguration constructs a declarative configuration of the Theme type for use with +// apply. +func Theme() *ThemeApplyConfiguration { + return &ThemeApplyConfiguration{} +} + +// WithMode sets the Mode field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Mode field is set to the value of the last call. +func (b *ThemeApplyConfiguration) WithMode(value operatorv1.ThemeMode) *ThemeApplyConfiguration { + b.Mode = &value + return b +} + +// WithSource sets the Source field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Source field is set to the value of the last call. +func (b *ThemeApplyConfiguration) WithSource(value *FileReferenceSourceApplyConfiguration) *ThemeApplyConfiguration { + b.Source = value + return b +} diff --git a/vendor/modules.txt b/vendor/modules.txt index 90723191f5a4..96be3f18fa71 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -815,7 +815,7 @@ github.com/opencontainers/runtime-spec/specs-go github.com/opencontainers/selinux/go-selinux github.com/opencontainers/selinux/go-selinux/label github.com/opencontainers/selinux/pkg/pwalkdir -# github.com/openshift/api v0.0.0-20250405052455-aa882942241d +# github.com/openshift/api v0.0.0-20250405052455-aa882942241d => github.com/isabella-janssen/openshift-api v0.0.0-20250423163652-3d76f1835b2c ## explicit; go 1.23.0 github.com/openshift/api github.com/openshift/api/annotations @@ -922,7 +922,7 @@ github.com/openshift/build-machinery-go/make/targets/golang github.com/openshift/build-machinery-go/make/targets/openshift github.com/openshift/build-machinery-go/make/targets/openshift/operator github.com/openshift/build-machinery-go/scripts -# github.com/openshift/client-go v0.0.0-20250324153519-f0faeb0f2f2e +# github.com/openshift/client-go v0.0.0-20250324153519-f0faeb0f2f2e => github.com/isabella-janssen/openshift-client-go v0.0.0-20250423165717-b84d4e80502c ## explicit; go 1.23.0 github.com/openshift/client-go/apiserver/applyconfigurations/apiserver/v1 github.com/openshift/client-go/apiserver/applyconfigurations/internal @@ -3903,3 +3903,5 @@ sigs.k8s.io/yaml/goyaml.v3 # k8s.io/sample-cli-plugin => github.com/openshift/kubernetes/staging/src/k8s.io/sample-cli-plugin v0.0.0-20250320083338-1601b9e27d85 # k8s.io/sample-controller => github.com/openshift/kubernetes/staging/src/k8s.io/sample-controller v0.0.0-20250320083338-1601b9e27d85 # github.com/containerd/errdefs => github.com/containerd/errdefs v0.1.0 +# github.com/openshift/api => github.com/isabella-janssen/openshift-api v0.0.0-20250423163652-3d76f1835b2c +# github.com/openshift/client-go => github.com/isabella-janssen/openshift-client-go v0.0.0-20250423165717-b84d4e80502c From 4b82497a81355fcde421029077b65eff521139be Mon Sep 17 00:00:00 2001 From: Isabella Janssen Date: Tue, 22 Apr 2025 13:58:16 -0400 Subject: [PATCH 4/4] update MCN API references from v1alpha1 to v1 --- test/extended/machine_config/helpers.go | 31 +++++++------- .../machine_config/machine_config_node.go | 42 +++++++++---------- test/extended/machine_config/pinnedimages.go | 15 ++++--- 3 files changed, 43 insertions(+), 45 deletions(-) diff --git a/test/extended/machine_config/helpers.go b/test/extended/machine_config/helpers.go index d05a782fc0f2..ca3cdff3b57f 100644 --- a/test/extended/machine_config/helpers.go +++ b/test/extended/machine_config/helpers.go @@ -18,7 +18,6 @@ import ( osconfigv1 "github.com/openshift/api/config/v1" machinev1beta1 "github.com/openshift/api/machine/v1beta1" mcfgv1 "github.com/openshift/api/machineconfiguration/v1" - mcfgv1alpha1 "github.com/openshift/api/machineconfiguration/v1alpha1" opv1 "github.com/openshift/api/operator/v1" machineclient "github.com/openshift/client-go/machine/clientset/versioned" machineconfigclient "github.com/openshift/client-go/machineconfiguration/clientset/versioned" @@ -353,7 +352,7 @@ func ValidateMCNForNodeInPool(oc *exutil.CLI, clientSet *machineconfigclient.Cli // Get node MCN framework.Logf("Getting MCN for node '%v'.", node.Name) - mcn, mcnErr := clientSet.MachineconfigurationV1alpha1().MachineConfigNodes().Get(context.TODO(), node.Name, metav1.GetOptions{}) + mcn, mcnErr := clientSet.MachineconfigurationV1().MachineConfigNodes().Get(context.TODO(), node.Name, metav1.GetOptions{}) if mcnErr != nil { framework.Logf("Could not get MCN for node '%v'.", node.Name) return mcnErr @@ -542,16 +541,16 @@ func WaitForMCPConditionStatus(oc *exutil.CLI, mcpName string, conditionType mcf } // `WaitForMCNConditionStatus` waits up to a specified timeout for the desired MCN condition to match the desired status (ex. wait until "Updated" is "False") -func WaitForMCNConditionStatus(clientSet *machineconfigclient.Clientset, mcnName string, conditionType mcfgv1alpha1.StateProgress, status metav1.ConditionStatus, +func WaitForMCNConditionStatus(clientSet *machineconfigclient.Clientset, mcnName string, conditionType mcfgv1.StateProgress, status metav1.ConditionStatus, timeout time.Duration, interval time.Duration) (bool, error) { conditionMet := false var conditionErr error - var workerNodeMCN *mcfgv1alpha1.MachineConfigNode + var workerNodeMCN *mcfgv1.MachineConfigNode if err := wait.PollUntilContextTimeout(context.TODO(), interval, timeout, true, func(_ context.Context) (bool, error) { framework.Logf("Waiting for MCN '%v' %v condition to be %v.", mcnName, conditionType, status) - workerNodeMCN, conditionErr = clientSet.MachineconfigurationV1alpha1().MachineConfigNodes().Get(context.TODO(), mcnName, metav1.GetOptions{}) + workerNodeMCN, conditionErr = clientSet.MachineconfigurationV1().MachineConfigNodes().Get(context.TODO(), mcnName, metav1.GetOptions{}) // Record if an error occurs when getting the MCN resource if conditionErr != nil { framework.Logf("Error getting MCN for node '%v': %v", mcnName, conditionErr) @@ -577,13 +576,13 @@ func WaitForMCNConditionStatus(clientSet *machineconfigclient.Clientset, mcnName } // `CheckMCNConditionStatus` checks that an MCN condition matches the desired status (ex. confirm "Updated" is "False") -func CheckMCNConditionStatus(mcn *mcfgv1alpha1.MachineConfigNode, conditionType mcfgv1alpha1.StateProgress, status metav1.ConditionStatus) bool { +func CheckMCNConditionStatus(mcn *mcfgv1.MachineConfigNode, conditionType mcfgv1.StateProgress, status metav1.ConditionStatus) bool { conditionStatus := getMCNConditionStatus(mcn, conditionType) return conditionStatus == status } // `getMCNConditionStatus` returns the status of the desired condition type for MCN, or an empty string if the condition does not exist -func getMCNConditionStatus(mcn *mcfgv1alpha1.MachineConfigNode, conditionType mcfgv1alpha1.StateProgress) metav1.ConditionStatus { +func getMCNConditionStatus(mcn *mcfgv1.MachineConfigNode, conditionType mcfgv1.StateProgress) metav1.ConditionStatus { // Loop through conditions and return the status of the desired condition type conditions := mcn.Status.Conditions for _, condition := range conditions { @@ -600,16 +599,16 @@ func getMCNConditionStatus(mcn *mcfgv1alpha1.MachineConfigNode, conditionType mc // 2. All other conditions = False func ConfirmUpdatedMCNStatus(clientSet *machineconfigclient.Clientset, mcnName string) bool { // Get MCN - workerNodeMCN, workerErr := clientSet.MachineconfigurationV1alpha1().MachineConfigNodes().Get(context.TODO(), mcnName, metav1.GetOptions{}) + workerNodeMCN, workerErr := clientSet.MachineconfigurationV1().MachineConfigNodes().Get(context.TODO(), mcnName, metav1.GetOptions{}) o.Expect(workerErr).NotTo(o.HaveOccurred()) // Loop through conditions and return the status of the desired condition type conditions := workerNodeMCN.Status.Conditions for _, condition := range conditions { - if condition.Type == string(mcfgv1alpha1.MachineConfigNodeUpdated) && condition.Status != metav1.ConditionTrue { + if condition.Type == string(mcfgv1.MachineConfigNodeUpdated) && condition.Status != metav1.ConditionTrue { framework.Logf("Node '%s' update is not complete; 'Updated' condition status is '%v'", mcnName, condition.Status) return false - } else if condition.Type != string(mcfgv1alpha1.MachineConfigNodeUpdated) && condition.Status != metav1.ConditionFalse { + } else if condition.Type != string(mcfgv1.MachineConfigNodeUpdated) && condition.Status != metav1.ConditionFalse { framework.Logf("Node '%s' is updated but MCN is invalid; '%v' codition status is '%v'", mcnName, condition.Type, condition.Status) return false } @@ -878,7 +877,7 @@ func WaitForValidMCNProperties(clientSet *machineconfigclient.Clientset, node co framework.Logf("Checking MCN exists and name matches node name '%v'.", node.Name) o.Eventually(func() bool { // Get the desired MCN - newMCN, newMCNErr := clientSet.MachineconfigurationV1alpha1().MachineConfigNodes().Get(context.TODO(), node.Name, metav1.GetOptions{}) + newMCN, newMCNErr := clientSet.MachineconfigurationV1().MachineConfigNodes().Get(context.TODO(), node.Name, metav1.GetOptions{}) if newMCNErr != nil { framework.Logf("Failed getting MCN '%v'.", node.Name) return false @@ -901,7 +900,7 @@ func WaitForValidMCNProperties(clientSet *machineconfigclient.Clientset, node co } o.Eventually(func() bool { // Get the desired MCN - newMCN, newMCNErr := clientSet.MachineconfigurationV1alpha1().MachineConfigNodes().Get(context.TODO(), node.Name, metav1.GetOptions{}) + newMCN, newMCNErr := clientSet.MachineconfigurationV1().MachineConfigNodes().Get(context.TODO(), node.Name, metav1.GetOptions{}) if newMCNErr != nil { framework.Logf("Failed getting MCN '%v'.", node.Name) return false @@ -916,7 +915,7 @@ func WaitForValidMCNProperties(clientSet *machineconfigclient.Clientset, node co framework.Logf("Waiting for node desired config version to match desired config version in MCN '%v' spec.", node.Name) o.Eventually(func() bool { // Get the desired MCN - newMCN, newMCNErr := clientSet.MachineconfigurationV1alpha1().MachineConfigNodes().Get(context.TODO(), node.Name, metav1.GetOptions{}) + newMCN, newMCNErr := clientSet.MachineconfigurationV1().MachineConfigNodes().Get(context.TODO(), node.Name, metav1.GetOptions{}) if newMCNErr != nil { framework.Logf("Failed getting MCN '%v'.", node.Name) return false @@ -931,7 +930,7 @@ func WaitForValidMCNProperties(clientSet *machineconfigclient.Clientset, node co framework.Logf("Waiting for node current config version to match current config version in MCN '%v' status.", node.Name) o.Eventually(func() bool { // Get the desired MCN - newMCN, newMCNErr := clientSet.MachineconfigurationV1alpha1().MachineConfigNodes().Get(context.TODO(), node.Name, metav1.GetOptions{}) + newMCN, newMCNErr := clientSet.MachineconfigurationV1().MachineConfigNodes().Get(context.TODO(), node.Name, metav1.GetOptions{}) if newMCNErr != nil { framework.Logf("Failed getting MCN '%v'.", node.Name) return false @@ -946,7 +945,7 @@ func WaitForValidMCNProperties(clientSet *machineconfigclient.Clientset, node co framework.Logf("Waiting for node desired config version to match desired config version in MCN '%v' status.", node.Name) o.Eventually(func() bool { // Get the desired MCN - newMCN, newMCNErr := clientSet.MachineconfigurationV1alpha1().MachineConfigNodes().Get(context.TODO(), node.Name, metav1.GetOptions{}) + newMCN, newMCNErr := clientSet.MachineconfigurationV1().MachineConfigNodes().Get(context.TODO(), node.Name, metav1.GetOptions{}) if newMCNErr != nil { framework.Logf("Failed getting MCN '%v'.", node.Name) return false @@ -1046,7 +1045,7 @@ func WaitForMCNToBeDeleted(clientSet *machineconfigclient.Clientset, mcnName str framework.Logf("Check if MCN '%v' is deleted.", mcnName) // Check if MCN still exists - _, mcnErr := clientSet.MachineconfigurationV1alpha1().MachineConfigNodes().Get(context.TODO(), mcnName, metav1.GetOptions{}) + _, mcnErr := clientSet.MachineconfigurationV1().MachineConfigNodes().Get(context.TODO(), mcnName, metav1.GetOptions{}) if apierrors.IsNotFound(mcnErr) { framework.Logf("MCN '%v' has been deleted.", mcnName) return true diff --git a/test/extended/machine_config/machine_config_node.go b/test/extended/machine_config/machine_config_node.go index ff0892915276..b060408d2a76 100644 --- a/test/extended/machine_config/machine_config_node.go +++ b/test/extended/machine_config/machine_config_node.go @@ -8,7 +8,7 @@ import ( "path/filepath" "time" - mcfgv1alpha1 "github.com/openshift/api/machineconfiguration/v1alpha1" + mcfgv1 "github.com/openshift/api/machineconfiguration/v1" machineclient "github.com/openshift/client-go/machine/clientset/versioned" machineconfigclient "github.com/openshift/client-go/machineconfiguration/clientset/versioned" exutil "github.com/openshift/origin/test/extended/util" @@ -46,7 +46,7 @@ var _ = g.Describe("[sig-mco][OCPFeatureGate:MachineConfigNodes]", func() { g.BeforeEach(func(ctx context.Context) { //skip these tests on hypershift platforms if ok, _ := exutil.IsHypershift(ctx, oc.AdminConfigClient()); ok { - g.Skip("PinnedImages is not supported on hypershift. Skipping tests.") + g.Skip("MachineConfigNodes is not supported on hypershift. Skipping tests.") } }) @@ -329,17 +329,17 @@ func validateTransitionThroughConditions(clientSet *machineconfigclient.Clientse // "miss" catching the phases. For test stability, if we fail to catch an "Unknown" status, // a warning will be logged instead of erroring out the test. framework.Logf("Waiting for Updated=False") - conditionMet, err := WaitForMCNConditionStatus(clientSet, updatingNodeName, mcfgv1alpha1.MachineConfigNodeUpdated, metav1.ConditionFalse, 1*time.Minute, 1*time.Second) + conditionMet, err := WaitForMCNConditionStatus(clientSet, updatingNodeName, mcfgv1.MachineConfigNodeUpdated, metav1.ConditionFalse, 1*time.Minute, 1*time.Second) o.Expect(err).NotTo(o.HaveOccurred(), fmt.Sprintf("Error occured while waiting for Updated=False: %v", err)) o.Expect(conditionMet).To(o.BeTrue(), "Error, could not detect Updated=False.") framework.Logf("Waiting for UpdatePrepared=True") - conditionMet, err = WaitForMCNConditionStatus(clientSet, updatingNodeName, mcfgv1alpha1.MachineConfigNodeUpdatePrepared, metav1.ConditionTrue, 1*time.Minute, 1*time.Second) + conditionMet, err = WaitForMCNConditionStatus(clientSet, updatingNodeName, mcfgv1.MachineConfigNodeUpdatePrepared, metav1.ConditionTrue, 1*time.Minute, 1*time.Second) o.Expect(err).NotTo(o.HaveOccurred(), fmt.Sprintf("Error occured while waiting for UpdatePrepared=True: %v", err)) o.Expect(conditionMet).To(o.BeTrue(), "Error, could not detect UpdatePrepared=True.") framework.Logf("Waiting for UpdateExecuted=Unknown") - conditionMet, err = WaitForMCNConditionStatus(clientSet, updatingNodeName, mcfgv1alpha1.MachineConfigNodeUpdateExecuted, metav1.ConditionUnknown, 30*time.Second, 1*time.Second) + conditionMet, err = WaitForMCNConditionStatus(clientSet, updatingNodeName, mcfgv1.MachineConfigNodeUpdateExecuted, metav1.ConditionUnknown, 30*time.Second, 1*time.Second) o.Expect(err).NotTo(o.HaveOccurred(), fmt.Sprintf("Error occured while waiting for UpdateExecuted=Unknown: %v", err)) if !conditionMet { framework.Logf("Warning, could not detect UpdateExecuted=Unknown.") @@ -348,76 +348,76 @@ func validateTransitionThroughConditions(clientSet *machineconfigclient.Clientse // On standard, non-rebootless, update, check that node transitions through "Cordoned" and "Drained" phases if !isRebootless { framework.Logf("Waiting for Cordoned=True") - conditionMet, err = WaitForMCNConditionStatus(clientSet, updatingNodeName, mcfgv1alpha1.MachineConfigNodeUpdateCordoned, metav1.ConditionTrue, 30*time.Second, 1*time.Second) + conditionMet, err = WaitForMCNConditionStatus(clientSet, updatingNodeName, mcfgv1.MachineConfigNodeUpdateCordoned, metav1.ConditionTrue, 30*time.Second, 1*time.Second) o.Expect(err).NotTo(o.HaveOccurred(), fmt.Sprintf("Error occured while waiting for Cordoned=True: %v", err)) o.Expect(conditionMet).To(o.BeTrue(), "Error, could not detect Cordoned=True.") framework.Logf("Waiting for Drained=Unknown") - conditionMet, err = WaitForMCNConditionStatus(clientSet, updatingNodeName, mcfgv1alpha1.MachineConfigNodeUpdateDrained, metav1.ConditionUnknown, 15*time.Second, 1*time.Second) + conditionMet, err = WaitForMCNConditionStatus(clientSet, updatingNodeName, mcfgv1.MachineConfigNodeUpdateDrained, metav1.ConditionUnknown, 15*time.Second, 1*time.Second) o.Expect(err).NotTo(o.HaveOccurred(), fmt.Sprintf("Error occured while waiting for Drained=Unknown: %v", err)) if !conditionMet { framework.Logf("Warning, could not detect Drained=Unknown.") } framework.Logf("Waiting for Drained=True") - conditionMet, err = WaitForMCNConditionStatus(clientSet, updatingNodeName, mcfgv1alpha1.MachineConfigNodeUpdateDrained, metav1.ConditionTrue, 4*time.Minute, 1*time.Second) + conditionMet, err = WaitForMCNConditionStatus(clientSet, updatingNodeName, mcfgv1.MachineConfigNodeUpdateDrained, metav1.ConditionTrue, 4*time.Minute, 1*time.Second) o.Expect(err).NotTo(o.HaveOccurred(), fmt.Sprintf("Error occured while waiting for Drained=True: %v", err)) o.Expect(conditionMet).To(o.BeTrue(), "Error, could not detect Drained=True.") } framework.Logf("Waiting for AppliedFilesAndOS=Unknown") - conditionMet, err = WaitForMCNConditionStatus(clientSet, updatingNodeName, mcfgv1alpha1.MachineConfigNodeUpdateFilesAndOS, metav1.ConditionUnknown, 30*time.Second, 1*time.Second) + conditionMet, err = WaitForMCNConditionStatus(clientSet, updatingNodeName, mcfgv1.MachineConfigNodeUpdateFilesAndOS, metav1.ConditionUnknown, 30*time.Second, 1*time.Second) o.Expect(err).NotTo(o.HaveOccurred(), fmt.Sprintf("Error occured while waiting for AppliedFilesAndOS=Unknown: %v", err)) if !conditionMet { framework.Logf("Warning, could not detect AppliedFilesAndOS=Unknown.") } framework.Logf("Waiting for AppliedFilesAndOS=True") - conditionMet, err = WaitForMCNConditionStatus(clientSet, updatingNodeName, mcfgv1alpha1.MachineConfigNodeUpdateFilesAndOS, metav1.ConditionTrue, 3*time.Minute, 1*time.Second) + conditionMet, err = WaitForMCNConditionStatus(clientSet, updatingNodeName, mcfgv1.MachineConfigNodeUpdateFilesAndOS, metav1.ConditionTrue, 3*time.Minute, 1*time.Second) o.Expect(err).NotTo(o.HaveOccurred(), fmt.Sprintf("Error occured while waiting for AppliedFilesAndOS=True: %v", err)) o.Expect(conditionMet).To(o.BeTrue(), "Error, could not detect AppliedFilesAndOS=True.") framework.Logf("Waiting for UpdateExecuted=True") - conditionMet, err = WaitForMCNConditionStatus(clientSet, updatingNodeName, mcfgv1alpha1.MachineConfigNodeUpdateExecuted, metav1.ConditionTrue, 20*time.Second, 1*time.Second) + conditionMet, err = WaitForMCNConditionStatus(clientSet, updatingNodeName, mcfgv1.MachineConfigNodeUpdateExecuted, metav1.ConditionTrue, 20*time.Second, 1*time.Second) o.Expect(err).NotTo(o.HaveOccurred(), fmt.Sprintf("Error occured while waiting for UpdateExecuted=True: %v", err)) o.Expect(conditionMet).To(o.BeTrue(), "Error, could not detect UpdateExecuted=True.") // On rebootless update, check that node transitions through "UpdatePostActionComplete" phase if isRebootless { framework.Logf("Waiting for UpdatePostActionComplete=True") - conditionMet, err = WaitForMCNConditionStatus(clientSet, updatingNodeName, mcfgv1alpha1.MachineConfigNodeUpdatePostActionComplete, metav1.ConditionTrue, 1*time.Minute, 1*time.Second) + conditionMet, err = WaitForMCNConditionStatus(clientSet, updatingNodeName, mcfgv1.MachineConfigNodeUpdatePostActionComplete, metav1.ConditionTrue, 1*time.Minute, 1*time.Second) o.Expect(err).NotTo(o.HaveOccurred(), fmt.Sprintf("Error occured while waiting for UpdatePostActionComplete=True: %v", err)) o.Expect(conditionMet).To(o.BeTrue(), "Error, could not detect UpdatePostActionComplete=True.") } else { // On standard, non-rebootless, update, check that node transitions through "RebootedNode" phase framework.Logf("Waiting for RebootedNode=Unknown") - conditionMet, err = WaitForMCNConditionStatus(clientSet, updatingNodeName, mcfgv1alpha1.MachineConfigNodeUpdateRebooted, metav1.ConditionUnknown, 15*time.Second, 1*time.Second) + conditionMet, err = WaitForMCNConditionStatus(clientSet, updatingNodeName, mcfgv1.MachineConfigNodeUpdateRebooted, metav1.ConditionUnknown, 15*time.Second, 1*time.Second) o.Expect(err).NotTo(o.HaveOccurred(), fmt.Sprintf("Error occured while waiting for RebootedNode=Unknown: %v", err)) if !conditionMet { framework.Logf("Warning, could not detect RebootedNode=Unknown.") } framework.Logf("Waiting for RebootedNode=True") - conditionMet, err = WaitForMCNConditionStatus(clientSet, updatingNodeName, mcfgv1alpha1.MachineConfigNodeUpdateRebooted, metav1.ConditionTrue, 6*time.Minute, 1*time.Second) + conditionMet, err = WaitForMCNConditionStatus(clientSet, updatingNodeName, mcfgv1.MachineConfigNodeUpdateRebooted, metav1.ConditionTrue, 6*time.Minute, 1*time.Second) o.Expect(err).NotTo(o.HaveOccurred(), fmt.Sprintf("Error occured while waiting for RebootedNode=True: %v", err)) o.Expect(conditionMet).To(o.BeTrue(), "Error, could not detect RebootedNode=True.") } framework.Logf("Waiting for Resumed=True") - conditionMet, err = WaitForMCNConditionStatus(clientSet, updatingNodeName, mcfgv1alpha1.MachineConfigNodeResumed, metav1.ConditionTrue, 15*time.Second, 1*time.Second) + conditionMet, err = WaitForMCNConditionStatus(clientSet, updatingNodeName, mcfgv1.MachineConfigNodeResumed, metav1.ConditionTrue, 15*time.Second, 1*time.Second) o.Expect(err).NotTo(o.HaveOccurred(), fmt.Sprintf("Error occured while waiting for Resumed=True: %v", err)) o.Expect(conditionMet).To(o.BeTrue(), "Error, could not detect Resumed=True.") framework.Logf("Waiting for UpdateComplete=True") - conditionMet, err = WaitForMCNConditionStatus(clientSet, updatingNodeName, mcfgv1alpha1.MachineConfigNodeUpdateComplete, metav1.ConditionTrue, 10*time.Second, 1*time.Second) + conditionMet, err = WaitForMCNConditionStatus(clientSet, updatingNodeName, mcfgv1.MachineConfigNodeUpdateComplete, metav1.ConditionTrue, 10*time.Second, 1*time.Second) o.Expect(err).NotTo(o.HaveOccurred(), fmt.Sprintf("Error occured while waiting for UpdateComplete=True: %v", err)) o.Expect(conditionMet).To(o.BeTrue(), "Error, could not detect UpdateComplete=True.") framework.Logf("Waiting for Uncordoned=True") - conditionMet, err = WaitForMCNConditionStatus(clientSet, updatingNodeName, mcfgv1alpha1.MachineConfigNodeUpdateUncordoned, metav1.ConditionTrue, 10*time.Second, 1*time.Second) + conditionMet, err = WaitForMCNConditionStatus(clientSet, updatingNodeName, mcfgv1.MachineConfigNodeUpdateUncordoned, metav1.ConditionTrue, 10*time.Second, 1*time.Second) o.Expect(err).NotTo(o.HaveOccurred(), fmt.Sprintf("Error occured while waiting for UpdateComplete=True: %v", err)) o.Expect(conditionMet).To(o.BeTrue(), "Error, could not detect UpdateComplete=True.") framework.Logf("Waiting for Updated=True") - conditionMet, err = WaitForMCNConditionStatus(clientSet, updatingNodeName, mcfgv1alpha1.MachineConfigNodeUpdated, metav1.ConditionTrue, 1*time.Minute, 1*time.Second) + conditionMet, err = WaitForMCNConditionStatus(clientSet, updatingNodeName, mcfgv1.MachineConfigNodeUpdated, metav1.ConditionTrue, 1*time.Minute, 1*time.Second) o.Expect(err).NotTo(o.HaveOccurred(), fmt.Sprintf("Error occured while waiting for Updated=True: %v", err)) o.Expect(conditionMet).To(o.BeTrue(), "Error, could not detect Updated=True.") } @@ -463,11 +463,11 @@ func ValidateMCNConditionOnNodeDegrade(oc *exutil.CLI, fixture string, isSno boo o.Expect(degradedNodeErr).NotTo(o.HaveOccurred(), "Could not get degraded node.") // Validate MCN of degraded node - degradedNodeMCN, degradedErr := clientSet.MachineconfigurationV1alpha1().MachineConfigNodes().Get(context.TODO(), degradedNode.Name, metav1.GetOptions{}) + degradedNodeMCN, degradedErr := clientSet.MachineconfigurationV1().MachineConfigNodes().Get(context.TODO(), degradedNode.Name, metav1.GetOptions{}) o.Expect(degradedErr).NotTo(o.HaveOccurred(), fmt.Sprintf("Error getting MCN of degraded node '%v'.", degradedNode.Name)) framework.Logf("Validating that `AppliedFilesAndOS` and `UpdateExecuted` conditions in '%v' MCN have a status of 'Unknown'.", degradedNodeMCN.Name) - o.Expect(CheckMCNConditionStatus(degradedNodeMCN, mcfgv1alpha1.MachineConfigNodeUpdateFilesAndOS, metav1.ConditionUnknown)).Should(o.BeTrue(), "Condition 'AppliedFilesAndOS' does not have the expected status of 'Unknown'.") - o.Expect(CheckMCNConditionStatus(degradedNodeMCN, mcfgv1alpha1.MachineConfigNodeUpdateExecuted, metav1.ConditionUnknown)).Should(o.BeTrue(), "Condition 'UpdateExecuted' does not have the expected status of 'Unknown'.") + o.Expect(CheckMCNConditionStatus(degradedNodeMCN, mcfgv1.MachineConfigNodeUpdateFilesAndOS, metav1.ConditionUnknown)).Should(o.BeTrue(), "Condition 'AppliedFilesAndOS' does not have the expected status of 'Unknown'.") + o.Expect(CheckMCNConditionStatus(degradedNodeMCN, mcfgv1.MachineConfigNodeUpdateExecuted, metav1.ConditionUnknown)).Should(o.BeTrue(), "Condition 'UpdateExecuted' does not have the expected status of 'Unknown'.") } // `ValidateMCNProperties` checks that MCNs with correct properties are created on node creation diff --git a/test/extended/machine_config/pinnedimages.go b/test/extended/machine_config/pinnedimages.go index 3871f5754fdd..f56fb5a9f9dd 100644 --- a/test/extended/machine_config/pinnedimages.go +++ b/test/extended/machine_config/pinnedimages.go @@ -12,7 +12,6 @@ import ( o "github.com/onsi/gomega" mcfgv1 "github.com/openshift/api/machineconfiguration/v1" - mcfgv1alpha1 "github.com/openshift/api/machineconfiguration/v1alpha1" mcClient "github.com/openshift/client-go/machineconfiguration/clientset/versioned" exutil "github.com/openshift/origin/test/extended/util" corev1 "k8s.io/api/core/v1" @@ -49,7 +48,7 @@ var _ = g.Describe("[sig-mco][OCPFeatureGate:PinnedImages][OCPFeatureGate:Machin g.BeforeEach(func(ctx context.Context) { //skip these tests on hypershift platforms if ok, _ := exutil.IsHypershift(ctx, oc.AdminConfigClient()); ok { - g.Skip("MachineConfigNodes is not supported on hypershift. Skipping tests.") + g.Skip("PinnedImages is not supported on hypershift. Skipping tests.") } }) @@ -197,14 +196,14 @@ func SimplePISTest(oc *exutil.CLI, kubeClient *kubernetes.Clientset, fixture str o.Expect(err).NotTo(o.HaveOccurred(), "Checking status of PIS") } -func detectXCondition(oc *exutil.CLI, node corev1.Node, mcn *mcfgv1alpha1.MachineConfigNode, appliedPIS *mcfgv1.PinnedImageSet, detectingSuccess bool) (bool, bool, error) { +func detectXCondition(oc *exutil.CLI, node corev1.Node, mcn *mcfgv1.MachineConfigNode, appliedPIS *mcfgv1.PinnedImageSet, detectingSuccess bool) (bool, bool, error) { if detectingSuccess { for _, cond := range mcn.Status.Conditions { - if mcfgv1alpha1.StateProgress(cond.Type) == mcfgv1alpha1.MachineConfigNodePinnedImageSetsDegraded && cond.Status == "True" { + if mcfgv1.StateProgress(cond.Type) == mcfgv1.MachineConfigNodePinnedImageSetsDegraded && cond.Status == "True" { return false, true, fmt.Errorf("PIS degraded for MCN %s with reason: %s and message: %s", mcn.Name, cond.Reason, cond.Message) } - if mcfgv1alpha1.StateProgress(cond.Type) == mcfgv1alpha1.MachineConfigNodePinnedImageSetsProgressing && cond.Status == "True" { + if mcfgv1.StateProgress(cond.Type) == mcfgv1.MachineConfigNodePinnedImageSetsProgressing && cond.Status == "True" { return false, false, nil } } @@ -220,10 +219,10 @@ func detectXCondition(oc *exutil.CLI, node corev1.Node, mcn *mcfgv1alpha1.Machin return true, false, nil } else { for _, cond := range mcn.Status.Conditions { - if mcfgv1alpha1.StateProgress(cond.Type) == mcfgv1alpha1.MachineConfigNodePinnedImageSetsDegraded && cond.Status == "True" { + if mcfgv1.StateProgress(cond.Type) == mcfgv1.MachineConfigNodePinnedImageSetsDegraded && cond.Status == "True" { continue } - if mcfgv1alpha1.StateProgress(cond.Type) == mcfgv1alpha1.MachineConfigNodePinnedImageSetsProgressing && cond.Status == "True" { + if mcfgv1.StateProgress(cond.Type) == mcfgv1.MachineConfigNodePinnedImageSetsProgressing && cond.Status == "True" { return false, false, nil } } @@ -251,7 +250,7 @@ func waitForPISStatusX(ctx context.Context, oc *exutil.CLI, kubeClient *kubernet doneNodes := 0 for _, node := range nodes.Items { - mcn, err := clientSet.MachineconfigurationV1alpha1().MachineConfigNodes().Get(ctx, node.Name, metav1.GetOptions{}) + mcn, err := clientSet.MachineconfigurationV1().MachineConfigNodes().Get(ctx, node.Name, metav1.GetOptions{}) if err != nil { return false, fmt.Errorf("failed to get mcn: %w", err) }