diff --git a/machineconfiguration/v1alpha1/tests/machineconfignodes.machineconfiguration.openshift.io/MachineConfigNodes.yaml b/machineconfiguration/v1alpha1/tests/machineconfignodes.machineconfiguration.openshift.io/MachineConfigNodes.yaml index 8d678da717b..bae73d1b259 100644 --- a/machineconfiguration/v1alpha1/tests/machineconfignodes.machineconfiguration.openshift.io/MachineConfigNodes.yaml +++ b/machineconfiguration/v1alpha1/tests/machineconfignodes.machineconfiguration.openshift.io/MachineConfigNodes.yaml @@ -156,7 +156,7 @@ tests: currentGeneration: 2 desiredGeneration: 1 expectedStatusError: "Invalid value: \"object\": desired generation must be greater than or equal to the current generation" - - name: PinnedImageSet desired generation must be greater than last failed generation + - name: PinnedImageSet desired generation must be greater than or equal to the last failed generation initial: | apiVersion: machineconfiguration.openshift.io/v1alpha1 kind: MachineConfigNode @@ -179,7 +179,6 @@ tests: - name: test-pinned-image-set currentGeneration: 2 desiredGeneration: 2 - lastFailedGeneration: 1 updated: | apiVersion: machineconfiguration.openshift.io/v1alpha1 kind: MachineConfigNode @@ -203,8 +202,8 @@ tests: currentGeneration: 3 desiredGeneration: 3 lastFailedGeneration: 4 - expectedStatusError: "Invalid value: \"object\": desired generation must be greater than last failed generation" - - name: PinnedImageSet desired generation must be set if last failed generation is set + expectedStatusError: "Invalid value: \"object\": desired generation must be greater than or equal to the last failed generation" + - name: PinnedImageSet last failed generation error must be defined on image pull and pin failure initial: | apiVersion: machineconfiguration.openshift.io/v1alpha1 kind: MachineConfigNode @@ -225,6 +224,8 @@ tests: desired: rendered-worker-abc pinnedImageSets: - name: test-pinned-image-set + currentGeneration: 2 + desiredGeneration: 2 updated: | apiVersion: machineconfiguration.openshift.io/v1alpha1 kind: MachineConfigNode @@ -245,5 +246,7 @@ tests: desired: rendered-worker-abc pinnedImageSets: - name: test-pinned-image-set - lastFailedGeneration: 2 - expectedStatusError: "Invalid value: \"object\": desired generation must be defined if last failed generation is defined" \ No newline at end of file + currentGeneration: 2 + desiredGeneration: 3 + lastFailedGeneration: 3 + expectedStatusError: "Invalid value: \"object\": last failed generation error must be defined on image pull and pin failure" diff --git a/machineconfiguration/v1alpha1/types_machineconfignode.go b/machineconfiguration/v1alpha1/types_machineconfignode.go index 965549d4e3b..cfda07fd01b 100644 --- a/machineconfiguration/v1alpha1/types_machineconfignode.go +++ b/machineconfiguration/v1alpha1/types_machineconfignode.go @@ -10,7 +10,7 @@ import ( // +kubebuilder:object:root=true // +kubebuilder:resource:path=machineconfignodes,scope=Cluster // +kubebuilder:subresource:status -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/1596 +// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/2201 // +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 @@ -22,12 +22,10 @@ import ( // +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="UpdateCompatible",type="string",JSONPath=.status.conditions[?(@.type=="UpdateCompatible")].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="ReloadedCRIO",type="string",JSONPath=.status.conditions[?(@.type=="ReloadedCRIO")].status,priority=1 // +kubebuilder:printcolumn:name="UncordonedNode",type="string",JSONPath=.status.conditions[?(@.type=="Uncordoned")].status,priority=1 // +kubebuilder:metadata:labels=openshift.io/operator-managed= @@ -36,7 +34,10 @@ import ( // +openshift:compatibility-gen:level=4 // +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"` + 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. @@ -56,20 +57,27 @@ type MachineConfigNode struct { // +openshift:compatibility-gen:level=4 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 object name. - // Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) - // It may consist of only alphanumeric characters, hyphens (-) and periods (.) - // and must be at most 253 characters in length. + // 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:Pattern=`^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$` + // +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"` } @@ -86,12 +94,12 @@ type MachineConfigNodeSpec struct { 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. This gets set before the machine config operator validates + // 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"` - // pinnedImageSets holds the desired pinned image sets that this node should pin and pull. + // pinnedImageSets is a user defined value that holds the names of the desired image sets that the node should pull and pin. // +listType=map // +listMapKey=name // +kubebuilder:validation:MaxItems=100 @@ -104,21 +112,19 @@ type MachineConfigNodeStatus struct { // conditions represent the observations of a machine config node's current state. // +listType=map // +listMapKey=type + // +kubebuilder:validation:MaxItems=20 // +optional Conditions []metav1.Condition `json:"conditions,omitempty"` - // observedGeneration represents the generation observed by the controller. + // 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. - // +required + // +kubebuilder:validation:XValidation:rule="self >= oldSelf", message="observedGeneration must not decrease" + // +kubebuilder:validation:Minimum=0 + // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` - // configVersion describes the current and desired machine config for this node. - // The current version represents the current machine config for the node and is updated after a successful update. - // The desired version represents the machine config the node will attempt to update to. - // This desired machine config has been compared to the current machine config and has been validated by the machine config operator as one that is valid and that exists. + // configVersion describes the current and desired machine config version for this node. // +required ConfigVersion MachineConfigNodeStatusMachineConfigVersion `json:"configVersion"` // pinnedImageSets describes the current and desired pinned image sets for this node. - // The current version is the generation of the pinned image set that has most recently been successfully pulled and pinned on this node. - // The desired version is the generation of the pinned image set that is targeted to be pulled and pinned on this node. // +listType=map // +listMapKey=name // +kubebuilder:validation:MaxItems=100 @@ -126,95 +132,108 @@ type MachineConfigNodeStatus struct { 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 last failed generation" -// +kubebuilder:validation:XValidation:rule="has(self.lastFailedGeneration) ? has(self.desiredGeneration): true",message="desired generation must be defined if last failed generation is defined" +// +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 hostname (https://tools.ietf.org/html/rfc1123) - // It may consist of only alphanumeric characters, hyphens (-) and periods (.) - // and must be at most 253 characters in length. + // 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:Pattern=`^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$` + // +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=0 // +optional CurrentGeneration int32 `json:"currentGeneration,omitempty"` - // desiredGeneration version is the generation of the pinned image set that is targeted to be pulled and pinned on this node. + // 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=0 // +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=0 // +optional LastFailedGeneration int32 `json:"lastFailedGeneration,omitempty"` - // lastFailedGenerationErrors is a list of errors why the lastFailed generation failed to be pulled and pinned. - // +kubebuilder:validation:MaxItems=10 + // 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 - LastFailedGenerationErrors []string `json:"lastFailedGenerationErrors,omitempty"` + LastFailedGenerationError string `json:"lastFailedGenerationError,omitempty"` + // Previously, failures associated with pinning and pulling images where shared in a list of strings under `LastFailedGenerationErrors`. + // This field is being removed and a `LastFailedGenerationError` field of type string is being added in its place as this field will + // contain a single error and there is no need for a list anymore. + // Tombstone: legacy field no longer needed + // LastFailedGenerationErrors []string `json:"lastFailedGenerationErrors,omitempty"` } // MachineConfigNodeStatusMachineConfigVersion holds the current and desired config versions as last updated in the MCN status. -// When the current and desired versions are not matched, the machine config pool is processing an upgrade and the machine config node will +// 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 not 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. +// 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 hostname (https://tools.ietf.org/html/rfc1123) - // It may consist of only alphanumeric characters, hyphens (-) and periods (.) - // and must be at most 253 characters in length. - // +kubebuilder:validation:MaxLength=253 - // +kubebuilder:validation:Pattern=`^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$` + // 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 hostname (https://tools.ietf.org/html/rfc1123) - // It may consist of only alphanumeric characters, hyphens (-) and periods (.) - // and must be at most 253 characters in length. - // +kubebuilder:validation:MaxLength=253 - // +kubebuilder:validation:Pattern=`^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$` + // 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 +// 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 hostname (https://tools.ietf.org/html/rfc1123) - // It may consist of only alphanumeric characters, hyphens (-) and periods (.) - // and must be at most 253 characters in length. - // +kubebuilder:validation:MaxLength=253 - // +kubebuilder:validation:Pattern=`^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$` + // 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"` } +// MachineConfigNodeSpecPinnedImageSet holds information on the desired pinned image sets that the current observed machine config node +// should pin and pull. type MachineConfigNodeSpecPinnedImageSet struct { // name is the name of the pinned image set. - // Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) - // It may consist of only alphanumeric characters, hyphens (-) and periods (.) - // and must be at most 253 characters in length. + // 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:Pattern=`^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$` + // +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"` } // StateProgress is each possible state for each possible MachineConfigNodeType -// UpgradeProgression Kind will only use the "MachinConfigPoolUpdate..." types for example // Please note: These conditions are subject to change. Both additions and deletions may be made. +// +enum type StateProgress string const ( @@ -224,26 +243,24 @@ const ( 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 describes a machine that has completed the core parts of an upgrade MachineConfigNodeUpdateComplete StateProgress = "UpdateComplete" - // MachineConfigNodeUpdated describes a machine that has a matching desired and current config after executing an update + // 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" - // MachineConfigNodeUpdateCompatible the part of the preparing phase where the mco decides whether it can update - MachineConfigNodeUpdateCompatible StateProgress = "UpdateCompatible" - // MachineConfigNodeUpdateDrained describes the part of the inprogress phase where the node drains + // MachineConfigNodeUpdateDrained describes the part of the in progress phase where the node drains MachineConfigNodeUpdateDrained StateProgress = "Drained" - // MachineConfigNodeUpdateFilesAndOS describes the part of the inprogress phase where the nodes file and OS config change + // 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 completing phase where the node cordons + // 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" - // MachineConfigNodeUpdateReloaded describes the part of the post action phase where the node reloads its CRIO service - MachineConfigNodeUpdateReloaded StateProgress = "ReloadedCRIO" + // 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 diff --git a/machineconfiguration/v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-CustomNoUpgrade.crd.yaml b/machineconfiguration/v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-CustomNoUpgrade.crd.yaml index b5f36f5205f..da38b62b519 100644 --- a/machineconfiguration/v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-CustomNoUpgrade.crd.yaml +++ b/machineconfiguration/v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-CustomNoUpgrade.crd.yaml @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - api-approved.openshift.io: https://github.com/openshift/api/pull/1596 + api-approved.openshift.io: https://github.com/openshift/api/pull/2201 api.openshift.io/merged-by-featuregates: "true" include.release.openshift.io/ibm-cloud-managed: "true" include.release.openshift.io/self-managed-high-availability: "true" @@ -52,10 +52,6 @@ spec: name: Resumed priority: 1 type: string - - jsonPath: .status.conditions[?(@.type=="UpdateCompatible")].status - name: UpdateCompatible - priority: 1 - type: string - jsonPath: .status.conditions[?(@.type=="AppliedFilesAndOS")].status name: UpdatedFilesAndOS priority: 1 @@ -72,10 +68,6 @@ spec: name: RebootedNode priority: 1 type: string - - jsonPath: .status.conditions[?(@.type=="ReloadedCRIO")].status - name: ReloadedCRIO - priority: 1 - type: string - jsonPath: .status.conditions[?(@.type=="Uncordoned")].status name: UncordonedNode priority: 1 @@ -110,7 +102,7 @@ spec: configVersion: description: |- 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. This gets set before the machine config operator validates + 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. properties: desired: @@ -119,12 +111,16 @@ spec: 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 hostname (https://tools.ietf.org/html/rfc1123) - It may consist of only alphanumeric characters, hyphens (-) and periods (.) - and must be at most 253 characters in length. + 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. maxLength: 253 - pattern: ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$ type: string + x-kubernetes-validations: + - message: a lowercase RFC 1123 subdomain must consist of lower + case alphanumeric characters, '-' or '.', and must start and + end with an alphanumeric character. + rule: '!format.dns1123Subdomain().validate(self).hasValue()' required: - desired type: object @@ -134,30 +130,42 @@ spec: properties: name: description: |- - name is the object name. - Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) - It may consist of only alphanumeric characters, hyphens (-) and periods (.) - and must be at most 253 characters in length. + 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. maxLength: 253 - pattern: ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$ type: string + x-kubernetes-validations: + - message: a lowercase RFC 1123 subdomain must consist of lower + case alphanumeric characters, '-' or '.', and must start and + end with an alphanumeric character. + rule: '!format.dns1123Subdomain().validate(self).hasValue()' required: - name type: object pinnedImageSets: - description: pinnedImageSets holds the desired pinned image sets that - this node should pin and pull. + description: pinnedImageSets is a user defined value that holds the + names of the desired image sets that the node should pull and pin. items: + description: |- + MachineConfigNodeSpecPinnedImageSet holds information on the desired pinned image sets that the current observed machine config node + should pin and pull. properties: name: description: |- name is the name of the pinned image set. - Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) - It may consist of only alphanumeric characters, hyphens (-) and periods (.) - and must be at most 253 characters in length. + 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. maxLength: 253 - pattern: ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$ type: string + x-kubernetes-validations: + - message: a lowercase RFC 1123 subdomain must consist of lower + case alphanumeric characters, '-' or '.', and must start + and end with an alphanumeric character. + rule: '!format.dns1123Subdomain().validate(self).hasValue()' required: - name type: object @@ -173,13 +181,18 @@ spec: properties: name: description: |- - name is the object name. - Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) - It may consist of only alphanumeric characters, hyphens (-) and periods (.) - and must be at most 253 characters in length. + 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. maxLength: 253 - pattern: ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$ type: string + x-kubernetes-validations: + - message: a lowercase RFC 1123 subdomain must consist of lower + case alphanumeric characters, '-' or '.', and must start and + end with an alphanumeric character. + rule: '!format.dns1123Subdomain().validate(self).hasValue()' required: - name type: object @@ -249,68 +262,86 @@ spec: - status - type type: object + maxItems: 20 type: array x-kubernetes-list-map-keys: - type x-kubernetes-list-type: map configVersion: - description: |- - configVersion describes the current and desired machine config for this node. - The current version represents the current machine config for the node and is updated after a successful update. - The desired version represents the machine config the node will attempt to update to. - This desired machine config has been compared to the current machine config and has been validated by the machine config operator as one that is valid and that exists. + description: configVersion describes the current and desired machine + config version for this node. properties: current: description: |- 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 hostname (https://tools.ietf.org/html/rfc1123) - It may consist of only alphanumeric characters, hyphens (-) and periods (.) - and must be at most 253 characters in length. + 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. maxLength: 253 - pattern: ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$ type: string + x-kubernetes-validations: + - message: a lowercase RFC 1123 subdomain must consist of lower + case alphanumeric characters, '-' or '.', and must start and + end with an alphanumeric character. + rule: '!format.dns1123Subdomain().validate(self).hasValue()' desired: description: |- 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 hostname (https://tools.ietf.org/html/rfc1123) - It may consist of only alphanumeric characters, hyphens (-) and periods (.) - and must be at most 253 characters in length. + 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. maxLength: 253 - pattern: ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$ type: string + x-kubernetes-validations: + - message: a lowercase RFC 1123 subdomain must consist of lower + case alphanumeric characters, '-' or '.', and must start and + end with an alphanumeric character. + rule: '!format.dns1123Subdomain().validate(self).hasValue()' required: - desired type: object observedGeneration: description: |- - observedGeneration represents the generation observed by the controller. + 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. format: int64 + minimum: 0 type: integer + x-kubernetes-validations: + - message: observedGeneration must not decrease + rule: self >= oldSelf pinnedImageSets: - description: |- - pinnedImageSets describes the current and desired pinned image sets for this node. - The current version is the generation of the pinned image set that has most recently been successfully pulled and pinned on this node. - The desired version is the generation of the pinned image set that is targeted to be pulled and pinned on this node. + description: pinnedImageSets describes the current and desired pinned + image sets for this node. items: + description: MachineConfigNodeStatusPinnedImageSet holds information + about the current, desired, and failed pinned image sets for the + observed machine config node. properties: currentGeneration: description: currentGeneration is the generation of the pinned image set that has most recently been successfully pulled and pinned on this node. format: int32 + minimum: 0 type: integer + x-kubernetes-validations: + - message: currentGeneration must not decrease + rule: self >= oldSelf desiredGeneration: - description: desiredGeneration version is the generation of - the pinned image set that is targeted to be pulled and pinned - on this node. + description: desiredGeneration is the generation of the pinned + image set that is targeted to be pulled and pinned on this + node. format: int32 minimum: 0 type: integer + x-kubernetes-validations: + - message: desiredGeneration must not decrease + rule: self >= oldSelf lastFailedGeneration: description: lastFailedGeneration is the generation of the most recent pinned image set that failed to be pulled and pinned @@ -318,22 +349,28 @@ spec: format: int32 minimum: 0 type: integer - lastFailedGenerationErrors: - description: lastFailedGenerationErrors is a list of errors - why the lastFailed generation failed to be pulled and pinned. - items: - type: string - maxItems: 10 - type: array + x-kubernetes-validations: + - message: lastFailedGeneration must not decrease + rule: self >= oldSelf + lastFailedGenerationError: + description: |- + 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. + maxLength: 32768 + type: string name: description: |- name is the name of the pinned image set. - Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) - It may consist of only alphanumeric characters, hyphens (-) and periods (.) - and must be at most 253 characters in length. + 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. maxLength: 253 - pattern: ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$ type: string + x-kubernetes-validations: + - message: a lowercase RFC 1123 subdomain must consist of lower + case alphanumeric characters, '-' or '.', and must start + and end with an alphanumeric character. + rule: '!format.dns1123Subdomain().validate(self).hasValue()' required: - name type: object @@ -342,13 +379,14 @@ spec: current generation rule: 'has(self.desiredGeneration) && has(self.currentGeneration) ? self.desiredGeneration >= self.currentGeneration : true' - - message: desired generation must be greater than last failed generation + - message: desired generation must be greater than or equal to the + last failed generation rule: 'has(self.lastFailedGeneration) && has(self.desiredGeneration) ? self.desiredGeneration >= self.lastFailedGeneration : true' - - message: desired generation must be defined if last failed generation - is defined - rule: 'has(self.lastFailedGeneration) ? has(self.desiredGeneration): - true' + - message: last failed generation error must be defined on image + pull and pin failure + rule: 'has(self.lastFailedGeneration) ? has(self.lastFailedGenerationError) + : true' maxItems: 100 type: array x-kubernetes-list-map-keys: @@ -356,7 +394,6 @@ spec: x-kubernetes-list-type: map required: - configVersion - - observedGeneration type: object required: - spec diff --git a/machineconfiguration/v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-DevPreviewNoUpgrade.crd.yaml b/machineconfiguration/v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-DevPreviewNoUpgrade.crd.yaml index daddf9c98b7..c54bd751b53 100644 --- a/machineconfiguration/v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-DevPreviewNoUpgrade.crd.yaml +++ b/machineconfiguration/v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-DevPreviewNoUpgrade.crd.yaml @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - api-approved.openshift.io: https://github.com/openshift/api/pull/1596 + api-approved.openshift.io: https://github.com/openshift/api/pull/2201 api.openshift.io/merged-by-featuregates: "true" include.release.openshift.io/ibm-cloud-managed: "true" include.release.openshift.io/self-managed-high-availability: "true" @@ -52,10 +52,6 @@ spec: name: Resumed priority: 1 type: string - - jsonPath: .status.conditions[?(@.type=="UpdateCompatible")].status - name: UpdateCompatible - priority: 1 - type: string - jsonPath: .status.conditions[?(@.type=="AppliedFilesAndOS")].status name: UpdatedFilesAndOS priority: 1 @@ -72,10 +68,6 @@ spec: name: RebootedNode priority: 1 type: string - - jsonPath: .status.conditions[?(@.type=="ReloadedCRIO")].status - name: ReloadedCRIO - priority: 1 - type: string - jsonPath: .status.conditions[?(@.type=="Uncordoned")].status name: UncordonedNode priority: 1 @@ -110,7 +102,7 @@ spec: configVersion: description: |- 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. This gets set before the machine config operator validates + 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. properties: desired: @@ -119,12 +111,16 @@ spec: 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 hostname (https://tools.ietf.org/html/rfc1123) - It may consist of only alphanumeric characters, hyphens (-) and periods (.) - and must be at most 253 characters in length. + 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. maxLength: 253 - pattern: ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$ type: string + x-kubernetes-validations: + - message: a lowercase RFC 1123 subdomain must consist of lower + case alphanumeric characters, '-' or '.', and must start and + end with an alphanumeric character. + rule: '!format.dns1123Subdomain().validate(self).hasValue()' required: - desired type: object @@ -134,30 +130,42 @@ spec: properties: name: description: |- - name is the object name. - Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) - It may consist of only alphanumeric characters, hyphens (-) and periods (.) - and must be at most 253 characters in length. + 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. maxLength: 253 - pattern: ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$ type: string + x-kubernetes-validations: + - message: a lowercase RFC 1123 subdomain must consist of lower + case alphanumeric characters, '-' or '.', and must start and + end with an alphanumeric character. + rule: '!format.dns1123Subdomain().validate(self).hasValue()' required: - name type: object pinnedImageSets: - description: pinnedImageSets holds the desired pinned image sets that - this node should pin and pull. + description: pinnedImageSets is a user defined value that holds the + names of the desired image sets that the node should pull and pin. items: + description: |- + MachineConfigNodeSpecPinnedImageSet holds information on the desired pinned image sets that the current observed machine config node + should pin and pull. properties: name: description: |- name is the name of the pinned image set. - Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) - It may consist of only alphanumeric characters, hyphens (-) and periods (.) - and must be at most 253 characters in length. + 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. maxLength: 253 - pattern: ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$ type: string + x-kubernetes-validations: + - message: a lowercase RFC 1123 subdomain must consist of lower + case alphanumeric characters, '-' or '.', and must start + and end with an alphanumeric character. + rule: '!format.dns1123Subdomain().validate(self).hasValue()' required: - name type: object @@ -173,13 +181,18 @@ spec: properties: name: description: |- - name is the object name. - Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) - It may consist of only alphanumeric characters, hyphens (-) and periods (.) - and must be at most 253 characters in length. + 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. maxLength: 253 - pattern: ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$ type: string + x-kubernetes-validations: + - message: a lowercase RFC 1123 subdomain must consist of lower + case alphanumeric characters, '-' or '.', and must start and + end with an alphanumeric character. + rule: '!format.dns1123Subdomain().validate(self).hasValue()' required: - name type: object @@ -249,68 +262,86 @@ spec: - status - type type: object + maxItems: 20 type: array x-kubernetes-list-map-keys: - type x-kubernetes-list-type: map configVersion: - description: |- - configVersion describes the current and desired machine config for this node. - The current version represents the current machine config for the node and is updated after a successful update. - The desired version represents the machine config the node will attempt to update to. - This desired machine config has been compared to the current machine config and has been validated by the machine config operator as one that is valid and that exists. + description: configVersion describes the current and desired machine + config version for this node. properties: current: description: |- 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 hostname (https://tools.ietf.org/html/rfc1123) - It may consist of only alphanumeric characters, hyphens (-) and periods (.) - and must be at most 253 characters in length. + 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. maxLength: 253 - pattern: ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$ type: string + x-kubernetes-validations: + - message: a lowercase RFC 1123 subdomain must consist of lower + case alphanumeric characters, '-' or '.', and must start and + end with an alphanumeric character. + rule: '!format.dns1123Subdomain().validate(self).hasValue()' desired: description: |- 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 hostname (https://tools.ietf.org/html/rfc1123) - It may consist of only alphanumeric characters, hyphens (-) and periods (.) - and must be at most 253 characters in length. + 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. maxLength: 253 - pattern: ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$ type: string + x-kubernetes-validations: + - message: a lowercase RFC 1123 subdomain must consist of lower + case alphanumeric characters, '-' or '.', and must start and + end with an alphanumeric character. + rule: '!format.dns1123Subdomain().validate(self).hasValue()' required: - desired type: object observedGeneration: description: |- - observedGeneration represents the generation observed by the controller. + 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. format: int64 + minimum: 0 type: integer + x-kubernetes-validations: + - message: observedGeneration must not decrease + rule: self >= oldSelf pinnedImageSets: - description: |- - pinnedImageSets describes the current and desired pinned image sets for this node. - The current version is the generation of the pinned image set that has most recently been successfully pulled and pinned on this node. - The desired version is the generation of the pinned image set that is targeted to be pulled and pinned on this node. + description: pinnedImageSets describes the current and desired pinned + image sets for this node. items: + description: MachineConfigNodeStatusPinnedImageSet holds information + about the current, desired, and failed pinned image sets for the + observed machine config node. properties: currentGeneration: description: currentGeneration is the generation of the pinned image set that has most recently been successfully pulled and pinned on this node. format: int32 + minimum: 0 type: integer + x-kubernetes-validations: + - message: currentGeneration must not decrease + rule: self >= oldSelf desiredGeneration: - description: desiredGeneration version is the generation of - the pinned image set that is targeted to be pulled and pinned - on this node. + description: desiredGeneration is the generation of the pinned + image set that is targeted to be pulled and pinned on this + node. format: int32 minimum: 0 type: integer + x-kubernetes-validations: + - message: desiredGeneration must not decrease + rule: self >= oldSelf lastFailedGeneration: description: lastFailedGeneration is the generation of the most recent pinned image set that failed to be pulled and pinned @@ -318,22 +349,28 @@ spec: format: int32 minimum: 0 type: integer - lastFailedGenerationErrors: - description: lastFailedGenerationErrors is a list of errors - why the lastFailed generation failed to be pulled and pinned. - items: - type: string - maxItems: 10 - type: array + x-kubernetes-validations: + - message: lastFailedGeneration must not decrease + rule: self >= oldSelf + lastFailedGenerationError: + description: |- + 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. + maxLength: 32768 + type: string name: description: |- name is the name of the pinned image set. - Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) - It may consist of only alphanumeric characters, hyphens (-) and periods (.) - and must be at most 253 characters in length. + 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. maxLength: 253 - pattern: ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$ type: string + x-kubernetes-validations: + - message: a lowercase RFC 1123 subdomain must consist of lower + case alphanumeric characters, '-' or '.', and must start + and end with an alphanumeric character. + rule: '!format.dns1123Subdomain().validate(self).hasValue()' required: - name type: object @@ -342,13 +379,14 @@ spec: current generation rule: 'has(self.desiredGeneration) && has(self.currentGeneration) ? self.desiredGeneration >= self.currentGeneration : true' - - message: desired generation must be greater than last failed generation + - message: desired generation must be greater than or equal to the + last failed generation rule: 'has(self.lastFailedGeneration) && has(self.desiredGeneration) ? self.desiredGeneration >= self.lastFailedGeneration : true' - - message: desired generation must be defined if last failed generation - is defined - rule: 'has(self.lastFailedGeneration) ? has(self.desiredGeneration): - true' + - message: last failed generation error must be defined on image + pull and pin failure + rule: 'has(self.lastFailedGeneration) ? has(self.lastFailedGenerationError) + : true' maxItems: 100 type: array x-kubernetes-list-map-keys: @@ -356,7 +394,6 @@ spec: x-kubernetes-list-type: map required: - configVersion - - observedGeneration type: object required: - spec diff --git a/machineconfiguration/v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-TechPreviewNoUpgrade.crd.yaml b/machineconfiguration/v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-TechPreviewNoUpgrade.crd.yaml index 830f0734d21..6fafd384e0e 100644 --- a/machineconfiguration/v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-TechPreviewNoUpgrade.crd.yaml +++ b/machineconfiguration/v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-TechPreviewNoUpgrade.crd.yaml @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - api-approved.openshift.io: https://github.com/openshift/api/pull/1596 + api-approved.openshift.io: https://github.com/openshift/api/pull/2201 api.openshift.io/merged-by-featuregates: "true" include.release.openshift.io/ibm-cloud-managed: "true" include.release.openshift.io/self-managed-high-availability: "true" @@ -52,10 +52,6 @@ spec: name: Resumed priority: 1 type: string - - jsonPath: .status.conditions[?(@.type=="UpdateCompatible")].status - name: UpdateCompatible - priority: 1 - type: string - jsonPath: .status.conditions[?(@.type=="AppliedFilesAndOS")].status name: UpdatedFilesAndOS priority: 1 @@ -72,10 +68,6 @@ spec: name: RebootedNode priority: 1 type: string - - jsonPath: .status.conditions[?(@.type=="ReloadedCRIO")].status - name: ReloadedCRIO - priority: 1 - type: string - jsonPath: .status.conditions[?(@.type=="Uncordoned")].status name: UncordonedNode priority: 1 @@ -110,7 +102,7 @@ spec: configVersion: description: |- 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. This gets set before the machine config operator validates + 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. properties: desired: @@ -119,12 +111,16 @@ spec: 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 hostname (https://tools.ietf.org/html/rfc1123) - It may consist of only alphanumeric characters, hyphens (-) and periods (.) - and must be at most 253 characters in length. + 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. maxLength: 253 - pattern: ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$ type: string + x-kubernetes-validations: + - message: a lowercase RFC 1123 subdomain must consist of lower + case alphanumeric characters, '-' or '.', and must start and + end with an alphanumeric character. + rule: '!format.dns1123Subdomain().validate(self).hasValue()' required: - desired type: object @@ -134,30 +130,42 @@ spec: properties: name: description: |- - name is the object name. - Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) - It may consist of only alphanumeric characters, hyphens (-) and periods (.) - and must be at most 253 characters in length. + 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. maxLength: 253 - pattern: ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$ type: string + x-kubernetes-validations: + - message: a lowercase RFC 1123 subdomain must consist of lower + case alphanumeric characters, '-' or '.', and must start and + end with an alphanumeric character. + rule: '!format.dns1123Subdomain().validate(self).hasValue()' required: - name type: object pinnedImageSets: - description: pinnedImageSets holds the desired pinned image sets that - this node should pin and pull. + description: pinnedImageSets is a user defined value that holds the + names of the desired image sets that the node should pull and pin. items: + description: |- + MachineConfigNodeSpecPinnedImageSet holds information on the desired pinned image sets that the current observed machine config node + should pin and pull. properties: name: description: |- name is the name of the pinned image set. - Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) - It may consist of only alphanumeric characters, hyphens (-) and periods (.) - and must be at most 253 characters in length. + 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. maxLength: 253 - pattern: ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$ type: string + x-kubernetes-validations: + - message: a lowercase RFC 1123 subdomain must consist of lower + case alphanumeric characters, '-' or '.', and must start + and end with an alphanumeric character. + rule: '!format.dns1123Subdomain().validate(self).hasValue()' required: - name type: object @@ -173,13 +181,18 @@ spec: properties: name: description: |- - name is the object name. - Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) - It may consist of only alphanumeric characters, hyphens (-) and periods (.) - and must be at most 253 characters in length. + 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. maxLength: 253 - pattern: ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$ type: string + x-kubernetes-validations: + - message: a lowercase RFC 1123 subdomain must consist of lower + case alphanumeric characters, '-' or '.', and must start and + end with an alphanumeric character. + rule: '!format.dns1123Subdomain().validate(self).hasValue()' required: - name type: object @@ -249,68 +262,86 @@ spec: - status - type type: object + maxItems: 20 type: array x-kubernetes-list-map-keys: - type x-kubernetes-list-type: map configVersion: - description: |- - configVersion describes the current and desired machine config for this node. - The current version represents the current machine config for the node and is updated after a successful update. - The desired version represents the machine config the node will attempt to update to. - This desired machine config has been compared to the current machine config and has been validated by the machine config operator as one that is valid and that exists. + description: configVersion describes the current and desired machine + config version for this node. properties: current: description: |- 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 hostname (https://tools.ietf.org/html/rfc1123) - It may consist of only alphanumeric characters, hyphens (-) and periods (.) - and must be at most 253 characters in length. + 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. maxLength: 253 - pattern: ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$ type: string + x-kubernetes-validations: + - message: a lowercase RFC 1123 subdomain must consist of lower + case alphanumeric characters, '-' or '.', and must start and + end with an alphanumeric character. + rule: '!format.dns1123Subdomain().validate(self).hasValue()' desired: description: |- 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 hostname (https://tools.ietf.org/html/rfc1123) - It may consist of only alphanumeric characters, hyphens (-) and periods (.) - and must be at most 253 characters in length. + 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. maxLength: 253 - pattern: ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$ type: string + x-kubernetes-validations: + - message: a lowercase RFC 1123 subdomain must consist of lower + case alphanumeric characters, '-' or '.', and must start and + end with an alphanumeric character. + rule: '!format.dns1123Subdomain().validate(self).hasValue()' required: - desired type: object observedGeneration: description: |- - observedGeneration represents the generation observed by the controller. + 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. format: int64 + minimum: 0 type: integer + x-kubernetes-validations: + - message: observedGeneration must not decrease + rule: self >= oldSelf pinnedImageSets: - description: |- - pinnedImageSets describes the current and desired pinned image sets for this node. - The current version is the generation of the pinned image set that has most recently been successfully pulled and pinned on this node. - The desired version is the generation of the pinned image set that is targeted to be pulled and pinned on this node. + description: pinnedImageSets describes the current and desired pinned + image sets for this node. items: + description: MachineConfigNodeStatusPinnedImageSet holds information + about the current, desired, and failed pinned image sets for the + observed machine config node. properties: currentGeneration: description: currentGeneration is the generation of the pinned image set that has most recently been successfully pulled and pinned on this node. format: int32 + minimum: 0 type: integer + x-kubernetes-validations: + - message: currentGeneration must not decrease + rule: self >= oldSelf desiredGeneration: - description: desiredGeneration version is the generation of - the pinned image set that is targeted to be pulled and pinned - on this node. + description: desiredGeneration is the generation of the pinned + image set that is targeted to be pulled and pinned on this + node. format: int32 minimum: 0 type: integer + x-kubernetes-validations: + - message: desiredGeneration must not decrease + rule: self >= oldSelf lastFailedGeneration: description: lastFailedGeneration is the generation of the most recent pinned image set that failed to be pulled and pinned @@ -318,22 +349,28 @@ spec: format: int32 minimum: 0 type: integer - lastFailedGenerationErrors: - description: lastFailedGenerationErrors is a list of errors - why the lastFailed generation failed to be pulled and pinned. - items: - type: string - maxItems: 10 - type: array + x-kubernetes-validations: + - message: lastFailedGeneration must not decrease + rule: self >= oldSelf + lastFailedGenerationError: + description: |- + 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. + maxLength: 32768 + type: string name: description: |- name is the name of the pinned image set. - Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) - It may consist of only alphanumeric characters, hyphens (-) and periods (.) - and must be at most 253 characters in length. + 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. maxLength: 253 - pattern: ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$ type: string + x-kubernetes-validations: + - message: a lowercase RFC 1123 subdomain must consist of lower + case alphanumeric characters, '-' or '.', and must start + and end with an alphanumeric character. + rule: '!format.dns1123Subdomain().validate(self).hasValue()' required: - name type: object @@ -342,13 +379,14 @@ spec: current generation rule: 'has(self.desiredGeneration) && has(self.currentGeneration) ? self.desiredGeneration >= self.currentGeneration : true' - - message: desired generation must be greater than last failed generation + - message: desired generation must be greater than or equal to the + last failed generation rule: 'has(self.lastFailedGeneration) && has(self.desiredGeneration) ? self.desiredGeneration >= self.lastFailedGeneration : true' - - message: desired generation must be defined if last failed generation - is defined - rule: 'has(self.lastFailedGeneration) ? has(self.desiredGeneration): - true' + - message: last failed generation error must be defined on image + pull and pin failure + rule: 'has(self.lastFailedGeneration) ? has(self.lastFailedGenerationError) + : true' maxItems: 100 type: array x-kubernetes-list-map-keys: @@ -356,7 +394,6 @@ spec: x-kubernetes-list-type: map required: - configVersion - - observedGeneration type: object required: - spec diff --git a/machineconfiguration/v1alpha1/zz_generated.deepcopy.go b/machineconfiguration/v1alpha1/zz_generated.deepcopy.go index c8363d128eb..81627290b7d 100644 --- a/machineconfiguration/v1alpha1/zz_generated.deepcopy.go +++ b/machineconfiguration/v1alpha1/zz_generated.deepcopy.go @@ -218,9 +218,7 @@ func (in *MachineConfigNodeStatus) DeepCopyInto(out *MachineConfigNodeStatus) { if in.PinnedImageSets != nil { in, out := &in.PinnedImageSets, &out.PinnedImageSets *out = make([]MachineConfigNodeStatusPinnedImageSet, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } + copy(*out, *in) } return } @@ -254,11 +252,6 @@ func (in *MachineConfigNodeStatusMachineConfigVersion) DeepCopy() *MachineConfig // 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 - if in.LastFailedGenerationErrors != nil { - in, out := &in.LastFailedGenerationErrors, &out.LastFailedGenerationErrors - *out = make([]string, len(*in)) - copy(*out, *in) - } return } diff --git a/machineconfiguration/v1alpha1/zz_generated.featuregated-crd-manifests.yaml b/machineconfiguration/v1alpha1/zz_generated.featuregated-crd-manifests.yaml index ea7bbeeb549..af53426da3d 100644 --- a/machineconfiguration/v1alpha1/zz_generated.featuregated-crd-manifests.yaml +++ b/machineconfiguration/v1alpha1/zz_generated.featuregated-crd-manifests.yaml @@ -1,6 +1,6 @@ machineconfignodes.machineconfiguration.openshift.io: Annotations: {} - ApprovedPRNumber: https://github.com/openshift/api/pull/1596 + ApprovedPRNumber: https://github.com/openshift/api/pull/2201 CRDName: machineconfignodes.machineconfiguration.openshift.io Capability: "" Category: "" @@ -48,10 +48,6 @@ machineconfignodes.machineconfiguration.openshift.io: name: Resumed priority: 1 type: string - - jsonPath: .status.conditions[?(@.type=="UpdateCompatible")].status - name: UpdateCompatible - priority: 1 - type: string - jsonPath: .status.conditions[?(@.type=="AppliedFilesAndOS")].status name: UpdatedFilesAndOS priority: 1 @@ -68,10 +64,6 @@ machineconfignodes.machineconfiguration.openshift.io: name: RebootedNode priority: 1 type: string - - jsonPath: .status.conditions[?(@.type=="ReloadedCRIO")].status - name: ReloadedCRIO - priority: 1 - type: string - jsonPath: .status.conditions[?(@.type=="Uncordoned")].status name: UncordonedNode priority: 1 diff --git a/machineconfiguration/v1alpha1/zz_generated.featuregated-crd-manifests/machineconfignodes.machineconfiguration.openshift.io/MachineConfigNodes.yaml b/machineconfiguration/v1alpha1/zz_generated.featuregated-crd-manifests/machineconfignodes.machineconfiguration.openshift.io/MachineConfigNodes.yaml index 553498e8b27..0de45defef5 100644 --- a/machineconfiguration/v1alpha1/zz_generated.featuregated-crd-manifests/machineconfignodes.machineconfiguration.openshift.io/MachineConfigNodes.yaml +++ b/machineconfiguration/v1alpha1/zz_generated.featuregated-crd-manifests/machineconfignodes.machineconfiguration.openshift.io/MachineConfigNodes.yaml @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - api-approved.openshift.io: https://github.com/openshift/api/pull/1596 + api-approved.openshift.io: https://github.com/openshift/api/pull/2201 api.openshift.io/filename-cvo-runlevel: "0000_80" api.openshift.io/filename-operator: machine-config api.openshift.io/filename-ordering: "01" @@ -52,10 +52,6 @@ spec: name: Resumed priority: 1 type: string - - jsonPath: .status.conditions[?(@.type=="UpdateCompatible")].status - name: UpdateCompatible - priority: 1 - type: string - jsonPath: .status.conditions[?(@.type=="AppliedFilesAndOS")].status name: UpdatedFilesAndOS priority: 1 @@ -72,10 +68,6 @@ spec: name: RebootedNode priority: 1 type: string - - jsonPath: .status.conditions[?(@.type=="ReloadedCRIO")].status - name: ReloadedCRIO - priority: 1 - type: string - jsonPath: .status.conditions[?(@.type=="Uncordoned")].status name: UncordonedNode priority: 1 @@ -110,7 +102,7 @@ spec: configVersion: description: |- 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. This gets set before the machine config operator validates + 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. properties: desired: @@ -119,12 +111,16 @@ spec: 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 hostname (https://tools.ietf.org/html/rfc1123) - It may consist of only alphanumeric characters, hyphens (-) and periods (.) - and must be at most 253 characters in length. + 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. maxLength: 253 - pattern: ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$ type: string + x-kubernetes-validations: + - message: a lowercase RFC 1123 subdomain must consist of lower + case alphanumeric characters, '-' or '.', and must start and + end with an alphanumeric character. + rule: '!format.dns1123Subdomain().validate(self).hasValue()' required: - desired type: object @@ -134,30 +130,42 @@ spec: properties: name: description: |- - name is the object name. - Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) - It may consist of only alphanumeric characters, hyphens (-) and periods (.) - and must be at most 253 characters in length. + 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. maxLength: 253 - pattern: ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$ type: string + x-kubernetes-validations: + - message: a lowercase RFC 1123 subdomain must consist of lower + case alphanumeric characters, '-' or '.', and must start and + end with an alphanumeric character. + rule: '!format.dns1123Subdomain().validate(self).hasValue()' required: - name type: object pinnedImageSets: - description: pinnedImageSets holds the desired pinned image sets that - this node should pin and pull. + description: pinnedImageSets is a user defined value that holds the + names of the desired image sets that the node should pull and pin. items: + description: |- + MachineConfigNodeSpecPinnedImageSet holds information on the desired pinned image sets that the current observed machine config node + should pin and pull. properties: name: description: |- name is the name of the pinned image set. - Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) - It may consist of only alphanumeric characters, hyphens (-) and periods (.) - and must be at most 253 characters in length. + 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. maxLength: 253 - pattern: ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$ type: string + x-kubernetes-validations: + - message: a lowercase RFC 1123 subdomain must consist of lower + case alphanumeric characters, '-' or '.', and must start + and end with an alphanumeric character. + rule: '!format.dns1123Subdomain().validate(self).hasValue()' required: - name type: object @@ -173,13 +181,18 @@ spec: properties: name: description: |- - name is the object name. - Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) - It may consist of only alphanumeric characters, hyphens (-) and periods (.) - and must be at most 253 characters in length. + 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. maxLength: 253 - pattern: ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$ type: string + x-kubernetes-validations: + - message: a lowercase RFC 1123 subdomain must consist of lower + case alphanumeric characters, '-' or '.', and must start and + end with an alphanumeric character. + rule: '!format.dns1123Subdomain().validate(self).hasValue()' required: - name type: object @@ -249,68 +262,86 @@ spec: - status - type type: object + maxItems: 20 type: array x-kubernetes-list-map-keys: - type x-kubernetes-list-type: map configVersion: - description: |- - configVersion describes the current and desired machine config for this node. - The current version represents the current machine config for the node and is updated after a successful update. - The desired version represents the machine config the node will attempt to update to. - This desired machine config has been compared to the current machine config and has been validated by the machine config operator as one that is valid and that exists. + description: configVersion describes the current and desired machine + config version for this node. properties: current: description: |- 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 hostname (https://tools.ietf.org/html/rfc1123) - It may consist of only alphanumeric characters, hyphens (-) and periods (.) - and must be at most 253 characters in length. + 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. maxLength: 253 - pattern: ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$ type: string + x-kubernetes-validations: + - message: a lowercase RFC 1123 subdomain must consist of lower + case alphanumeric characters, '-' or '.', and must start and + end with an alphanumeric character. + rule: '!format.dns1123Subdomain().validate(self).hasValue()' desired: description: |- 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 hostname (https://tools.ietf.org/html/rfc1123) - It may consist of only alphanumeric characters, hyphens (-) and periods (.) - and must be at most 253 characters in length. + 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. maxLength: 253 - pattern: ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$ type: string + x-kubernetes-validations: + - message: a lowercase RFC 1123 subdomain must consist of lower + case alphanumeric characters, '-' or '.', and must start and + end with an alphanumeric character. + rule: '!format.dns1123Subdomain().validate(self).hasValue()' required: - desired type: object observedGeneration: description: |- - observedGeneration represents the generation observed by the controller. + 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. format: int64 + minimum: 0 type: integer + x-kubernetes-validations: + - message: observedGeneration must not decrease + rule: self >= oldSelf pinnedImageSets: - description: |- - pinnedImageSets describes the current and desired pinned image sets for this node. - The current version is the generation of the pinned image set that has most recently been successfully pulled and pinned on this node. - The desired version is the generation of the pinned image set that is targeted to be pulled and pinned on this node. + description: pinnedImageSets describes the current and desired pinned + image sets for this node. items: + description: MachineConfigNodeStatusPinnedImageSet holds information + about the current, desired, and failed pinned image sets for the + observed machine config node. properties: currentGeneration: description: currentGeneration is the generation of the pinned image set that has most recently been successfully pulled and pinned on this node. format: int32 + minimum: 0 type: integer + x-kubernetes-validations: + - message: currentGeneration must not decrease + rule: self >= oldSelf desiredGeneration: - description: desiredGeneration version is the generation of - the pinned image set that is targeted to be pulled and pinned - on this node. + description: desiredGeneration is the generation of the pinned + image set that is targeted to be pulled and pinned on this + node. format: int32 minimum: 0 type: integer + x-kubernetes-validations: + - message: desiredGeneration must not decrease + rule: self >= oldSelf lastFailedGeneration: description: lastFailedGeneration is the generation of the most recent pinned image set that failed to be pulled and pinned @@ -318,22 +349,28 @@ spec: format: int32 minimum: 0 type: integer - lastFailedGenerationErrors: - description: lastFailedGenerationErrors is a list of errors - why the lastFailed generation failed to be pulled and pinned. - items: - type: string - maxItems: 10 - type: array + x-kubernetes-validations: + - message: lastFailedGeneration must not decrease + rule: self >= oldSelf + lastFailedGenerationError: + description: |- + 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. + maxLength: 32768 + type: string name: description: |- name is the name of the pinned image set. - Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) - It may consist of only alphanumeric characters, hyphens (-) and periods (.) - and must be at most 253 characters in length. + 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. maxLength: 253 - pattern: ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$ type: string + x-kubernetes-validations: + - message: a lowercase RFC 1123 subdomain must consist of lower + case alphanumeric characters, '-' or '.', and must start + and end with an alphanumeric character. + rule: '!format.dns1123Subdomain().validate(self).hasValue()' required: - name type: object @@ -342,13 +379,14 @@ spec: current generation rule: 'has(self.desiredGeneration) && has(self.currentGeneration) ? self.desiredGeneration >= self.currentGeneration : true' - - message: desired generation must be greater than last failed generation + - message: desired generation must be greater than or equal to the + last failed generation rule: 'has(self.lastFailedGeneration) && has(self.desiredGeneration) ? self.desiredGeneration >= self.lastFailedGeneration : true' - - message: desired generation must be defined if last failed generation - is defined - rule: 'has(self.lastFailedGeneration) ? has(self.desiredGeneration): - true' + - message: last failed generation error must be defined on image + pull and pin failure + rule: 'has(self.lastFailedGeneration) ? has(self.lastFailedGenerationError) + : true' maxItems: 100 type: array x-kubernetes-list-map-keys: @@ -356,7 +394,6 @@ spec: x-kubernetes-list-type: map required: - configVersion - - observedGeneration type: object required: - spec diff --git a/machineconfiguration/v1alpha1/zz_generated.swagger_doc_generated.go b/machineconfiguration/v1alpha1/zz_generated.swagger_doc_generated.go index f2592eaf731..672998d74df 100644 --- a/machineconfiguration/v1alpha1/zz_generated.swagger_doc_generated.go +++ b/machineconfiguration/v1alpha1/zz_generated.swagger_doc_generated.go @@ -13,7 +13,7 @@ package v1alpha1 // AUTO-GENERATED FUNCTIONS START HERE 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 object name. Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) It may consist of only alphanumeric characters, hyphens (-) and periods (.) and must be at most 253 characters in length.", + "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 { @@ -21,9 +21,10 @@ func (MCOObjectReference) SwaggerDoc() map[string]string { } var map_MachineConfigNode = map[string]string{ - "": "MachineConfigNode describes the health of the Machines on the system Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "spec": "spec describes the configuration of the machine config node.", - "status": "status describes the last observed state of this machine config node.", + "": "MachineConfigNode describes the health of the Machines on the system Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", + "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 { @@ -31,7 +32,9 @@ func (MachineConfigNode) SwaggerDoc() map[string]string { } var map_MachineConfigNodeList = map[string]string{ - "": "MachineConfigNodeList describes all of the MachinesStates on the system\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", + "": "MachineConfigNodeList describes all of the MachinesStates on the system\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", + "metadata": "metadata is the standard list metadata.", + "items": "items contains a collection of MachineConfigNode resources.", } func (MachineConfigNodeList) SwaggerDoc() map[string]string { @@ -42,8 +45,8 @@ 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. This gets set before the machine config operator validates the new machine config against the current machine config.", - "pinnedImageSets": "pinnedImageSets holds the desired pinned image sets that this node should pin and pull.", + "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.", + "pinnedImageSets": "pinnedImageSets is a user defined value that holds the names of the desired image sets that the node should pull and pin.", } func (MachineConfigNodeSpec) SwaggerDoc() map[string]string { @@ -51,8 +54,8 @@ func (MachineConfigNodeSpec) SwaggerDoc() map[string]string { } 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 hostname (https://tools.ietf.org/html/rfc1123) It may consist of only alphanumeric characters, hyphens (-) and periods (.) and must be at most 253 characters in length.", + "": "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 { @@ -60,7 +63,8 @@ func (MachineConfigNodeSpecMachineConfigVersion) SwaggerDoc() map[string]string } var map_MachineConfigNodeSpecPinnedImageSet = map[string]string{ - "name": "name is the name of the pinned image set. Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) It may consist of only alphanumeric characters, hyphens (-) and periods (.) and must be at most 253 characters in length.", + "": "MachineConfigNodeSpecPinnedImageSet holds information on the desired pinned image sets that the current observed machine config node should pin and pull.", + "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.", } func (MachineConfigNodeSpecPinnedImageSet) SwaggerDoc() map[string]string { @@ -70,9 +74,9 @@ func (MachineConfigNodeSpecPinnedImageSet) SwaggerDoc() map[string]string { 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.", - "observedGeneration": "observedGeneration represents the generation observed by the 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 for this node. The current version represents the current machine config for the node and is updated after a successful update. The desired version represents the machine config the node will attempt to update to. This desired machine config has been compared to the current machine config and has been validated by the machine config operator as one that is valid and that exists.", - "pinnedImageSets": "pinnedImageSets describes the current and desired pinned image sets for this node. The current version is the generation of the pinned image set that has most recently been successfully pulled and pinned on this node. The desired version is the generation of the pinned image set that is targeted to be pulled and pinned on this node.", + "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 { @@ -80,9 +84,9 @@ func (MachineConfigNodeStatus) SwaggerDoc() map[string]string { } 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 are not matched, 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 not 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 hostname (https://tools.ietf.org/html/rfc1123) It may consist of only alphanumeric characters, hyphens (-) and periods (.) and must 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 hostname (https://tools.ietf.org/html/rfc1123) It may consist of only alphanumeric characters, hyphens (-) and periods (.) and must be at most 253 characters in length.", + "": "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 { @@ -90,11 +94,12 @@ func (MachineConfigNodeStatusMachineConfigVersion) SwaggerDoc() map[string]strin } var map_MachineConfigNodeStatusPinnedImageSet = map[string]string{ - "name": "name is the name of the pinned image set. Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) It may consist of only alphanumeric characters, hyphens (-) and periods (.) and must 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 version 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.", - "lastFailedGenerationErrors": "lastFailedGenerationErrors is a list of errors why the lastFailed generation failed to be pulled and pinned.", + "": "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 { diff --git a/openapi/generated_openapi/zz_generated.openapi.go b/openapi/generated_openapi/zz_generated.openapi.go index 3aa41410864..ea052f6897a 100644 --- a/openapi/generated_openapi/zz_generated.openapi.go +++ b/openapi/generated_openapi/zz_generated.openapi.go @@ -39850,7 +39850,7 @@ func schema_openshift_api_machineconfiguration_v1alpha1_MCOObjectReference(ref c Properties: map[string]spec.Schema{ "name": { SchemaProps: spec.SchemaProps{ - Description: "name is the object name. Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) It may consist of only alphanumeric characters, hyphens (-) and periods (.) and must be at most 253 characters in length.", + Description: "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.", Default: "", Type: []string{"string"}, Format: "", @@ -39886,8 +39886,9 @@ func schema_openshift_api_machineconfiguration_v1alpha1_MachineConfigNode(ref co }, "metadata": { SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Description: "metadata is the standard object metadata.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, }, "spec": { @@ -39936,13 +39937,15 @@ func schema_openshift_api_machineconfiguration_v1alpha1_MachineConfigNodeList(re }, "metadata": { SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Description: "metadata is the standard list metadata.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, "items": { SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, + Description: "items contains a collection of MachineConfigNode resources.", + Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -39954,7 +39957,6 @@ func schema_openshift_api_machineconfiguration_v1alpha1_MachineConfigNodeList(re }, }, }, - Required: []string{"metadata", "items"}, }, }, Dependencies: []string{ @@ -39985,7 +39987,7 @@ func schema_openshift_api_machineconfiguration_v1alpha1_MachineConfigNodeSpec(re }, "configVersion": { SchemaProps: spec.SchemaProps{ - Description: "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. This gets set before the machine config operator validates the new machine config against the current machine config.", + Description: "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.", Default: map[string]interface{}{}, Ref: ref("github.com/openshift/api/machineconfiguration/v1alpha1.MachineConfigNodeSpecMachineConfigVersion"), }, @@ -40000,7 +40002,7 @@ func schema_openshift_api_machineconfiguration_v1alpha1_MachineConfigNodeSpec(re }, }, SchemaProps: spec.SchemaProps{ - Description: "pinnedImageSets holds the desired pinned image sets that this node should pin and pull.", + Description: "pinnedImageSets is a user defined value that holds the names of the desired image sets that the node should pull and pin.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ @@ -40025,12 +40027,12 @@ func schema_openshift_api_machineconfiguration_v1alpha1_MachineConfigNodeSpecMac return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "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.", + Description: "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: []string{"object"}, Properties: map[string]spec.Schema{ "desired": { SchemaProps: spec.SchemaProps{ - Description: "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 hostname (https://tools.ietf.org/html/rfc1123) It may consist of only alphanumeric characters, hyphens (-) and periods (.) and must be at most 253 characters in length.", + Description: "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.", Default: "", Type: []string{"string"}, Format: "", @@ -40047,11 +40049,12 @@ func schema_openshift_api_machineconfiguration_v1alpha1_MachineConfigNodeSpecPin return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, + Description: "MachineConfigNodeSpecPinnedImageSet holds information on the desired pinned image sets that the current observed machine config node should pin and pull.", + Type: []string{"object"}, Properties: map[string]spec.Schema{ "name": { SchemaProps: spec.SchemaProps{ - Description: "name is the name of the pinned image set. Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) It may consist of only alphanumeric characters, hyphens (-) and periods (.) and must be at most 253 characters in length.", + Description: "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.", Default: "", Type: []string{"string"}, Format: "", @@ -40095,14 +40098,14 @@ func schema_openshift_api_machineconfiguration_v1alpha1_MachineConfigNodeStatus( }, "observedGeneration": { SchemaProps: spec.SchemaProps{ - Description: "observedGeneration represents the generation observed by the controller. This field is updated when the controller observes a change to the desiredConfig in the configVersion of the machine config node spec.", + Description: "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.", Type: []string{"integer"}, Format: "int64", }, }, "configVersion": { SchemaProps: spec.SchemaProps{ - Description: "configVersion describes the current and desired machine config for this node. The current version represents the current machine config for the node and is updated after a successful update. The desired version represents the machine config the node will attempt to update to. This desired machine config has been compared to the current machine config and has been validated by the machine config operator as one that is valid and that exists.", + Description: "configVersion describes the current and desired machine config version for this node.", Default: map[string]interface{}{}, Ref: ref("github.com/openshift/api/machineconfiguration/v1alpha1.MachineConfigNodeStatusMachineConfigVersion"), }, @@ -40117,7 +40120,7 @@ func schema_openshift_api_machineconfiguration_v1alpha1_MachineConfigNodeStatus( }, }, SchemaProps: spec.SchemaProps{ - Description: "pinnedImageSets describes the current and desired pinned image sets for this node. The current version is the generation of the pinned image set that has most recently been successfully pulled and pinned on this node. The desired version is the generation of the pinned image set that is targeted to be pulled and pinned on this node.", + Description: "pinnedImageSets describes the current and desired pinned image sets for this node.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ @@ -40130,7 +40133,7 @@ func schema_openshift_api_machineconfiguration_v1alpha1_MachineConfigNodeStatus( }, }, }, - Required: []string{"observedGeneration", "configVersion"}, + Required: []string{"configVersion"}, }, }, Dependencies: []string{ @@ -40142,12 +40145,12 @@ func schema_openshift_api_machineconfiguration_v1alpha1_MachineConfigNodeStatusM return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "MachineConfigNodeStatusMachineConfigVersion holds the current and desired config versions as last updated in the MCN status. When the current and desired versions are not matched, 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 not 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.", + Description: "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: []string{"object"}, Properties: map[string]spec.Schema{ "current": { SchemaProps: spec.SchemaProps{ - Description: "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 hostname (https://tools.ietf.org/html/rfc1123) It may consist of only alphanumeric characters, hyphens (-) and periods (.) and must be at most 253 characters in length.", + Description: "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.", Default: "", Type: []string{"string"}, Format: "", @@ -40155,7 +40158,7 @@ func schema_openshift_api_machineconfiguration_v1alpha1_MachineConfigNodeStatusM }, "desired": { SchemaProps: spec.SchemaProps{ - Description: "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 hostname (https://tools.ietf.org/html/rfc1123) It may consist of only alphanumeric characters, hyphens (-) and periods (.) and must be at most 253 characters in length.", + Description: "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.", Default: "", Type: []string{"string"}, Format: "", @@ -40172,11 +40175,12 @@ func schema_openshift_api_machineconfiguration_v1alpha1_MachineConfigNodeStatusP return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, + Description: "MachineConfigNodeStatusPinnedImageSet holds information about the current, desired, and failed pinned image sets for the observed machine config node.", + Type: []string{"object"}, Properties: map[string]spec.Schema{ "name": { SchemaProps: spec.SchemaProps{ - Description: "name is the name of the pinned image set. Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) It may consist of only alphanumeric characters, hyphens (-) and periods (.) and must be at most 253 characters in length.", + Description: "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.", Default: "", Type: []string{"string"}, Format: "", @@ -40191,7 +40195,7 @@ func schema_openshift_api_machineconfiguration_v1alpha1_MachineConfigNodeStatusP }, "desiredGeneration": { SchemaProps: spec.SchemaProps{ - Description: "desiredGeneration version is the generation of the pinned image set that is targeted to be pulled and pinned on this node.", + Description: "desiredGeneration is the generation of the pinned image set that is targeted to be pulled and pinned on this node.", Type: []string{"integer"}, Format: "int32", }, @@ -40203,19 +40207,11 @@ func schema_openshift_api_machineconfiguration_v1alpha1_MachineConfigNodeStatusP Format: "int32", }, }, - "lastFailedGenerationErrors": { + "lastFailedGenerationError": { SchemaProps: spec.SchemaProps{ - Description: "lastFailedGenerationErrors is a list of errors why the lastFailed generation failed to be pulled and pinned.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "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.", + Type: []string{"string"}, + Format: "", }, }, }, diff --git a/openapi/openapi.json b/openapi/openapi.json index da6677c6b57..86408186c76 100644 --- a/openapi/openapi.json +++ b/openapi/openapi.json @@ -23041,7 +23041,7 @@ ], "properties": { "name": { - "description": "name is the object name. Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) It may consist of only alphanumeric characters, hyphens (-) and periods (.) and must be at most 253 characters in length.", + "description": "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.", "type": "string", "default": "" } @@ -23063,6 +23063,7 @@ "type": "string" }, "metadata": { + "description": "metadata is the standard object metadata.", "default": {}, "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" }, @@ -23081,16 +23082,13 @@ "com.github.openshift.api.machineconfiguration.v1alpha1.MachineConfigNodeList": { "description": "MachineConfigNodeList describes all of the MachinesStates on the system\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", "type": "object", - "required": [ - "metadata", - "items" - ], "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", "type": "string" }, "items": { + "description": "items contains a collection of MachineConfigNode resources.", "type": "array", "items": { "default": {}, @@ -23102,6 +23100,7 @@ "type": "string" }, "metadata": { + "description": "metadata is the standard list metadata.", "default": {}, "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" } @@ -23117,7 +23116,7 @@ ], "properties": { "configVersion": { - "description": "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. This gets set before the machine config operator validates the new machine config against the current machine config.", + "description": "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.", "default": {}, "$ref": "#/definitions/com.github.openshift.api.machineconfiguration.v1alpha1.MachineConfigNodeSpecMachineConfigVersion" }, @@ -23127,7 +23126,7 @@ "$ref": "#/definitions/com.github.openshift.api.machineconfiguration.v1alpha1.MCOObjectReference" }, "pinnedImageSets": { - "description": "pinnedImageSets holds the desired pinned image sets that this node should pin and pull.", + "description": "pinnedImageSets is a user defined value that holds the names of the desired image sets that the node should pull and pin.", "type": "array", "items": { "default": {}, @@ -23146,27 +23145,28 @@ } }, "com.github.openshift.api.machineconfiguration.v1alpha1.MachineConfigNodeSpecMachineConfigVersion": { - "description": "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.", + "description": "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": "object", "required": [ "desired" ], "properties": { "desired": { - "description": "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 hostname (https://tools.ietf.org/html/rfc1123) It may consist of only alphanumeric characters, hyphens (-) and periods (.) and must be at most 253 characters in length.", + "description": "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.", "type": "string", "default": "" } } }, "com.github.openshift.api.machineconfiguration.v1alpha1.MachineConfigNodeSpecPinnedImageSet": { + "description": "MachineConfigNodeSpecPinnedImageSet holds information on the desired pinned image sets that the current observed machine config node should pin and pull.", "type": "object", "required": [ "name" ], "properties": { "name": { - "description": "name is the name of the pinned image set. Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) It may consist of only alphanumeric characters, hyphens (-) and periods (.) and must be at most 253 characters in length.", + "description": "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.", "type": "string", "default": "" } @@ -23176,7 +23176,6 @@ "description": "MachineConfigNodeStatus holds the reported information on a particular machine config node.", "type": "object", "required": [ - "observedGeneration", "configVersion" ], "properties": { @@ -23193,17 +23192,17 @@ "x-kubernetes-list-type": "map" }, "configVersion": { - "description": "configVersion describes the current and desired machine config for this node. The current version represents the current machine config for the node and is updated after a successful update. The desired version represents the machine config the node will attempt to update to. This desired machine config has been compared to the current machine config and has been validated by the machine config operator as one that is valid and that exists.", + "description": "configVersion describes the current and desired machine config version for this node.", "default": {}, "$ref": "#/definitions/com.github.openshift.api.machineconfiguration.v1alpha1.MachineConfigNodeStatusMachineConfigVersion" }, "observedGeneration": { - "description": "observedGeneration represents the generation observed by the controller. This field is updated when the controller observes a change to the desiredConfig in the configVersion of the machine config node spec.", + "description": "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.", "type": "integer", "format": "int64" }, "pinnedImageSets": { - "description": "pinnedImageSets describes the current and desired pinned image sets for this node. The current version is the generation of the pinned image set that has most recently been successfully pulled and pinned on this node. The desired version is the generation of the pinned image set that is targeted to be pulled and pinned on this node.", + "description": "pinnedImageSets describes the current and desired pinned image sets for this node.", "type": "array", "items": { "default": {}, @@ -23217,25 +23216,26 @@ } }, "com.github.openshift.api.machineconfiguration.v1alpha1.MachineConfigNodeStatusMachineConfigVersion": { - "description": "MachineConfigNodeStatusMachineConfigVersion holds the current and desired config versions as last updated in the MCN status. When the current and desired versions are not matched, 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 not 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.", + "description": "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": "object", "required": [ "desired" ], "properties": { "current": { - "description": "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 hostname (https://tools.ietf.org/html/rfc1123) It may consist of only alphanumeric characters, hyphens (-) and periods (.) and must be at most 253 characters in length.", + "description": "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.", "type": "string", "default": "" }, "desired": { - "description": "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 hostname (https://tools.ietf.org/html/rfc1123) It may consist of only alphanumeric characters, hyphens (-) and periods (.) and must be at most 253 characters in length.", + "description": "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.", "type": "string", "default": "" } } }, "com.github.openshift.api.machineconfiguration.v1alpha1.MachineConfigNodeStatusPinnedImageSet": { + "description": "MachineConfigNodeStatusPinnedImageSet holds information about the current, desired, and failed pinned image sets for the observed machine config node.", "type": "object", "required": [ "name" @@ -23247,7 +23247,7 @@ "format": "int32" }, "desiredGeneration": { - "description": "desiredGeneration version is the generation of the pinned image set that is targeted to be pulled and pinned on this node.", + "description": "desiredGeneration is the generation of the pinned image set that is targeted to be pulled and pinned on this node.", "type": "integer", "format": "int32" }, @@ -23256,16 +23256,12 @@ "type": "integer", "format": "int32" }, - "lastFailedGenerationErrors": { - "description": "lastFailedGenerationErrors is a list of errors why the lastFailed generation failed to be pulled and pinned.", - "type": "array", - "items": { - "type": "string", - "default": "" - } + "lastFailedGenerationError": { + "description": "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.", + "type": "string" }, "name": { - "description": "name is the name of the pinned image set. Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) It may consist of only alphanumeric characters, hyphens (-) and periods (.) and must be at most 253 characters in length.", + "description": "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.", "type": "string", "default": "" } diff --git a/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-CustomNoUpgrade.crd.yaml b/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-CustomNoUpgrade.crd.yaml index b5f36f5205f..da38b62b519 100644 --- a/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-CustomNoUpgrade.crd.yaml +++ b/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-CustomNoUpgrade.crd.yaml @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - api-approved.openshift.io: https://github.com/openshift/api/pull/1596 + api-approved.openshift.io: https://github.com/openshift/api/pull/2201 api.openshift.io/merged-by-featuregates: "true" include.release.openshift.io/ibm-cloud-managed: "true" include.release.openshift.io/self-managed-high-availability: "true" @@ -52,10 +52,6 @@ spec: name: Resumed priority: 1 type: string - - jsonPath: .status.conditions[?(@.type=="UpdateCompatible")].status - name: UpdateCompatible - priority: 1 - type: string - jsonPath: .status.conditions[?(@.type=="AppliedFilesAndOS")].status name: UpdatedFilesAndOS priority: 1 @@ -72,10 +68,6 @@ spec: name: RebootedNode priority: 1 type: string - - jsonPath: .status.conditions[?(@.type=="ReloadedCRIO")].status - name: ReloadedCRIO - priority: 1 - type: string - jsonPath: .status.conditions[?(@.type=="Uncordoned")].status name: UncordonedNode priority: 1 @@ -110,7 +102,7 @@ spec: configVersion: description: |- 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. This gets set before the machine config operator validates + 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. properties: desired: @@ -119,12 +111,16 @@ spec: 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 hostname (https://tools.ietf.org/html/rfc1123) - It may consist of only alphanumeric characters, hyphens (-) and periods (.) - and must be at most 253 characters in length. + 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. maxLength: 253 - pattern: ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$ type: string + x-kubernetes-validations: + - message: a lowercase RFC 1123 subdomain must consist of lower + case alphanumeric characters, '-' or '.', and must start and + end with an alphanumeric character. + rule: '!format.dns1123Subdomain().validate(self).hasValue()' required: - desired type: object @@ -134,30 +130,42 @@ spec: properties: name: description: |- - name is the object name. - Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) - It may consist of only alphanumeric characters, hyphens (-) and periods (.) - and must be at most 253 characters in length. + 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. maxLength: 253 - pattern: ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$ type: string + x-kubernetes-validations: + - message: a lowercase RFC 1123 subdomain must consist of lower + case alphanumeric characters, '-' or '.', and must start and + end with an alphanumeric character. + rule: '!format.dns1123Subdomain().validate(self).hasValue()' required: - name type: object pinnedImageSets: - description: pinnedImageSets holds the desired pinned image sets that - this node should pin and pull. + description: pinnedImageSets is a user defined value that holds the + names of the desired image sets that the node should pull and pin. items: + description: |- + MachineConfigNodeSpecPinnedImageSet holds information on the desired pinned image sets that the current observed machine config node + should pin and pull. properties: name: description: |- name is the name of the pinned image set. - Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) - It may consist of only alphanumeric characters, hyphens (-) and periods (.) - and must be at most 253 characters in length. + 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. maxLength: 253 - pattern: ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$ type: string + x-kubernetes-validations: + - message: a lowercase RFC 1123 subdomain must consist of lower + case alphanumeric characters, '-' or '.', and must start + and end with an alphanumeric character. + rule: '!format.dns1123Subdomain().validate(self).hasValue()' required: - name type: object @@ -173,13 +181,18 @@ spec: properties: name: description: |- - name is the object name. - Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) - It may consist of only alphanumeric characters, hyphens (-) and periods (.) - and must be at most 253 characters in length. + 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. maxLength: 253 - pattern: ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$ type: string + x-kubernetes-validations: + - message: a lowercase RFC 1123 subdomain must consist of lower + case alphanumeric characters, '-' or '.', and must start and + end with an alphanumeric character. + rule: '!format.dns1123Subdomain().validate(self).hasValue()' required: - name type: object @@ -249,68 +262,86 @@ spec: - status - type type: object + maxItems: 20 type: array x-kubernetes-list-map-keys: - type x-kubernetes-list-type: map configVersion: - description: |- - configVersion describes the current and desired machine config for this node. - The current version represents the current machine config for the node and is updated after a successful update. - The desired version represents the machine config the node will attempt to update to. - This desired machine config has been compared to the current machine config and has been validated by the machine config operator as one that is valid and that exists. + description: configVersion describes the current and desired machine + config version for this node. properties: current: description: |- 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 hostname (https://tools.ietf.org/html/rfc1123) - It may consist of only alphanumeric characters, hyphens (-) and periods (.) - and must be at most 253 characters in length. + 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. maxLength: 253 - pattern: ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$ type: string + x-kubernetes-validations: + - message: a lowercase RFC 1123 subdomain must consist of lower + case alphanumeric characters, '-' or '.', and must start and + end with an alphanumeric character. + rule: '!format.dns1123Subdomain().validate(self).hasValue()' desired: description: |- 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 hostname (https://tools.ietf.org/html/rfc1123) - It may consist of only alphanumeric characters, hyphens (-) and periods (.) - and must be at most 253 characters in length. + 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. maxLength: 253 - pattern: ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$ type: string + x-kubernetes-validations: + - message: a lowercase RFC 1123 subdomain must consist of lower + case alphanumeric characters, '-' or '.', and must start and + end with an alphanumeric character. + rule: '!format.dns1123Subdomain().validate(self).hasValue()' required: - desired type: object observedGeneration: description: |- - observedGeneration represents the generation observed by the controller. + 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. format: int64 + minimum: 0 type: integer + x-kubernetes-validations: + - message: observedGeneration must not decrease + rule: self >= oldSelf pinnedImageSets: - description: |- - pinnedImageSets describes the current and desired pinned image sets for this node. - The current version is the generation of the pinned image set that has most recently been successfully pulled and pinned on this node. - The desired version is the generation of the pinned image set that is targeted to be pulled and pinned on this node. + description: pinnedImageSets describes the current and desired pinned + image sets for this node. items: + description: MachineConfigNodeStatusPinnedImageSet holds information + about the current, desired, and failed pinned image sets for the + observed machine config node. properties: currentGeneration: description: currentGeneration is the generation of the pinned image set that has most recently been successfully pulled and pinned on this node. format: int32 + minimum: 0 type: integer + x-kubernetes-validations: + - message: currentGeneration must not decrease + rule: self >= oldSelf desiredGeneration: - description: desiredGeneration version is the generation of - the pinned image set that is targeted to be pulled and pinned - on this node. + description: desiredGeneration is the generation of the pinned + image set that is targeted to be pulled and pinned on this + node. format: int32 minimum: 0 type: integer + x-kubernetes-validations: + - message: desiredGeneration must not decrease + rule: self >= oldSelf lastFailedGeneration: description: lastFailedGeneration is the generation of the most recent pinned image set that failed to be pulled and pinned @@ -318,22 +349,28 @@ spec: format: int32 minimum: 0 type: integer - lastFailedGenerationErrors: - description: lastFailedGenerationErrors is a list of errors - why the lastFailed generation failed to be pulled and pinned. - items: - type: string - maxItems: 10 - type: array + x-kubernetes-validations: + - message: lastFailedGeneration must not decrease + rule: self >= oldSelf + lastFailedGenerationError: + description: |- + 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. + maxLength: 32768 + type: string name: description: |- name is the name of the pinned image set. - Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) - It may consist of only alphanumeric characters, hyphens (-) and periods (.) - and must be at most 253 characters in length. + 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. maxLength: 253 - pattern: ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$ type: string + x-kubernetes-validations: + - message: a lowercase RFC 1123 subdomain must consist of lower + case alphanumeric characters, '-' or '.', and must start + and end with an alphanumeric character. + rule: '!format.dns1123Subdomain().validate(self).hasValue()' required: - name type: object @@ -342,13 +379,14 @@ spec: current generation rule: 'has(self.desiredGeneration) && has(self.currentGeneration) ? self.desiredGeneration >= self.currentGeneration : true' - - message: desired generation must be greater than last failed generation + - message: desired generation must be greater than or equal to the + last failed generation rule: 'has(self.lastFailedGeneration) && has(self.desiredGeneration) ? self.desiredGeneration >= self.lastFailedGeneration : true' - - message: desired generation must be defined if last failed generation - is defined - rule: 'has(self.lastFailedGeneration) ? has(self.desiredGeneration): - true' + - message: last failed generation error must be defined on image + pull and pin failure + rule: 'has(self.lastFailedGeneration) ? has(self.lastFailedGenerationError) + : true' maxItems: 100 type: array x-kubernetes-list-map-keys: @@ -356,7 +394,6 @@ spec: x-kubernetes-list-type: map required: - configVersion - - observedGeneration type: object required: - spec diff --git a/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-DevPreviewNoUpgrade.crd.yaml b/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-DevPreviewNoUpgrade.crd.yaml index daddf9c98b7..c54bd751b53 100644 --- a/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-DevPreviewNoUpgrade.crd.yaml +++ b/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-DevPreviewNoUpgrade.crd.yaml @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - api-approved.openshift.io: https://github.com/openshift/api/pull/1596 + api-approved.openshift.io: https://github.com/openshift/api/pull/2201 api.openshift.io/merged-by-featuregates: "true" include.release.openshift.io/ibm-cloud-managed: "true" include.release.openshift.io/self-managed-high-availability: "true" @@ -52,10 +52,6 @@ spec: name: Resumed priority: 1 type: string - - jsonPath: .status.conditions[?(@.type=="UpdateCompatible")].status - name: UpdateCompatible - priority: 1 - type: string - jsonPath: .status.conditions[?(@.type=="AppliedFilesAndOS")].status name: UpdatedFilesAndOS priority: 1 @@ -72,10 +68,6 @@ spec: name: RebootedNode priority: 1 type: string - - jsonPath: .status.conditions[?(@.type=="ReloadedCRIO")].status - name: ReloadedCRIO - priority: 1 - type: string - jsonPath: .status.conditions[?(@.type=="Uncordoned")].status name: UncordonedNode priority: 1 @@ -110,7 +102,7 @@ spec: configVersion: description: |- 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. This gets set before the machine config operator validates + 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. properties: desired: @@ -119,12 +111,16 @@ spec: 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 hostname (https://tools.ietf.org/html/rfc1123) - It may consist of only alphanumeric characters, hyphens (-) and periods (.) - and must be at most 253 characters in length. + 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. maxLength: 253 - pattern: ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$ type: string + x-kubernetes-validations: + - message: a lowercase RFC 1123 subdomain must consist of lower + case alphanumeric characters, '-' or '.', and must start and + end with an alphanumeric character. + rule: '!format.dns1123Subdomain().validate(self).hasValue()' required: - desired type: object @@ -134,30 +130,42 @@ spec: properties: name: description: |- - name is the object name. - Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) - It may consist of only alphanumeric characters, hyphens (-) and periods (.) - and must be at most 253 characters in length. + 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. maxLength: 253 - pattern: ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$ type: string + x-kubernetes-validations: + - message: a lowercase RFC 1123 subdomain must consist of lower + case alphanumeric characters, '-' or '.', and must start and + end with an alphanumeric character. + rule: '!format.dns1123Subdomain().validate(self).hasValue()' required: - name type: object pinnedImageSets: - description: pinnedImageSets holds the desired pinned image sets that - this node should pin and pull. + description: pinnedImageSets is a user defined value that holds the + names of the desired image sets that the node should pull and pin. items: + description: |- + MachineConfigNodeSpecPinnedImageSet holds information on the desired pinned image sets that the current observed machine config node + should pin and pull. properties: name: description: |- name is the name of the pinned image set. - Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) - It may consist of only alphanumeric characters, hyphens (-) and periods (.) - and must be at most 253 characters in length. + 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. maxLength: 253 - pattern: ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$ type: string + x-kubernetes-validations: + - message: a lowercase RFC 1123 subdomain must consist of lower + case alphanumeric characters, '-' or '.', and must start + and end with an alphanumeric character. + rule: '!format.dns1123Subdomain().validate(self).hasValue()' required: - name type: object @@ -173,13 +181,18 @@ spec: properties: name: description: |- - name is the object name. - Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) - It may consist of only alphanumeric characters, hyphens (-) and periods (.) - and must be at most 253 characters in length. + 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. maxLength: 253 - pattern: ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$ type: string + x-kubernetes-validations: + - message: a lowercase RFC 1123 subdomain must consist of lower + case alphanumeric characters, '-' or '.', and must start and + end with an alphanumeric character. + rule: '!format.dns1123Subdomain().validate(self).hasValue()' required: - name type: object @@ -249,68 +262,86 @@ spec: - status - type type: object + maxItems: 20 type: array x-kubernetes-list-map-keys: - type x-kubernetes-list-type: map configVersion: - description: |- - configVersion describes the current and desired machine config for this node. - The current version represents the current machine config for the node and is updated after a successful update. - The desired version represents the machine config the node will attempt to update to. - This desired machine config has been compared to the current machine config and has been validated by the machine config operator as one that is valid and that exists. + description: configVersion describes the current and desired machine + config version for this node. properties: current: description: |- 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 hostname (https://tools.ietf.org/html/rfc1123) - It may consist of only alphanumeric characters, hyphens (-) and periods (.) - and must be at most 253 characters in length. + 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. maxLength: 253 - pattern: ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$ type: string + x-kubernetes-validations: + - message: a lowercase RFC 1123 subdomain must consist of lower + case alphanumeric characters, '-' or '.', and must start and + end with an alphanumeric character. + rule: '!format.dns1123Subdomain().validate(self).hasValue()' desired: description: |- 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 hostname (https://tools.ietf.org/html/rfc1123) - It may consist of only alphanumeric characters, hyphens (-) and periods (.) - and must be at most 253 characters in length. + 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. maxLength: 253 - pattern: ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$ type: string + x-kubernetes-validations: + - message: a lowercase RFC 1123 subdomain must consist of lower + case alphanumeric characters, '-' or '.', and must start and + end with an alphanumeric character. + rule: '!format.dns1123Subdomain().validate(self).hasValue()' required: - desired type: object observedGeneration: description: |- - observedGeneration represents the generation observed by the controller. + 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. format: int64 + minimum: 0 type: integer + x-kubernetes-validations: + - message: observedGeneration must not decrease + rule: self >= oldSelf pinnedImageSets: - description: |- - pinnedImageSets describes the current and desired pinned image sets for this node. - The current version is the generation of the pinned image set that has most recently been successfully pulled and pinned on this node. - The desired version is the generation of the pinned image set that is targeted to be pulled and pinned on this node. + description: pinnedImageSets describes the current and desired pinned + image sets for this node. items: + description: MachineConfigNodeStatusPinnedImageSet holds information + about the current, desired, and failed pinned image sets for the + observed machine config node. properties: currentGeneration: description: currentGeneration is the generation of the pinned image set that has most recently been successfully pulled and pinned on this node. format: int32 + minimum: 0 type: integer + x-kubernetes-validations: + - message: currentGeneration must not decrease + rule: self >= oldSelf desiredGeneration: - description: desiredGeneration version is the generation of - the pinned image set that is targeted to be pulled and pinned - on this node. + description: desiredGeneration is the generation of the pinned + image set that is targeted to be pulled and pinned on this + node. format: int32 minimum: 0 type: integer + x-kubernetes-validations: + - message: desiredGeneration must not decrease + rule: self >= oldSelf lastFailedGeneration: description: lastFailedGeneration is the generation of the most recent pinned image set that failed to be pulled and pinned @@ -318,22 +349,28 @@ spec: format: int32 minimum: 0 type: integer - lastFailedGenerationErrors: - description: lastFailedGenerationErrors is a list of errors - why the lastFailed generation failed to be pulled and pinned. - items: - type: string - maxItems: 10 - type: array + x-kubernetes-validations: + - message: lastFailedGeneration must not decrease + rule: self >= oldSelf + lastFailedGenerationError: + description: |- + 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. + maxLength: 32768 + type: string name: description: |- name is the name of the pinned image set. - Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) - It may consist of only alphanumeric characters, hyphens (-) and periods (.) - and must be at most 253 characters in length. + 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. maxLength: 253 - pattern: ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$ type: string + x-kubernetes-validations: + - message: a lowercase RFC 1123 subdomain must consist of lower + case alphanumeric characters, '-' or '.', and must start + and end with an alphanumeric character. + rule: '!format.dns1123Subdomain().validate(self).hasValue()' required: - name type: object @@ -342,13 +379,14 @@ spec: current generation rule: 'has(self.desiredGeneration) && has(self.currentGeneration) ? self.desiredGeneration >= self.currentGeneration : true' - - message: desired generation must be greater than last failed generation + - message: desired generation must be greater than or equal to the + last failed generation rule: 'has(self.lastFailedGeneration) && has(self.desiredGeneration) ? self.desiredGeneration >= self.lastFailedGeneration : true' - - message: desired generation must be defined if last failed generation - is defined - rule: 'has(self.lastFailedGeneration) ? has(self.desiredGeneration): - true' + - message: last failed generation error must be defined on image + pull and pin failure + rule: 'has(self.lastFailedGeneration) ? has(self.lastFailedGenerationError) + : true' maxItems: 100 type: array x-kubernetes-list-map-keys: @@ -356,7 +394,6 @@ spec: x-kubernetes-list-type: map required: - configVersion - - observedGeneration type: object required: - spec diff --git a/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-TechPreviewNoUpgrade.crd.yaml b/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-TechPreviewNoUpgrade.crd.yaml index 830f0734d21..6fafd384e0e 100644 --- a/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-TechPreviewNoUpgrade.crd.yaml +++ b/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-TechPreviewNoUpgrade.crd.yaml @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - api-approved.openshift.io: https://github.com/openshift/api/pull/1596 + api-approved.openshift.io: https://github.com/openshift/api/pull/2201 api.openshift.io/merged-by-featuregates: "true" include.release.openshift.io/ibm-cloud-managed: "true" include.release.openshift.io/self-managed-high-availability: "true" @@ -52,10 +52,6 @@ spec: name: Resumed priority: 1 type: string - - jsonPath: .status.conditions[?(@.type=="UpdateCompatible")].status - name: UpdateCompatible - priority: 1 - type: string - jsonPath: .status.conditions[?(@.type=="AppliedFilesAndOS")].status name: UpdatedFilesAndOS priority: 1 @@ -72,10 +68,6 @@ spec: name: RebootedNode priority: 1 type: string - - jsonPath: .status.conditions[?(@.type=="ReloadedCRIO")].status - name: ReloadedCRIO - priority: 1 - type: string - jsonPath: .status.conditions[?(@.type=="Uncordoned")].status name: UncordonedNode priority: 1 @@ -110,7 +102,7 @@ spec: configVersion: description: |- 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. This gets set before the machine config operator validates + 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. properties: desired: @@ -119,12 +111,16 @@ spec: 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 hostname (https://tools.ietf.org/html/rfc1123) - It may consist of only alphanumeric characters, hyphens (-) and periods (.) - and must be at most 253 characters in length. + 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. maxLength: 253 - pattern: ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$ type: string + x-kubernetes-validations: + - message: a lowercase RFC 1123 subdomain must consist of lower + case alphanumeric characters, '-' or '.', and must start and + end with an alphanumeric character. + rule: '!format.dns1123Subdomain().validate(self).hasValue()' required: - desired type: object @@ -134,30 +130,42 @@ spec: properties: name: description: |- - name is the object name. - Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) - It may consist of only alphanumeric characters, hyphens (-) and periods (.) - and must be at most 253 characters in length. + 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. maxLength: 253 - pattern: ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$ type: string + x-kubernetes-validations: + - message: a lowercase RFC 1123 subdomain must consist of lower + case alphanumeric characters, '-' or '.', and must start and + end with an alphanumeric character. + rule: '!format.dns1123Subdomain().validate(self).hasValue()' required: - name type: object pinnedImageSets: - description: pinnedImageSets holds the desired pinned image sets that - this node should pin and pull. + description: pinnedImageSets is a user defined value that holds the + names of the desired image sets that the node should pull and pin. items: + description: |- + MachineConfigNodeSpecPinnedImageSet holds information on the desired pinned image sets that the current observed machine config node + should pin and pull. properties: name: description: |- name is the name of the pinned image set. - Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) - It may consist of only alphanumeric characters, hyphens (-) and periods (.) - and must be at most 253 characters in length. + 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. maxLength: 253 - pattern: ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$ type: string + x-kubernetes-validations: + - message: a lowercase RFC 1123 subdomain must consist of lower + case alphanumeric characters, '-' or '.', and must start + and end with an alphanumeric character. + rule: '!format.dns1123Subdomain().validate(self).hasValue()' required: - name type: object @@ -173,13 +181,18 @@ spec: properties: name: description: |- - name is the object name. - Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) - It may consist of only alphanumeric characters, hyphens (-) and periods (.) - and must be at most 253 characters in length. + 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. maxLength: 253 - pattern: ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$ type: string + x-kubernetes-validations: + - message: a lowercase RFC 1123 subdomain must consist of lower + case alphanumeric characters, '-' or '.', and must start and + end with an alphanumeric character. + rule: '!format.dns1123Subdomain().validate(self).hasValue()' required: - name type: object @@ -249,68 +262,86 @@ spec: - status - type type: object + maxItems: 20 type: array x-kubernetes-list-map-keys: - type x-kubernetes-list-type: map configVersion: - description: |- - configVersion describes the current and desired machine config for this node. - The current version represents the current machine config for the node and is updated after a successful update. - The desired version represents the machine config the node will attempt to update to. - This desired machine config has been compared to the current machine config and has been validated by the machine config operator as one that is valid and that exists. + description: configVersion describes the current and desired machine + config version for this node. properties: current: description: |- 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 hostname (https://tools.ietf.org/html/rfc1123) - It may consist of only alphanumeric characters, hyphens (-) and periods (.) - and must be at most 253 characters in length. + 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. maxLength: 253 - pattern: ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$ type: string + x-kubernetes-validations: + - message: a lowercase RFC 1123 subdomain must consist of lower + case alphanumeric characters, '-' or '.', and must start and + end with an alphanumeric character. + rule: '!format.dns1123Subdomain().validate(self).hasValue()' desired: description: |- 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 hostname (https://tools.ietf.org/html/rfc1123) - It may consist of only alphanumeric characters, hyphens (-) and periods (.) - and must be at most 253 characters in length. + 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. maxLength: 253 - pattern: ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$ type: string + x-kubernetes-validations: + - message: a lowercase RFC 1123 subdomain must consist of lower + case alphanumeric characters, '-' or '.', and must start and + end with an alphanumeric character. + rule: '!format.dns1123Subdomain().validate(self).hasValue()' required: - desired type: object observedGeneration: description: |- - observedGeneration represents the generation observed by the controller. + 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. format: int64 + minimum: 0 type: integer + x-kubernetes-validations: + - message: observedGeneration must not decrease + rule: self >= oldSelf pinnedImageSets: - description: |- - pinnedImageSets describes the current and desired pinned image sets for this node. - The current version is the generation of the pinned image set that has most recently been successfully pulled and pinned on this node. - The desired version is the generation of the pinned image set that is targeted to be pulled and pinned on this node. + description: pinnedImageSets describes the current and desired pinned + image sets for this node. items: + description: MachineConfigNodeStatusPinnedImageSet holds information + about the current, desired, and failed pinned image sets for the + observed machine config node. properties: currentGeneration: description: currentGeneration is the generation of the pinned image set that has most recently been successfully pulled and pinned on this node. format: int32 + minimum: 0 type: integer + x-kubernetes-validations: + - message: currentGeneration must not decrease + rule: self >= oldSelf desiredGeneration: - description: desiredGeneration version is the generation of - the pinned image set that is targeted to be pulled and pinned - on this node. + description: desiredGeneration is the generation of the pinned + image set that is targeted to be pulled and pinned on this + node. format: int32 minimum: 0 type: integer + x-kubernetes-validations: + - message: desiredGeneration must not decrease + rule: self >= oldSelf lastFailedGeneration: description: lastFailedGeneration is the generation of the most recent pinned image set that failed to be pulled and pinned @@ -318,22 +349,28 @@ spec: format: int32 minimum: 0 type: integer - lastFailedGenerationErrors: - description: lastFailedGenerationErrors is a list of errors - why the lastFailed generation failed to be pulled and pinned. - items: - type: string - maxItems: 10 - type: array + x-kubernetes-validations: + - message: lastFailedGeneration must not decrease + rule: self >= oldSelf + lastFailedGenerationError: + description: |- + 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. + maxLength: 32768 + type: string name: description: |- name is the name of the pinned image set. - Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) - It may consist of only alphanumeric characters, hyphens (-) and periods (.) - and must be at most 253 characters in length. + 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. maxLength: 253 - pattern: ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$ type: string + x-kubernetes-validations: + - message: a lowercase RFC 1123 subdomain must consist of lower + case alphanumeric characters, '-' or '.', and must start + and end with an alphanumeric character. + rule: '!format.dns1123Subdomain().validate(self).hasValue()' required: - name type: object @@ -342,13 +379,14 @@ spec: current generation rule: 'has(self.desiredGeneration) && has(self.currentGeneration) ? self.desiredGeneration >= self.currentGeneration : true' - - message: desired generation must be greater than last failed generation + - message: desired generation must be greater than or equal to the + last failed generation rule: 'has(self.lastFailedGeneration) && has(self.desiredGeneration) ? self.desiredGeneration >= self.lastFailedGeneration : true' - - message: desired generation must be defined if last failed generation - is defined - rule: 'has(self.lastFailedGeneration) ? has(self.desiredGeneration): - true' + - message: last failed generation error must be defined on image + pull and pin failure + rule: 'has(self.lastFailedGeneration) ? has(self.lastFailedGenerationError) + : true' maxItems: 100 type: array x-kubernetes-list-map-keys: @@ -356,7 +394,6 @@ spec: x-kubernetes-list-type: map required: - configVersion - - observedGeneration type: object required: - spec