From dda85c36224b28e9a8cb1f7b0218203de565c4f9 Mon Sep 17 00:00:00 2001 From: Andrea Fasano Date: Thu, 23 Oct 2025 13:26:48 -0400 Subject: [PATCH 1/3] machineconfiguration/v1alpha1: add InternalReleaseImage --- .../NoRegistryClusterOperations.yaml | 87 +++ .../v1/types_machineconfignode.go | 70 ++ ...gnodes-Hypershift-CustomNoUpgrade.crd.yaml | 619 ++++++++++++++++++ ...ineconfignodes-Hypershift-Default.crd.yaml | 383 +++++++++++ ...s-Hypershift-DevPreviewNoUpgrade.crd.yaml} | 1 - ...s-Hypershift-TechPreviewNoUpgrade.crd.yaml | 1 - ...es-SelfManagedHA-CustomNoUpgrade.crd.yaml} | 121 +++- ...onfignodes-SelfManagedHA-Default.crd.yaml} | 1 - ...SelfManagedHA-DevPreviewNoUpgrade.crd.yaml | 619 ++++++++++++++++++ ...elfManagedHA-TechPreviewNoUpgrade.crd.yaml | 619 ++++++++++++++++++ .../v1/zz_generated.deepcopy.go | 47 ++ ..._generated.featuregated-crd-manifests.yaml | 1 + .../NoRegistryClusterOperations.yaml | 504 ++++++++++++++ .../v1/zz_generated.swagger_doc_generated.go | 21 + machineconfiguration/v1alpha1/register.go | 2 + .../NoRegistryClusterOperations.yaml | 43 ++ .../v1alpha1/types_internalreleaseimage.go | 125 ++++ ...rnalreleaseimages-CustomNoUpgrade.crd.yaml | 165 +++++ ...releaseimages-DevPreviewNoUpgrade.crd.yaml | 164 +++++ ...eleaseimages-TechPreviewNoUpgrade.crd.yaml | 164 +++++ .../v1alpha1/zz_generated.deepcopy.go | 144 ++++ ..._generated.featuregated-crd-manifests.yaml | 24 + .../NoRegistryClusterOperations.yaml | 165 +++++ .../zz_generated.swagger_doc_generated.go | 58 ++ .../generated_openapi/zz_generated.openapi.go | 252 +++++++ openapi/openapi.json | 143 ++++ ...gnodes-Hypershift-CustomNoUpgrade.crd.yaml | 619 ++++++++++++++++++ ...ineconfignodes-Hypershift-Default.crd.yaml | 383 +++++++++++ ...s-Hypershift-DevPreviewNoUpgrade.crd.yaml} | 1 - ...s-Hypershift-TechPreviewNoUpgrade.crd.yaml | 1 - ...es-SelfManagedHA-CustomNoUpgrade.crd.yaml} | 121 +++- ...onfignodes-SelfManagedHA-Default.crd.yaml} | 1 - ...SelfManagedHA-DevPreviewNoUpgrade.crd.yaml | 619 ++++++++++++++++++ ...elfManagedHA-TechPreviewNoUpgrade.crd.yaml | 619 ++++++++++++++++++ 34 files changed, 6899 insertions(+), 8 deletions(-) create mode 100644 machineconfiguration/v1/tests/machineconfignodes.machineconfiguration.openshift.io/NoRegistryClusterOperations.yaml create mode 100644 machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-Hypershift-CustomNoUpgrade.crd.yaml create mode 100644 machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-Hypershift-Default.crd.yaml rename machineconfiguration/v1/zz_generated.crd-manifests/{0000_80_machine-config_01_machineconfignodes-DevPreviewNoUpgrade.crd.yaml => 0000_80_machine-config_01_machineconfignodes-Hypershift-DevPreviewNoUpgrade.crd.yaml} (99%) rename payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-TechPreviewNoUpgrade.crd.yaml => machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-Hypershift-TechPreviewNoUpgrade.crd.yaml (99%) rename machineconfiguration/v1/zz_generated.crd-manifests/{0000_80_machine-config_01_machineconfignodes-CustomNoUpgrade.crd.yaml => 0000_80_machine-config_01_machineconfignodes-SelfManagedHA-CustomNoUpgrade.crd.yaml} (79%) rename machineconfiguration/v1/zz_generated.crd-manifests/{0000_80_machine-config_01_machineconfignodes-Default.crd.yaml => 0000_80_machine-config_01_machineconfignodes-SelfManagedHA-Default.crd.yaml} (99%) create mode 100644 machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-DevPreviewNoUpgrade.crd.yaml create mode 100644 machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-TechPreviewNoUpgrade.crd.yaml create mode 100644 machineconfiguration/v1/zz_generated.featuregated-crd-manifests/machineconfignodes.machineconfiguration.openshift.io/NoRegistryClusterOperations.yaml create mode 100644 machineconfiguration/v1alpha1/tests/internalreleaseimages.machineconfiguration.openshift.io/NoRegistryClusterOperations.yaml create mode 100644 machineconfiguration/v1alpha1/types_internalreleaseimage.go create mode 100644 machineconfiguration/v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_internalreleaseimages-CustomNoUpgrade.crd.yaml create mode 100644 machineconfiguration/v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_internalreleaseimages-DevPreviewNoUpgrade.crd.yaml create mode 100644 machineconfiguration/v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_internalreleaseimages-TechPreviewNoUpgrade.crd.yaml create mode 100644 machineconfiguration/v1alpha1/zz_generated.featuregated-crd-manifests/internalreleaseimages.machineconfiguration.openshift.io/NoRegistryClusterOperations.yaml create mode 100644 payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-Hypershift-CustomNoUpgrade.crd.yaml create mode 100644 payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-Hypershift-Default.crd.yaml rename payload-manifests/crds/{0000_80_machine-config_01_machineconfignodes-DevPreviewNoUpgrade.crd.yaml => 0000_80_machine-config_01_machineconfignodes-Hypershift-DevPreviewNoUpgrade.crd.yaml} (99%) rename machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-TechPreviewNoUpgrade.crd.yaml => payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-Hypershift-TechPreviewNoUpgrade.crd.yaml (99%) rename payload-manifests/crds/{0000_80_machine-config_01_machineconfignodes-CustomNoUpgrade.crd.yaml => 0000_80_machine-config_01_machineconfignodes-SelfManagedHA-CustomNoUpgrade.crd.yaml} (79%) rename payload-manifests/crds/{0000_80_machine-config_01_machineconfignodes-Default.crd.yaml => 0000_80_machine-config_01_machineconfignodes-SelfManagedHA-Default.crd.yaml} (99%) create mode 100644 payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-DevPreviewNoUpgrade.crd.yaml create mode 100644 payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-TechPreviewNoUpgrade.crd.yaml diff --git a/machineconfiguration/v1/tests/machineconfignodes.machineconfiguration.openshift.io/NoRegistryClusterOperations.yaml b/machineconfiguration/v1/tests/machineconfignodes.machineconfiguration.openshift.io/NoRegistryClusterOperations.yaml new file mode 100644 index 00000000000..1fcdc2ff572 --- /dev/null +++ b/machineconfiguration/v1/tests/machineconfignodes.machineconfiguration.openshift.io/NoRegistryClusterOperations.yaml @@ -0,0 +1,87 @@ +apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this +name: "[TechPreview] InternalReleaseImage" +crdName: machineconfignodes.machineconfiguration.openshift.io +featureGates: +- MachineConfigNodes +- NoRegistryClusterOperations +tests: + onUpdate: + - name: Should be able to update a MachineConfigNode with a minimal internalReleaseImage status field. + initial: | + apiVersion: machineconfiguration.openshift.io/v1 + kind: MachineConfigNode + metadata: + name: foobar + spec: + node: + name: foobar + pool: + name: master + configVersion: + desired: rendered-master-abc + updated: | + apiVersion: machineconfiguration.openshift.io/v1 + kind: MachineConfigNode + metadata: + name: foobar + spec: + node: + name: foobar + pool: + name: master + configVersion: + desired: rendered-master-abc + status: + internalReleaseImage: + releases: + - name: ocp-release-bundle-4.18.0-x86_64 + image: example.com/example/openshift-release-dev@sha256:d98795f7932441b30bb8bcfbbf05912875383fad1f2b3be08a22ec148d68607f + conditions: + - type: Mounted + status: "False" + reason: "Mounted" + message: "" + lastTransitionTime: "2024-12-01T08:04:21Z" + - type: Available + status: "True" + reason: "Available" + message: "Release ocp-release-bundle-4.18.0-x86_64 is currently available on node master-0" + lastTransitionTime: "2024-12-01T08:04:21Z" + - type: Degraded + status: "False" + reason: "Degraded" + message: "" + lastTransitionTime: "2024-12-01T08:04:21Z" + expected: | + apiVersion: machineconfiguration.openshift.io/v1 + kind: MachineConfigNode + metadata: + name: foobar + spec: + node: + name: foobar + pool: + name: master + configVersion: + desired: rendered-master-abc + status: + internalReleaseImage: + releases: + - name: ocp-release-bundle-4.18.0-x86_64 + image: example.com/example/openshift-release-dev@sha256:d98795f7932441b30bb8bcfbbf05912875383fad1f2b3be08a22ec148d68607f + conditions: + - type: Mounted + status: "False" + reason: "Mounted" + message: "" + lastTransitionTime: "2024-12-01T08:04:21Z" + - type: Available + status: "True" + reason: "Available" + message: "Release ocp-release-bundle-4.18.0-x86_64 is currently available on node master-0" + lastTransitionTime: "2024-12-01T08:04:21Z" + - type: Degraded + status: "False" + reason: "Degraded" + message: "" + lastTransitionTime: "2024-12-01T08:04:21Z" \ No newline at end of file diff --git a/machineconfiguration/v1/types_machineconfignode.go b/machineconfiguration/v1/types_machineconfignode.go index 97460171b0a..ca5d55334f8 100644 --- a/machineconfiguration/v1/types_machineconfignode.go +++ b/machineconfiguration/v1/types_machineconfignode.go @@ -158,8 +158,78 @@ type MachineConfigNodeStatus struct { // +kubebuilder:validation:MaxItems=32 // +optional IrreconcilableChanges []IrreconcilableChangeDiff `json:"irreconcilableChanges,omitempty"` + // internalReleaseImage describes the status of the release payloads stored in the node. + // When specified, an internalReleaseImage custom resource exists on the cluster, and the specified images will be made available on the control plane nodes. + // This field will reflect the actual on-disk state of those release images. + // +openshift:enable:FeatureGate=NoRegistryClusterOperations + // +optional + InternalReleaseImage MachineConfigNodeStatusInternalReleaseImage `json:"internalReleaseImage,omitzero,omitempty"` +} + +// MachineConfigNodeStatusInternalReleaseImage holds information about the current and discovered release bundles for the observed machine +// config node. +type MachineConfigNodeStatusInternalReleaseImage struct { + // releases is a list of the release bundles currently owned and managed by the + // cluster, indicating that their images can be safely pulled by any cluster entity + // requiring them. + // This field can contain between 1 and 5 entries. + // +listType=map + // +listMapKey=name + // +kubebuilder:validation:MinItems=1 + // +kubebuilder:validation:MaxItems=5 + // +required + Releases []MachineConfigNodeStatusInternalReleaseImageRef `json:"releases,omitempty"` } +// MachineConfigNodeStatusInternalReleaseImageRef is used to provide a more detailed reference for +// a release bundle. +// +openshift:enable:FeatureGate=NoRegistryClusterOperations +type MachineConfigNodeStatusInternalReleaseImageRef struct { + // conditions represent the observations of an internal release image current state. See InternalReleaseImageConditionType for the possible + // type values. + // +listType=map + // +listMapKey=type + // +kubebuilder:validation:MinItems=1 + // +kubebuilder:validation:MaxItems=5 + // +optional + Conditions []metav1.Condition `json:"conditions,omitempty"` + // name indicates the desired release bundle identifier. This field is required and must be between 1 and 64 characters long. + // +kubebuilder:validation:MinLength=1 + // +kubebuilder:validation:MaxLength=64 + // +required + Name string `json:"name,omitempty"` + // image is an OCP release image referenced by digest. + // The format of the image pull spec is: host[:port][/namespace]/name@sha256:, + // where the digest must be 64 characters long, and consist only of lowercase hexadecimal characters, a-f and 0-9. + // The length of the whole spec must be between 1 to 447 characters. + // +kubebuilder:validation:MinLength=1 + // +kubebuilder:validation:MaxLength=447 + // +kubebuilder:validation:XValidation:rule=`(self.split('@').size() == 2 && self.split('@')[1].matches('^sha256:[a-f0-9]{64}$'))`,message="the OCI Image reference must end with a valid '@sha256:' suffix, where '' is 64 characters long" + // +kubebuilder:validation:XValidation:rule=`(self.split('@')[0].matches('^([a-zA-Z0-9-]+\\.)+[a-zA-Z0-9-]+(:[0-9]{2,5})?/([a-zA-Z0-9-_]{0,61}/)?[a-zA-Z0-9-_.]*?$'))`,message="the OCI Image name should follow the host[:port][/namespace]/name format, resembling a valid URL without the scheme" + // +required + Image string `json:"image,omitempty"` +} + +// InternalReleaseImageConditionType is each possible state for each possible MachineConfigNodeStatusInternalReleaseImageRef +// conditions type. +// +enum +type InternalReleaseImageConditionType string + +const ( + // InternalReleaseImageConditionTypeMounted describes a new release, not yet installed, that has been discovered when an ISO has been attached to + // the current node + InternalReleaseImageConditionTypeMounted InternalReleaseImageConditionType = "Mounted" + // InternalReleaseImageConditionTypeInstalling describes a new release that is getting installed on the current node. Due the size of the data + // transfered, the operation could take several minutes + InternalReleaseImageConditionTypeInstalling InternalReleaseImageConditionType = "Installing" + // InternalReleaseImageConditionTypeAvailable describes a release that has been successfully installed on the current node, ready to be consumed + InternalReleaseImageConditionTypeAvailable InternalReleaseImageConditionType = "Available" + // InternalReleaseImageConditionTypeRemoving describes an existing release that is getting removed from the current node + InternalReleaseImageConditionTypeRemoving InternalReleaseImageConditionType = "Removing" + // InternalReleaseImageConditionTypeDegraded describes a failure for the current release + InternalReleaseImageConditionTypeDegraded InternalReleaseImageConditionType = "Degraded" +) + // IrreconcilableChangeDiff holds an individual diff between the initial install-time MachineConfig // and the latest applied one caused by the presence of irreconcilable changes. type IrreconcilableChangeDiff struct { diff --git a/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-Hypershift-CustomNoUpgrade.crd.yaml b/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-Hypershift-CustomNoUpgrade.crd.yaml new file mode 100644 index 00000000000..c1956dde36c --- /dev/null +++ b/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-Hypershift-CustomNoUpgrade.crd.yaml @@ -0,0 +1,619 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + api-approved.openshift.io: https://github.com/openshift/api/pull/2255 + api.openshift.io/merged-by-featuregates: "true" + include.release.openshift.io/ibm-cloud-managed: "true" + release.openshift.io/feature-set: CustomNoUpgrade + labels: + openshift.io/operator-managed: "" + name: machineconfignodes.machineconfiguration.openshift.io +spec: + group: machineconfiguration.openshift.io + names: + kind: MachineConfigNode + listKind: MachineConfigNodeList + plural: machineconfignodes + singular: machineconfignode + scope: Cluster + versions: + - additionalPrinterColumns: + - jsonPath: .spec.pool.name + name: PoolName + type: string + - jsonPath: .spec.configVersion.desired + name: DesiredConfig + type: string + - jsonPath: .status.configVersion.current + name: CurrentConfig + type: string + - jsonPath: .status.conditions[?(@.type=="Updated")].status + name: Updated + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + - jsonPath: .status.conditions[?(@.type=="UpdatePrepared")].status + name: UpdatePrepared + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="UpdateExecuted")].status + name: UpdateExecuted + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="UpdatePostActionComplete")].status + name: UpdatePostActionComplete + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="UpdateComplete")].status + name: UpdateComplete + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="Resumed")].status + name: Resumed + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="AppliedFilesAndOS")].status + name: UpdatedFilesAndOS + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="Cordoned")].status + name: CordonedNode + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="Drained")].status + name: DrainedNode + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="RebootedNode")].status + name: RebootedNode + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="Uncordoned")].status + name: UncordonedNode + priority: 1 + type: string + name: v1 + schema: + openAPIV3Schema: + description: |- + MachineConfigNode describes the health of the Machines on the system + Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: spec describes the configuration of the machine config node. + properties: + configImage: + description: |- + configImage is an optional field for configuring the OS image to be used for this node. This field will only exist if the node belongs to a pool opted into on-cluster image builds, and will override any MachineConfig referenced OSImageURL fields + When omitted, Image Mode is not be enabled and the node will follow the standard update process of creating a rendered MachineConfig and updating to its specifications. + When specified, Image Mode is enabled and will attempt to update the node to use the desired image. Following this, the node will follow the standard update process of creating a rendered MachineConfig and updating to its specifications. + properties: + desiredImage: + description: |- + desiredImage is a required field that configures the image that the node should be updated to use. + It must be a fully qualified OCI image pull spec of the format host[:port][/namespace]/name@sha256:, where the digest must be exactly 64 characters in length and consist only of lowercase hexadecimal characters, a-f and 0-9. + desiredImage must not be an empty string and must not exceed 447 characters in length. + maxLength: 447 + minLength: 1 + type: string + x-kubernetes-validations: + - message: the OCI Image reference must end with a valid '@sha256:' + suffix, where '' is 64 characters long + rule: (self.split('@').size() == 2 && self.split('@')[1].matches('^sha256:[a-f0-9]{64}$')) + - message: the OCI Image name should follow the host[:port][/namespace]/name + format, resembling a valid URL without the scheme + rule: (self.split('@')[0].matches('^([a-zA-Z0-9-]+\\.)+[a-zA-Z0-9-]+(:[0-9]{2,5})?/([a-zA-Z0-9-_]{0,61}/)?[a-zA-Z0-9-_.]*?$')) + required: + - desiredImage + type: object + 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 and gets set before the machine config operator validates + the new machine config against the current machine config. + 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 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 + 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 + node: + description: node contains a reference to the node for this machine + config node. + properties: + name: + 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. + maxLength: 253 + 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 + pool: + description: |- + pool contains a reference to the machine config pool that this machine config node's + referenced node belongs to. + properties: + name: + 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. + maxLength: 253 + 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 + required: + - configVersion + - node + - pool + type: object + status: + description: status describes the last observed state of this machine + config node. + properties: + conditions: + description: |- + conditions represent the observations of a machine config node's current state. Valid types are: + UpdatePrepared, UpdateExecuted, UpdatePostActionComplete, UpdateComplete, Updated, Resumed, + Drained, AppliedFilesAndOS, Cordoned, Uncordoned, RebootedNode, NodeDegraded, PinnedImageSetsProgressing, + and PinnedImageSetsDegraded. + The following types are only available when the ImageModeStatusReporting feature gate is enabled: ImagePulledFromRegistry, + AppliedOSImage, AppliedFiles + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 20 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + configImage: + description: |- + configImage is an optional field for configuring the OS image to be used for this node. This field will only exist if the node belongs to a pool opted into on-cluster image builds, and will override any MachineConfig referenced OSImageURL fields. + When omitted, this means that the Image Mode feature is not being used and the node will be up to date with the specific current rendered config version for the nodes MachinePool. + When specified, the Image Mode feature is enabled and the contents of this field show the observed state of the node image. + When Image Mode is enabled and a new MachineConfig is applied such that a new OS image build is not created, only the configVersion field will change. + When Image Mode is enabled and a new MachineConfig is applied such that a new OS image build is created, then only the configImage field will change. It is also possible that both the configImage + and configVersion change during the same update. + minProperties: 1 + properties: + currentImage: + description: |- + currentImage is an optional field that represents the current image that is applied to the node. + When omitted, this means that no image updates have been applied to the node and it will be up to date with the specific current rendered config version. + When specified, this means that the node is currently using this image. + currentImage must be a fully qualified OCI image pull spec of the format host[:port][/namespace]/name@sha256:, where the digest must be exactly 64 characters in length and consist only of lowercase hexadecimal characters, a-f and 0-9. + currentImage must not be an empty string and must not exceed 447 characters in length. + maxLength: 447 + minLength: 1 + type: string + x-kubernetes-validations: + - message: the OCI Image reference must end with a valid '@sha256:' + suffix, where '' is 64 characters long + rule: (self.split('@').size() == 2 && self.split('@')[1].matches('^sha256:[a-f0-9]{64}$')) + - message: the OCI Image name should follow the host[:port][/namespace]/name + format, resembling a valid URL without the scheme + rule: (self.split('@')[0].matches('^([a-zA-Z0-9-]+\\.)+[a-zA-Z0-9-]+(:[0-9]{2,5})?/([a-zA-Z0-9-_]{0,61}/)?[a-zA-Z0-9-_.]*?$')) + desiredImage: + description: |- + desiredImage is an optional field that represents the currently observed state of image that the node should be updated to use. + When not specified, this means that Image Mode has been disabled and the node will up to date with the specific current rendered config version. + When specified, this means that Image Mode has been enabled and the node is actively progressing to update the node to this image. + If currentImage and desiredImage match, the node has been successfully updated to use the desired image. + desiredImage must be a fully qualified OCI image pull spec of the format host[:port][/namespace]/name@sha256:, where the digest must be exactly 64 characters in length and consist only of lowercase hexadecimal characters, a-f and 0-9. + desiredImage must not be an empty string and must not exceed 447 characters in length. + maxLength: 447 + minLength: 1 + type: string + x-kubernetes-validations: + - message: the OCI Image reference must end with a valid '@sha256:' + suffix, where '' is 64 characters long + rule: (self.split('@').size() == 2 && self.split('@')[1].matches('^sha256:[a-f0-9]{64}$')) + - message: the OCI Image name should follow the host[:port][/namespace]/name + format, resembling a valid URL without the scheme + rule: (self.split('@')[0].matches('^([a-zA-Z0-9-]+\\.)+[a-zA-Z0-9-]+(:[0-9]{2,5})?/([a-zA-Z0-9-_]{0,61}/)?[a-zA-Z0-9-_.]*?$')) + type: object + configVersion: + 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 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 + 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 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 + 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 + internalReleaseImage: + description: |- + internalReleaseImage describes the status of the release payloads stored in the node. + When specified, an internalReleaseImage custom resource exists on the cluster, and the specified images will be made available on the control plane nodes. + This field will reflect the actual on-disk state of those release images. + properties: + releases: + description: |- + releases is a list of the release bundles currently owned and managed by the + cluster, indicating that their images can be safely pulled by any cluster entity + requiring them. + This field can contain between 1 and 5 entries. + items: + description: |- + MachineConfigNodeStatusInternalReleaseImageRef is used to provide a more detailed reference for + a release bundle. + properties: + conditions: + description: |- + conditions represent the observations of an internal release image current state. See InternalReleaseImageConditionType for the possible + type values. + items: + description: Condition contains details for one aspect + of the current state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, + False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in + foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 5 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + image: + description: |- + image is an OCP release image referenced by digest. + The format of the image pull spec is: host[:port][/namespace]/name@sha256:, + where the digest must be 64 characters long, and consist only of lowercase hexadecimal characters, a-f and 0-9. + The length of the whole spec must be between 1 to 447 characters. + maxLength: 447 + minLength: 1 + type: string + x-kubernetes-validations: + - message: the OCI Image reference must end with a valid + '@sha256:' suffix, where '' is 64 characters + long + rule: (self.split('@').size() == 2 && self.split('@')[1].matches('^sha256:[a-f0-9]{64}$')) + - message: the OCI Image name should follow the host[:port][/namespace]/name + format, resembling a valid URL without the scheme + rule: (self.split('@')[0].matches('^([a-zA-Z0-9-]+\\.)+[a-zA-Z0-9-]+(:[0-9]{2,5})?/([a-zA-Z0-9-_]{0,61}/)?[a-zA-Z0-9-_.]*?$')) + name: + description: name indicates the desired release bundle identifier. + This field is required and must be between 1 and 64 characters + long. + maxLength: 64 + minLength: 1 + type: string + required: + - image + - name + type: object + maxItems: 5 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + required: + - releases + type: object + irreconcilableChanges: + description: |- + irreconcilableChanges is an optional field that contains the observed differences between this nodes + configuration and the target rendered MachineConfig. + This field will be set when there are changes to the target rendered MachineConfig that can only be applied to + new nodes joining the cluster. + Entries must be unique, keyed on the fieldPath field. + Must not exceed 32 entries. + items: + description: |- + IrreconcilableChangeDiff holds an individual diff between the initial install-time MachineConfig + and the latest applied one caused by the presence of irreconcilable changes. + properties: + diff: + description: |- + diff is a required field containing the difference between the nodes current configuration and the latest + rendered MachineConfig for the field specified in fieldPath. + Must not be an empty string and must not exceed 4096 characters in length. + maxLength: 4096 + minLength: 1 + type: string + fieldPath: + description: |- + fieldPath is a required reference to the path in the latest rendered MachineConfig that differs from this nodes + configuration. + Must not be empty and must not exceed 70 characters in length. + Must begin with the prefix 'spec.' and only contain alphanumeric characters, square brackets ('[]'), or dots ('.'). + maxLength: 70 + minLength: 1 + type: string + x-kubernetes-validations: + - message: The fieldPath must start with `spec.` + rule: self.startsWith('spec.') + - message: The fieldPath must consist only of alphanumeric characters, + brackets [] and dots ('.'). + rule: self.matches('^[\\da-zA-Z\\.\\[\\]]+$') + required: + - diff + - fieldPath + type: object + maxItems: 32 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - fieldPath + x-kubernetes-list-type: map + observedGeneration: + 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. + format: int64 + minimum: 1 + 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. + 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: 1 + type: integer + x-kubernetes-validations: + - message: currentGeneration must not decrease + rule: self >= oldSelf + desiredGeneration: + description: desiredGeneration is the generation of the pinned + image set that is targeted to be pulled and pinned on this + node. + format: int32 + minimum: 1 + 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 + on this node. + format: int32 + minimum: 1 + type: integer + 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 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 + 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 + x-kubernetes-validations: + - message: desired generation must be greater than or equal to the + current generation + rule: 'has(self.desiredGeneration) && has(self.currentGeneration) + ? self.desiredGeneration >= self.currentGeneration : true' + - 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: 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: + - name + x-kubernetes-list-type: map + type: object + required: + - spec + type: object + x-kubernetes-validations: + - message: spec.node.name should match metadata.name + rule: self.metadata.name == self.spec.node.name + served: true + storage: true + subresources: + status: {} diff --git a/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-Hypershift-Default.crd.yaml b/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-Hypershift-Default.crd.yaml new file mode 100644 index 00000000000..b05742e01ee --- /dev/null +++ b/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-Hypershift-Default.crd.yaml @@ -0,0 +1,383 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + api-approved.openshift.io: https://github.com/openshift/api/pull/2255 + api.openshift.io/merged-by-featuregates: "true" + include.release.openshift.io/ibm-cloud-managed: "true" + release.openshift.io/feature-set: Default + labels: + openshift.io/operator-managed: "" + name: machineconfignodes.machineconfiguration.openshift.io +spec: + group: machineconfiguration.openshift.io + names: + kind: MachineConfigNode + listKind: MachineConfigNodeList + plural: machineconfignodes + singular: machineconfignode + scope: Cluster + versions: + - additionalPrinterColumns: + - jsonPath: .spec.pool.name + name: PoolName + type: string + - jsonPath: .spec.configVersion.desired + name: DesiredConfig + type: string + - jsonPath: .status.configVersion.current + name: CurrentConfig + type: string + - jsonPath: .status.conditions[?(@.type=="Updated")].status + name: Updated + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + - jsonPath: .status.conditions[?(@.type=="UpdatePrepared")].status + name: UpdatePrepared + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="UpdateExecuted")].status + name: UpdateExecuted + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="UpdatePostActionComplete")].status + name: UpdatePostActionComplete + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="UpdateComplete")].status + name: UpdateComplete + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="Resumed")].status + name: Resumed + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="AppliedFilesAndOS")].status + name: UpdatedFilesAndOS + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="Cordoned")].status + name: CordonedNode + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="Drained")].status + name: DrainedNode + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="RebootedNode")].status + name: RebootedNode + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="Uncordoned")].status + name: UncordonedNode + priority: 1 + type: string + name: v1 + schema: + openAPIV3Schema: + description: |- + MachineConfigNode describes the health of the Machines on the system + Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: spec describes the configuration of the machine config node. + 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 and gets set before the machine config operator validates + the new machine config against the current machine config. + 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 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 + 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 + node: + description: node contains a reference to the node for this machine + config node. + properties: + name: + 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. + maxLength: 253 + 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 + pool: + description: |- + pool contains a reference to the machine config pool that this machine config node's + referenced node belongs to. + properties: + name: + 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. + maxLength: 253 + 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 + required: + - configVersion + - node + - pool + type: object + status: + description: status describes the last observed state of this machine + config node. + properties: + conditions: + description: |- + conditions represent the observations of a machine config node's current state. Valid types are: + UpdatePrepared, UpdateExecuted, UpdatePostActionComplete, UpdateComplete, Updated, Resumed, + Drained, AppliedFilesAndOS, Cordoned, Uncordoned, RebootedNode, NodeDegraded, PinnedImageSetsProgressing, + and PinnedImageSetsDegraded. + The following types are only available when the ImageModeStatusReporting feature gate is enabled: ImagePulledFromRegistry, + AppliedOSImage, AppliedFiles + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - 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 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 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 + 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 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 + 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 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: 1 + 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. + 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: 1 + type: integer + x-kubernetes-validations: + - message: currentGeneration must not decrease + rule: self >= oldSelf + desiredGeneration: + description: desiredGeneration is the generation of the pinned + image set that is targeted to be pulled and pinned on this + node. + format: int32 + minimum: 1 + 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 + on this node. + format: int32 + minimum: 1 + type: integer + 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 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 + 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 + x-kubernetes-validations: + - message: desired generation must be greater than or equal to the + current generation + rule: 'has(self.desiredGeneration) && has(self.currentGeneration) + ? self.desiredGeneration >= self.currentGeneration : true' + - 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: 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: + - name + x-kubernetes-list-type: map + type: object + required: + - spec + type: object + x-kubernetes-validations: + - message: spec.node.name should match metadata.name + rule: self.metadata.name == self.spec.node.name + served: true + storage: true + subresources: + status: {} diff --git a/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-DevPreviewNoUpgrade.crd.yaml b/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-Hypershift-DevPreviewNoUpgrade.crd.yaml similarity index 99% rename from machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-DevPreviewNoUpgrade.crd.yaml rename to machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-Hypershift-DevPreviewNoUpgrade.crd.yaml index 15523b5db10..4e0cddf98e2 100644 --- a/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-DevPreviewNoUpgrade.crd.yaml +++ b/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-Hypershift-DevPreviewNoUpgrade.crd.yaml @@ -5,7 +5,6 @@ metadata: api-approved.openshift.io: https://github.com/openshift/api/pull/2255 api.openshift.io/merged-by-featuregates: "true" include.release.openshift.io/ibm-cloud-managed: "true" - include.release.openshift.io/self-managed-high-availability: "true" release.openshift.io/feature-set: DevPreviewNoUpgrade labels: openshift.io/operator-managed: "" diff --git a/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-TechPreviewNoUpgrade.crd.yaml b/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-Hypershift-TechPreviewNoUpgrade.crd.yaml similarity index 99% rename from payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-TechPreviewNoUpgrade.crd.yaml rename to machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-Hypershift-TechPreviewNoUpgrade.crd.yaml index 02402f75056..1022ae3ccb4 100644 --- a/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-TechPreviewNoUpgrade.crd.yaml +++ b/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-Hypershift-TechPreviewNoUpgrade.crd.yaml @@ -5,7 +5,6 @@ metadata: api-approved.openshift.io: https://github.com/openshift/api/pull/2255 api.openshift.io/merged-by-featuregates: "true" include.release.openshift.io/ibm-cloud-managed: "true" - include.release.openshift.io/self-managed-high-availability: "true" release.openshift.io/feature-set: TechPreviewNoUpgrade labels: openshift.io/operator-managed: "" diff --git a/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-CustomNoUpgrade.crd.yaml b/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-CustomNoUpgrade.crd.yaml similarity index 79% rename from machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-CustomNoUpgrade.crd.yaml rename to machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-CustomNoUpgrade.crd.yaml index 03e01cd2f60..727733b84ea 100644 --- a/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-CustomNoUpgrade.crd.yaml +++ b/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-CustomNoUpgrade.crd.yaml @@ -4,7 +4,6 @@ metadata: annotations: api-approved.openshift.io: https://github.com/openshift/api/pull/2255 api.openshift.io/merged-by-featuregates: "true" - include.release.openshift.io/ibm-cloud-managed: "true" include.release.openshift.io/self-managed-high-availability: "true" release.openshift.io/feature-set: CustomNoUpgrade labels: @@ -353,6 +352,126 @@ spec: required: - desired type: object + internalReleaseImage: + description: |- + internalReleaseImage describes the status of the release payloads stored in the node. + When specified, an internalReleaseImage custom resource exists on the cluster, and the specified images will be made available on the control plane nodes. + This field will reflect the actual on-disk state of those release images. + properties: + releases: + description: |- + releases is a list of the release bundles currently owned and managed by the + cluster, indicating that their images can be safely pulled by any cluster entity + requiring them. + This field can contain between 1 and 5 entries. + items: + description: |- + MachineConfigNodeStatusInternalReleaseImageRef is used to provide a more detailed reference for + a release bundle. + properties: + conditions: + description: |- + conditions represent the observations of an internal release image current state. See InternalReleaseImageConditionType for the possible + type values. + items: + description: Condition contains details for one aspect + of the current state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, + False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in + foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 5 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + image: + description: |- + image is an OCP release image referenced by digest. + The format of the image pull spec is: host[:port][/namespace]/name@sha256:, + where the digest must be 64 characters long, and consist only of lowercase hexadecimal characters, a-f and 0-9. + The length of the whole spec must be between 1 to 447 characters. + maxLength: 447 + minLength: 1 + type: string + x-kubernetes-validations: + - message: the OCI Image reference must end with a valid + '@sha256:' suffix, where '' is 64 characters + long + rule: (self.split('@').size() == 2 && self.split('@')[1].matches('^sha256:[a-f0-9]{64}$')) + - message: the OCI Image name should follow the host[:port][/namespace]/name + format, resembling a valid URL without the scheme + rule: (self.split('@')[0].matches('^([a-zA-Z0-9-]+\\.)+[a-zA-Z0-9-]+(:[0-9]{2,5})?/([a-zA-Z0-9-_]{0,61}/)?[a-zA-Z0-9-_.]*?$')) + name: + description: name indicates the desired release bundle identifier. + This field is required and must be between 1 and 64 characters + long. + maxLength: 64 + minLength: 1 + type: string + required: + - image + - name + type: object + maxItems: 5 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + required: + - releases + type: object irreconcilableChanges: description: |- irreconcilableChanges is an optional field that contains the observed differences between this nodes diff --git a/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-Default.crd.yaml b/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-Default.crd.yaml similarity index 99% rename from machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-Default.crd.yaml rename to machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-Default.crd.yaml index 4e96be5ea9e..84e5ff76260 100644 --- a/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-Default.crd.yaml +++ b/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-Default.crd.yaml @@ -4,7 +4,6 @@ metadata: annotations: api-approved.openshift.io: https://github.com/openshift/api/pull/2255 api.openshift.io/merged-by-featuregates: "true" - include.release.openshift.io/ibm-cloud-managed: "true" include.release.openshift.io/self-managed-high-availability: "true" release.openshift.io/feature-set: Default labels: diff --git a/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-DevPreviewNoUpgrade.crd.yaml b/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-DevPreviewNoUpgrade.crd.yaml new file mode 100644 index 00000000000..0b8e0d0ee4c --- /dev/null +++ b/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-DevPreviewNoUpgrade.crd.yaml @@ -0,0 +1,619 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + api-approved.openshift.io: https://github.com/openshift/api/pull/2255 + api.openshift.io/merged-by-featuregates: "true" + include.release.openshift.io/self-managed-high-availability: "true" + release.openshift.io/feature-set: DevPreviewNoUpgrade + labels: + openshift.io/operator-managed: "" + name: machineconfignodes.machineconfiguration.openshift.io +spec: + group: machineconfiguration.openshift.io + names: + kind: MachineConfigNode + listKind: MachineConfigNodeList + plural: machineconfignodes + singular: machineconfignode + scope: Cluster + versions: + - additionalPrinterColumns: + - jsonPath: .spec.pool.name + name: PoolName + type: string + - jsonPath: .spec.configVersion.desired + name: DesiredConfig + type: string + - jsonPath: .status.configVersion.current + name: CurrentConfig + type: string + - jsonPath: .status.conditions[?(@.type=="Updated")].status + name: Updated + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + - jsonPath: .status.conditions[?(@.type=="UpdatePrepared")].status + name: UpdatePrepared + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="UpdateExecuted")].status + name: UpdateExecuted + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="UpdatePostActionComplete")].status + name: UpdatePostActionComplete + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="UpdateComplete")].status + name: UpdateComplete + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="Resumed")].status + name: Resumed + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="AppliedFilesAndOS")].status + name: UpdatedFilesAndOS + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="Cordoned")].status + name: CordonedNode + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="Drained")].status + name: DrainedNode + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="RebootedNode")].status + name: RebootedNode + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="Uncordoned")].status + name: UncordonedNode + priority: 1 + type: string + name: v1 + schema: + openAPIV3Schema: + description: |- + MachineConfigNode describes the health of the Machines on the system + Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: spec describes the configuration of the machine config node. + properties: + configImage: + description: |- + configImage is an optional field for configuring the OS image to be used for this node. This field will only exist if the node belongs to a pool opted into on-cluster image builds, and will override any MachineConfig referenced OSImageURL fields + When omitted, Image Mode is not be enabled and the node will follow the standard update process of creating a rendered MachineConfig and updating to its specifications. + When specified, Image Mode is enabled and will attempt to update the node to use the desired image. Following this, the node will follow the standard update process of creating a rendered MachineConfig and updating to its specifications. + properties: + desiredImage: + description: |- + desiredImage is a required field that configures the image that the node should be updated to use. + It must be a fully qualified OCI image pull spec of the format host[:port][/namespace]/name@sha256:, where the digest must be exactly 64 characters in length and consist only of lowercase hexadecimal characters, a-f and 0-9. + desiredImage must not be an empty string and must not exceed 447 characters in length. + maxLength: 447 + minLength: 1 + type: string + x-kubernetes-validations: + - message: the OCI Image reference must end with a valid '@sha256:' + suffix, where '' is 64 characters long + rule: (self.split('@').size() == 2 && self.split('@')[1].matches('^sha256:[a-f0-9]{64}$')) + - message: the OCI Image name should follow the host[:port][/namespace]/name + format, resembling a valid URL without the scheme + rule: (self.split('@')[0].matches('^([a-zA-Z0-9-]+\\.)+[a-zA-Z0-9-]+(:[0-9]{2,5})?/([a-zA-Z0-9-_]{0,61}/)?[a-zA-Z0-9-_.]*?$')) + required: + - desiredImage + type: object + 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 and gets set before the machine config operator validates + the new machine config against the current machine config. + 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 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 + 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 + node: + description: node contains a reference to the node for this machine + config node. + properties: + name: + 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. + maxLength: 253 + 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 + pool: + description: |- + pool contains a reference to the machine config pool that this machine config node's + referenced node belongs to. + properties: + name: + 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. + maxLength: 253 + 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 + required: + - configVersion + - node + - pool + type: object + status: + description: status describes the last observed state of this machine + config node. + properties: + conditions: + description: |- + conditions represent the observations of a machine config node's current state. Valid types are: + UpdatePrepared, UpdateExecuted, UpdatePostActionComplete, UpdateComplete, Updated, Resumed, + Drained, AppliedFilesAndOS, Cordoned, Uncordoned, RebootedNode, NodeDegraded, PinnedImageSetsProgressing, + and PinnedImageSetsDegraded. + The following types are only available when the ImageModeStatusReporting feature gate is enabled: ImagePulledFromRegistry, + AppliedOSImage, AppliedFiles + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 20 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + configImage: + description: |- + configImage is an optional field for configuring the OS image to be used for this node. This field will only exist if the node belongs to a pool opted into on-cluster image builds, and will override any MachineConfig referenced OSImageURL fields. + When omitted, this means that the Image Mode feature is not being used and the node will be up to date with the specific current rendered config version for the nodes MachinePool. + When specified, the Image Mode feature is enabled and the contents of this field show the observed state of the node image. + When Image Mode is enabled and a new MachineConfig is applied such that a new OS image build is not created, only the configVersion field will change. + When Image Mode is enabled and a new MachineConfig is applied such that a new OS image build is created, then only the configImage field will change. It is also possible that both the configImage + and configVersion change during the same update. + minProperties: 1 + properties: + currentImage: + description: |- + currentImage is an optional field that represents the current image that is applied to the node. + When omitted, this means that no image updates have been applied to the node and it will be up to date with the specific current rendered config version. + When specified, this means that the node is currently using this image. + currentImage must be a fully qualified OCI image pull spec of the format host[:port][/namespace]/name@sha256:, where the digest must be exactly 64 characters in length and consist only of lowercase hexadecimal characters, a-f and 0-9. + currentImage must not be an empty string and must not exceed 447 characters in length. + maxLength: 447 + minLength: 1 + type: string + x-kubernetes-validations: + - message: the OCI Image reference must end with a valid '@sha256:' + suffix, where '' is 64 characters long + rule: (self.split('@').size() == 2 && self.split('@')[1].matches('^sha256:[a-f0-9]{64}$')) + - message: the OCI Image name should follow the host[:port][/namespace]/name + format, resembling a valid URL without the scheme + rule: (self.split('@')[0].matches('^([a-zA-Z0-9-]+\\.)+[a-zA-Z0-9-]+(:[0-9]{2,5})?/([a-zA-Z0-9-_]{0,61}/)?[a-zA-Z0-9-_.]*?$')) + desiredImage: + description: |- + desiredImage is an optional field that represents the currently observed state of image that the node should be updated to use. + When not specified, this means that Image Mode has been disabled and the node will up to date with the specific current rendered config version. + When specified, this means that Image Mode has been enabled and the node is actively progressing to update the node to this image. + If currentImage and desiredImage match, the node has been successfully updated to use the desired image. + desiredImage must be a fully qualified OCI image pull spec of the format host[:port][/namespace]/name@sha256:, where the digest must be exactly 64 characters in length and consist only of lowercase hexadecimal characters, a-f and 0-9. + desiredImage must not be an empty string and must not exceed 447 characters in length. + maxLength: 447 + minLength: 1 + type: string + x-kubernetes-validations: + - message: the OCI Image reference must end with a valid '@sha256:' + suffix, where '' is 64 characters long + rule: (self.split('@').size() == 2 && self.split('@')[1].matches('^sha256:[a-f0-9]{64}$')) + - message: the OCI Image name should follow the host[:port][/namespace]/name + format, resembling a valid URL without the scheme + rule: (self.split('@')[0].matches('^([a-zA-Z0-9-]+\\.)+[a-zA-Z0-9-]+(:[0-9]{2,5})?/([a-zA-Z0-9-_]{0,61}/)?[a-zA-Z0-9-_.]*?$')) + type: object + configVersion: + 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 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 + 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 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 + 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 + internalReleaseImage: + description: |- + internalReleaseImage describes the status of the release payloads stored in the node. + When specified, an internalReleaseImage custom resource exists on the cluster, and the specified images will be made available on the control plane nodes. + This field will reflect the actual on-disk state of those release images. + properties: + releases: + description: |- + releases is a list of the release bundles currently owned and managed by the + cluster, indicating that their images can be safely pulled by any cluster entity + requiring them. + This field can contain between 1 and 5 entries. + items: + description: |- + MachineConfigNodeStatusInternalReleaseImageRef is used to provide a more detailed reference for + a release bundle. + properties: + conditions: + description: |- + conditions represent the observations of an internal release image current state. See InternalReleaseImageConditionType for the possible + type values. + items: + description: Condition contains details for one aspect + of the current state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, + False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in + foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 5 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + image: + description: |- + image is an OCP release image referenced by digest. + The format of the image pull spec is: host[:port][/namespace]/name@sha256:, + where the digest must be 64 characters long, and consist only of lowercase hexadecimal characters, a-f and 0-9. + The length of the whole spec must be between 1 to 447 characters. + maxLength: 447 + minLength: 1 + type: string + x-kubernetes-validations: + - message: the OCI Image reference must end with a valid + '@sha256:' suffix, where '' is 64 characters + long + rule: (self.split('@').size() == 2 && self.split('@')[1].matches('^sha256:[a-f0-9]{64}$')) + - message: the OCI Image name should follow the host[:port][/namespace]/name + format, resembling a valid URL without the scheme + rule: (self.split('@')[0].matches('^([a-zA-Z0-9-]+\\.)+[a-zA-Z0-9-]+(:[0-9]{2,5})?/([a-zA-Z0-9-_]{0,61}/)?[a-zA-Z0-9-_.]*?$')) + name: + description: name indicates the desired release bundle identifier. + This field is required and must be between 1 and 64 characters + long. + maxLength: 64 + minLength: 1 + type: string + required: + - image + - name + type: object + maxItems: 5 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + required: + - releases + type: object + irreconcilableChanges: + description: |- + irreconcilableChanges is an optional field that contains the observed differences between this nodes + configuration and the target rendered MachineConfig. + This field will be set when there are changes to the target rendered MachineConfig that can only be applied to + new nodes joining the cluster. + Entries must be unique, keyed on the fieldPath field. + Must not exceed 32 entries. + items: + description: |- + IrreconcilableChangeDiff holds an individual diff between the initial install-time MachineConfig + and the latest applied one caused by the presence of irreconcilable changes. + properties: + diff: + description: |- + diff is a required field containing the difference between the nodes current configuration and the latest + rendered MachineConfig for the field specified in fieldPath. + Must not be an empty string and must not exceed 4096 characters in length. + maxLength: 4096 + minLength: 1 + type: string + fieldPath: + description: |- + fieldPath is a required reference to the path in the latest rendered MachineConfig that differs from this nodes + configuration. + Must not be empty and must not exceed 70 characters in length. + Must begin with the prefix 'spec.' and only contain alphanumeric characters, square brackets ('[]'), or dots ('.'). + maxLength: 70 + minLength: 1 + type: string + x-kubernetes-validations: + - message: The fieldPath must start with `spec.` + rule: self.startsWith('spec.') + - message: The fieldPath must consist only of alphanumeric characters, + brackets [] and dots ('.'). + rule: self.matches('^[\\da-zA-Z\\.\\[\\]]+$') + required: + - diff + - fieldPath + type: object + maxItems: 32 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - fieldPath + x-kubernetes-list-type: map + observedGeneration: + 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. + format: int64 + minimum: 1 + 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. + 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: 1 + type: integer + x-kubernetes-validations: + - message: currentGeneration must not decrease + rule: self >= oldSelf + desiredGeneration: + description: desiredGeneration is the generation of the pinned + image set that is targeted to be pulled and pinned on this + node. + format: int32 + minimum: 1 + 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 + on this node. + format: int32 + minimum: 1 + type: integer + 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 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 + 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 + x-kubernetes-validations: + - message: desired generation must be greater than or equal to the + current generation + rule: 'has(self.desiredGeneration) && has(self.currentGeneration) + ? self.desiredGeneration >= self.currentGeneration : true' + - 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: 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: + - name + x-kubernetes-list-type: map + type: object + required: + - spec + type: object + x-kubernetes-validations: + - message: spec.node.name should match metadata.name + rule: self.metadata.name == self.spec.node.name + served: true + storage: true + subresources: + status: {} diff --git a/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-TechPreviewNoUpgrade.crd.yaml b/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-TechPreviewNoUpgrade.crd.yaml new file mode 100644 index 00000000000..34b48f9006e --- /dev/null +++ b/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-TechPreviewNoUpgrade.crd.yaml @@ -0,0 +1,619 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + api-approved.openshift.io: https://github.com/openshift/api/pull/2255 + api.openshift.io/merged-by-featuregates: "true" + include.release.openshift.io/self-managed-high-availability: "true" + release.openshift.io/feature-set: TechPreviewNoUpgrade + labels: + openshift.io/operator-managed: "" + name: machineconfignodes.machineconfiguration.openshift.io +spec: + group: machineconfiguration.openshift.io + names: + kind: MachineConfigNode + listKind: MachineConfigNodeList + plural: machineconfignodes + singular: machineconfignode + scope: Cluster + versions: + - additionalPrinterColumns: + - jsonPath: .spec.pool.name + name: PoolName + type: string + - jsonPath: .spec.configVersion.desired + name: DesiredConfig + type: string + - jsonPath: .status.configVersion.current + name: CurrentConfig + type: string + - jsonPath: .status.conditions[?(@.type=="Updated")].status + name: Updated + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + - jsonPath: .status.conditions[?(@.type=="UpdatePrepared")].status + name: UpdatePrepared + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="UpdateExecuted")].status + name: UpdateExecuted + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="UpdatePostActionComplete")].status + name: UpdatePostActionComplete + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="UpdateComplete")].status + name: UpdateComplete + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="Resumed")].status + name: Resumed + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="AppliedFilesAndOS")].status + name: UpdatedFilesAndOS + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="Cordoned")].status + name: CordonedNode + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="Drained")].status + name: DrainedNode + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="RebootedNode")].status + name: RebootedNode + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="Uncordoned")].status + name: UncordonedNode + priority: 1 + type: string + name: v1 + schema: + openAPIV3Schema: + description: |- + MachineConfigNode describes the health of the Machines on the system + Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: spec describes the configuration of the machine config node. + properties: + configImage: + description: |- + configImage is an optional field for configuring the OS image to be used for this node. This field will only exist if the node belongs to a pool opted into on-cluster image builds, and will override any MachineConfig referenced OSImageURL fields + When omitted, Image Mode is not be enabled and the node will follow the standard update process of creating a rendered MachineConfig and updating to its specifications. + When specified, Image Mode is enabled and will attempt to update the node to use the desired image. Following this, the node will follow the standard update process of creating a rendered MachineConfig and updating to its specifications. + properties: + desiredImage: + description: |- + desiredImage is a required field that configures the image that the node should be updated to use. + It must be a fully qualified OCI image pull spec of the format host[:port][/namespace]/name@sha256:, where the digest must be exactly 64 characters in length and consist only of lowercase hexadecimal characters, a-f and 0-9. + desiredImage must not be an empty string and must not exceed 447 characters in length. + maxLength: 447 + minLength: 1 + type: string + x-kubernetes-validations: + - message: the OCI Image reference must end with a valid '@sha256:' + suffix, where '' is 64 characters long + rule: (self.split('@').size() == 2 && self.split('@')[1].matches('^sha256:[a-f0-9]{64}$')) + - message: the OCI Image name should follow the host[:port][/namespace]/name + format, resembling a valid URL without the scheme + rule: (self.split('@')[0].matches('^([a-zA-Z0-9-]+\\.)+[a-zA-Z0-9-]+(:[0-9]{2,5})?/([a-zA-Z0-9-_]{0,61}/)?[a-zA-Z0-9-_.]*?$')) + required: + - desiredImage + type: object + 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 and gets set before the machine config operator validates + the new machine config against the current machine config. + 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 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 + 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 + node: + description: node contains a reference to the node for this machine + config node. + properties: + name: + 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. + maxLength: 253 + 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 + pool: + description: |- + pool contains a reference to the machine config pool that this machine config node's + referenced node belongs to. + properties: + name: + 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. + maxLength: 253 + 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 + required: + - configVersion + - node + - pool + type: object + status: + description: status describes the last observed state of this machine + config node. + properties: + conditions: + description: |- + conditions represent the observations of a machine config node's current state. Valid types are: + UpdatePrepared, UpdateExecuted, UpdatePostActionComplete, UpdateComplete, Updated, Resumed, + Drained, AppliedFilesAndOS, Cordoned, Uncordoned, RebootedNode, NodeDegraded, PinnedImageSetsProgressing, + and PinnedImageSetsDegraded. + The following types are only available when the ImageModeStatusReporting feature gate is enabled: ImagePulledFromRegistry, + AppliedOSImage, AppliedFiles + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 20 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + configImage: + description: |- + configImage is an optional field for configuring the OS image to be used for this node. This field will only exist if the node belongs to a pool opted into on-cluster image builds, and will override any MachineConfig referenced OSImageURL fields. + When omitted, this means that the Image Mode feature is not being used and the node will be up to date with the specific current rendered config version for the nodes MachinePool. + When specified, the Image Mode feature is enabled and the contents of this field show the observed state of the node image. + When Image Mode is enabled and a new MachineConfig is applied such that a new OS image build is not created, only the configVersion field will change. + When Image Mode is enabled and a new MachineConfig is applied such that a new OS image build is created, then only the configImage field will change. It is also possible that both the configImage + and configVersion change during the same update. + minProperties: 1 + properties: + currentImage: + description: |- + currentImage is an optional field that represents the current image that is applied to the node. + When omitted, this means that no image updates have been applied to the node and it will be up to date with the specific current rendered config version. + When specified, this means that the node is currently using this image. + currentImage must be a fully qualified OCI image pull spec of the format host[:port][/namespace]/name@sha256:, where the digest must be exactly 64 characters in length and consist only of lowercase hexadecimal characters, a-f and 0-9. + currentImage must not be an empty string and must not exceed 447 characters in length. + maxLength: 447 + minLength: 1 + type: string + x-kubernetes-validations: + - message: the OCI Image reference must end with a valid '@sha256:' + suffix, where '' is 64 characters long + rule: (self.split('@').size() == 2 && self.split('@')[1].matches('^sha256:[a-f0-9]{64}$')) + - message: the OCI Image name should follow the host[:port][/namespace]/name + format, resembling a valid URL without the scheme + rule: (self.split('@')[0].matches('^([a-zA-Z0-9-]+\\.)+[a-zA-Z0-9-]+(:[0-9]{2,5})?/([a-zA-Z0-9-_]{0,61}/)?[a-zA-Z0-9-_.]*?$')) + desiredImage: + description: |- + desiredImage is an optional field that represents the currently observed state of image that the node should be updated to use. + When not specified, this means that Image Mode has been disabled and the node will up to date with the specific current rendered config version. + When specified, this means that Image Mode has been enabled and the node is actively progressing to update the node to this image. + If currentImage and desiredImage match, the node has been successfully updated to use the desired image. + desiredImage must be a fully qualified OCI image pull spec of the format host[:port][/namespace]/name@sha256:, where the digest must be exactly 64 characters in length and consist only of lowercase hexadecimal characters, a-f and 0-9. + desiredImage must not be an empty string and must not exceed 447 characters in length. + maxLength: 447 + minLength: 1 + type: string + x-kubernetes-validations: + - message: the OCI Image reference must end with a valid '@sha256:' + suffix, where '' is 64 characters long + rule: (self.split('@').size() == 2 && self.split('@')[1].matches('^sha256:[a-f0-9]{64}$')) + - message: the OCI Image name should follow the host[:port][/namespace]/name + format, resembling a valid URL without the scheme + rule: (self.split('@')[0].matches('^([a-zA-Z0-9-]+\\.)+[a-zA-Z0-9-]+(:[0-9]{2,5})?/([a-zA-Z0-9-_]{0,61}/)?[a-zA-Z0-9-_.]*?$')) + type: object + configVersion: + 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 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 + 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 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 + 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 + internalReleaseImage: + description: |- + internalReleaseImage describes the status of the release payloads stored in the node. + When specified, an internalReleaseImage custom resource exists on the cluster, and the specified images will be made available on the control plane nodes. + This field will reflect the actual on-disk state of those release images. + properties: + releases: + description: |- + releases is a list of the release bundles currently owned and managed by the + cluster, indicating that their images can be safely pulled by any cluster entity + requiring them. + This field can contain between 1 and 5 entries. + items: + description: |- + MachineConfigNodeStatusInternalReleaseImageRef is used to provide a more detailed reference for + a release bundle. + properties: + conditions: + description: |- + conditions represent the observations of an internal release image current state. See InternalReleaseImageConditionType for the possible + type values. + items: + description: Condition contains details for one aspect + of the current state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, + False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in + foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 5 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + image: + description: |- + image is an OCP release image referenced by digest. + The format of the image pull spec is: host[:port][/namespace]/name@sha256:, + where the digest must be 64 characters long, and consist only of lowercase hexadecimal characters, a-f and 0-9. + The length of the whole spec must be between 1 to 447 characters. + maxLength: 447 + minLength: 1 + type: string + x-kubernetes-validations: + - message: the OCI Image reference must end with a valid + '@sha256:' suffix, where '' is 64 characters + long + rule: (self.split('@').size() == 2 && self.split('@')[1].matches('^sha256:[a-f0-9]{64}$')) + - message: the OCI Image name should follow the host[:port][/namespace]/name + format, resembling a valid URL without the scheme + rule: (self.split('@')[0].matches('^([a-zA-Z0-9-]+\\.)+[a-zA-Z0-9-]+(:[0-9]{2,5})?/([a-zA-Z0-9-_]{0,61}/)?[a-zA-Z0-9-_.]*?$')) + name: + description: name indicates the desired release bundle identifier. + This field is required and must be between 1 and 64 characters + long. + maxLength: 64 + minLength: 1 + type: string + required: + - image + - name + type: object + maxItems: 5 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + required: + - releases + type: object + irreconcilableChanges: + description: |- + irreconcilableChanges is an optional field that contains the observed differences between this nodes + configuration and the target rendered MachineConfig. + This field will be set when there are changes to the target rendered MachineConfig that can only be applied to + new nodes joining the cluster. + Entries must be unique, keyed on the fieldPath field. + Must not exceed 32 entries. + items: + description: |- + IrreconcilableChangeDiff holds an individual diff between the initial install-time MachineConfig + and the latest applied one caused by the presence of irreconcilable changes. + properties: + diff: + description: |- + diff is a required field containing the difference between the nodes current configuration and the latest + rendered MachineConfig for the field specified in fieldPath. + Must not be an empty string and must not exceed 4096 characters in length. + maxLength: 4096 + minLength: 1 + type: string + fieldPath: + description: |- + fieldPath is a required reference to the path in the latest rendered MachineConfig that differs from this nodes + configuration. + Must not be empty and must not exceed 70 characters in length. + Must begin with the prefix 'spec.' and only contain alphanumeric characters, square brackets ('[]'), or dots ('.'). + maxLength: 70 + minLength: 1 + type: string + x-kubernetes-validations: + - message: The fieldPath must start with `spec.` + rule: self.startsWith('spec.') + - message: The fieldPath must consist only of alphanumeric characters, + brackets [] and dots ('.'). + rule: self.matches('^[\\da-zA-Z\\.\\[\\]]+$') + required: + - diff + - fieldPath + type: object + maxItems: 32 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - fieldPath + x-kubernetes-list-type: map + observedGeneration: + 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. + format: int64 + minimum: 1 + 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. + 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: 1 + type: integer + x-kubernetes-validations: + - message: currentGeneration must not decrease + rule: self >= oldSelf + desiredGeneration: + description: desiredGeneration is the generation of the pinned + image set that is targeted to be pulled and pinned on this + node. + format: int32 + minimum: 1 + 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 + on this node. + format: int32 + minimum: 1 + type: integer + 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 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 + 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 + x-kubernetes-validations: + - message: desired generation must be greater than or equal to the + current generation + rule: 'has(self.desiredGeneration) && has(self.currentGeneration) + ? self.desiredGeneration >= self.currentGeneration : true' + - 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: 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: + - name + x-kubernetes-list-type: map + type: object + required: + - spec + type: object + x-kubernetes-validations: + - message: spec.node.name should match metadata.name + rule: self.metadata.name == self.spec.node.name + served: true + storage: true + subresources: + status: {} diff --git a/machineconfiguration/v1/zz_generated.deepcopy.go b/machineconfiguration/v1/zz_generated.deepcopy.go index 20693d60165..5061d8b822e 100644 --- a/machineconfiguration/v1/zz_generated.deepcopy.go +++ b/machineconfiguration/v1/zz_generated.deepcopy.go @@ -820,6 +820,7 @@ func (in *MachineConfigNodeStatus) DeepCopyInto(out *MachineConfigNodeStatus) { *out = make([]IrreconcilableChangeDiff, len(*in)) copy(*out, *in) } + in.InternalReleaseImage.DeepCopyInto(&out.InternalReleaseImage) return } @@ -849,6 +850,52 @@ func (in *MachineConfigNodeStatusConfigImage) DeepCopy() *MachineConfigNodeStatu return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachineConfigNodeStatusInternalReleaseImage) DeepCopyInto(out *MachineConfigNodeStatusInternalReleaseImage) { + *out = *in + if in.Releases != nil { + in, out := &in.Releases, &out.Releases + *out = make([]MachineConfigNodeStatusInternalReleaseImageRef, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineConfigNodeStatusInternalReleaseImage. +func (in *MachineConfigNodeStatusInternalReleaseImage) DeepCopy() *MachineConfigNodeStatusInternalReleaseImage { + if in == nil { + return nil + } + out := new(MachineConfigNodeStatusInternalReleaseImage) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MachineConfigNodeStatusInternalReleaseImageRef) DeepCopyInto(out *MachineConfigNodeStatusInternalReleaseImageRef) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]metav1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineConfigNodeStatusInternalReleaseImageRef. +func (in *MachineConfigNodeStatusInternalReleaseImageRef) DeepCopy() *MachineConfigNodeStatusInternalReleaseImageRef { + if in == nil { + return nil + } + out := new(MachineConfigNodeStatusInternalReleaseImageRef) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MachineConfigNodeStatusMachineConfigVersion) DeepCopyInto(out *MachineConfigNodeStatusMachineConfigVersion) { *out = *in diff --git a/machineconfiguration/v1/zz_generated.featuregated-crd-manifests.yaml b/machineconfiguration/v1/zz_generated.featuregated-crd-manifests.yaml index b8cb40673df..ba901de1e1d 100644 --- a/machineconfiguration/v1/zz_generated.featuregated-crd-manifests.yaml +++ b/machineconfiguration/v1/zz_generated.featuregated-crd-manifests.yaml @@ -124,6 +124,7 @@ machineconfignodes.machineconfiguration.openshift.io: - ImageModeStatusReporting - IrreconcilableMachineConfig - MachineConfigNodes + - NoRegistryClusterOperations FilenameOperatorName: machine-config FilenameOperatorOrdering: "01" FilenameRunLevel: "0000_80" diff --git a/machineconfiguration/v1/zz_generated.featuregated-crd-manifests/machineconfignodes.machineconfiguration.openshift.io/NoRegistryClusterOperations.yaml b/machineconfiguration/v1/zz_generated.featuregated-crd-manifests/machineconfignodes.machineconfiguration.openshift.io/NoRegistryClusterOperations.yaml new file mode 100644 index 00000000000..4bab74e8403 --- /dev/null +++ b/machineconfiguration/v1/zz_generated.featuregated-crd-manifests/machineconfignodes.machineconfiguration.openshift.io/NoRegistryClusterOperations.yaml @@ -0,0 +1,504 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + api-approved.openshift.io: https://github.com/openshift/api/pull/2255 + api.openshift.io/filename-cvo-runlevel: "0000_80" + api.openshift.io/filename-operator: machine-config + api.openshift.io/filename-ordering: "01" + feature-gate.release.openshift.io/NoRegistryClusterOperations: "true" + labels: + openshift.io/operator-managed: "" + name: machineconfignodes.machineconfiguration.openshift.io +spec: + group: machineconfiguration.openshift.io + names: + kind: MachineConfigNode + listKind: MachineConfigNodeList + plural: machineconfignodes + singular: machineconfignode + scope: Cluster + versions: + - additionalPrinterColumns: + - jsonPath: .spec.pool.name + name: PoolName + type: string + - jsonPath: .spec.configVersion.desired + name: DesiredConfig + type: string + - jsonPath: .status.configVersion.current + name: CurrentConfig + type: string + - jsonPath: .status.conditions[?(@.type=="Updated")].status + name: Updated + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + - jsonPath: .status.conditions[?(@.type=="UpdatePrepared")].status + name: UpdatePrepared + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="UpdateExecuted")].status + name: UpdateExecuted + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="UpdatePostActionComplete")].status + name: UpdatePostActionComplete + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="UpdateComplete")].status + name: UpdateComplete + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="Resumed")].status + name: Resumed + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="AppliedFilesAndOS")].status + name: UpdatedFilesAndOS + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="Cordoned")].status + name: CordonedNode + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="Drained")].status + name: DrainedNode + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="RebootedNode")].status + name: RebootedNode + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="Uncordoned")].status + name: UncordonedNode + priority: 1 + type: string + name: v1 + schema: + openAPIV3Schema: + description: |- + MachineConfigNode describes the health of the Machines on the system + Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: spec describes the configuration of the machine config node. + 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 and gets set before the machine config operator validates + the new machine config against the current machine config. + 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 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 + 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 + node: + description: node contains a reference to the node for this machine + config node. + properties: + name: + 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. + maxLength: 253 + 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 + pool: + description: |- + pool contains a reference to the machine config pool that this machine config node's + referenced node belongs to. + properties: + name: + 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. + maxLength: 253 + 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 + required: + - configVersion + - node + - pool + type: object + status: + description: status describes the last observed state of this machine + config node. + properties: + conditions: + description: |- + conditions represent the observations of a machine config node's current state. Valid types are: + UpdatePrepared, UpdateExecuted, UpdatePostActionComplete, UpdateComplete, Updated, Resumed, + Drained, AppliedFilesAndOS, Cordoned, Uncordoned, RebootedNode, NodeDegraded, PinnedImageSetsProgressing, + and PinnedImageSetsDegraded. + The following types are only available when the ImageModeStatusReporting feature gate is enabled: ImagePulledFromRegistry, + AppliedOSImage, AppliedFiles + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - 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 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 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 + 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 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 + 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 + internalReleaseImage: + description: |- + internalReleaseImage describes the status of the release payloads stored in the node. + When specified, an internalReleaseImage custom resource exists on the cluster, and the specified images will be made available on the control plane nodes. + This field will reflect the actual on-disk state of those release images. + properties: + releases: + description: |- + releases is a list of the release bundles currently owned and managed by the + cluster, indicating that their images can be safely pulled by any cluster entity + requiring them. + This field can contain between 1 and 5 entries. + items: + description: |- + MachineConfigNodeStatusInternalReleaseImageRef is used to provide a more detailed reference for + a release bundle. + properties: + conditions: + description: |- + conditions represent the observations of an internal release image current state. See InternalReleaseImageConditionType for the possible + type values. + items: + description: Condition contains details for one aspect + of the current state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, + False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in + foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 5 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + image: + description: |- + image is an OCP release image referenced by digest. + The format of the image pull spec is: host[:port][/namespace]/name@sha256:, + where the digest must be 64 characters long, and consist only of lowercase hexadecimal characters, a-f and 0-9. + The length of the whole spec must be between 1 to 447 characters. + maxLength: 447 + minLength: 1 + type: string + x-kubernetes-validations: + - message: the OCI Image reference must end with a valid + '@sha256:' suffix, where '' is 64 characters + long + rule: (self.split('@').size() == 2 && self.split('@')[1].matches('^sha256:[a-f0-9]{64}$')) + - message: the OCI Image name should follow the host[:port][/namespace]/name + format, resembling a valid URL without the scheme + rule: (self.split('@')[0].matches('^([a-zA-Z0-9-]+\\.)+[a-zA-Z0-9-]+(:[0-9]{2,5})?/([a-zA-Z0-9-_]{0,61}/)?[a-zA-Z0-9-_.]*?$')) + name: + description: name indicates the desired release bundle identifier. + This field is required and must be between 1 and 64 characters + long. + maxLength: 64 + minLength: 1 + type: string + required: + - image + - name + type: object + maxItems: 5 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + required: + - releases + type: object + observedGeneration: + 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. + format: int64 + minimum: 1 + 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. + 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: 1 + type: integer + x-kubernetes-validations: + - message: currentGeneration must not decrease + rule: self >= oldSelf + desiredGeneration: + description: desiredGeneration is the generation of the pinned + image set that is targeted to be pulled and pinned on this + node. + format: int32 + minimum: 1 + 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 + on this node. + format: int32 + minimum: 1 + type: integer + 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 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 + 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 + x-kubernetes-validations: + - message: desired generation must be greater than or equal to the + current generation + rule: 'has(self.desiredGeneration) && has(self.currentGeneration) + ? self.desiredGeneration >= self.currentGeneration : true' + - 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: 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: + - name + x-kubernetes-list-type: map + type: object + required: + - spec + type: object + x-kubernetes-validations: + - message: spec.node.name should match metadata.name + rule: self.metadata.name == self.spec.node.name + served: true + storage: true + subresources: + status: {} diff --git a/machineconfiguration/v1/zz_generated.swagger_doc_generated.go b/machineconfiguration/v1/zz_generated.swagger_doc_generated.go index bf177066caa..6d055307672 100644 --- a/machineconfiguration/v1/zz_generated.swagger_doc_generated.go +++ b/machineconfiguration/v1/zz_generated.swagger_doc_generated.go @@ -456,6 +456,7 @@ var map_MachineConfigNodeStatus = map[string]string{ "configImage": "configImage is an optional field for configuring the OS image to be used for this node. This field will only exist if the node belongs to a pool opted into on-cluster image builds, and will override any MachineConfig referenced OSImageURL fields. When omitted, this means that the Image Mode feature is not being used and the node will be up to date with the specific current rendered config version for the nodes MachinePool. When specified, the Image Mode feature is enabled and the contents of this field show the observed state of the node image. When Image Mode is enabled and a new MachineConfig is applied such that a new OS image build is not created, only the configVersion field will change. When Image Mode is enabled and a new MachineConfig is applied such that a new OS image build is created, then only the configImage field will change. It is also possible that both the configImage and configVersion change during the same update.", "pinnedImageSets": "pinnedImageSets describes the current and desired pinned image sets for this node.", "irreconcilableChanges": "irreconcilableChanges is an optional field that contains the observed differences between this nodes configuration and the target rendered MachineConfig. This field will be set when there are changes to the target rendered MachineConfig that can only be applied to new nodes joining the cluster. Entries must be unique, keyed on the fieldPath field. Must not exceed 32 entries.", + "internalReleaseImage": "internalReleaseImage describes the status of the release payloads stored in the node. When specified, an internalReleaseImage custom resource exists on the cluster, and the specified images will be made available on the control plane nodes. This field will reflect the actual on-disk state of those release images.", } func (MachineConfigNodeStatus) SwaggerDoc() map[string]string { @@ -472,6 +473,26 @@ func (MachineConfigNodeStatusConfigImage) SwaggerDoc() map[string]string { return map_MachineConfigNodeStatusConfigImage } +var map_MachineConfigNodeStatusInternalReleaseImage = map[string]string{ + "": "MachineConfigNodeStatusInternalReleaseImage holds information about the current and discovered release bundles for the observed machine config node.", + "releases": "releases is a list of the release bundles currently owned and managed by the cluster, indicating that their images can be safely pulled by any cluster entity requiring them. This field can contain between 1 and 5 entries.", +} + +func (MachineConfigNodeStatusInternalReleaseImage) SwaggerDoc() map[string]string { + return map_MachineConfigNodeStatusInternalReleaseImage +} + +var map_MachineConfigNodeStatusInternalReleaseImageRef = map[string]string{ + "": "MachineConfigNodeStatusInternalReleaseImageRef is used to provide a more detailed reference for a release bundle.", + "conditions": "conditions represent the observations of an internal release image current state. See InternalReleaseImageConditionType for the possible type values.", + "name": "name indicates the desired release bundle identifier. This field is required and must be between 1 and 64 characters long.", + "image": "image is an OCP release image referenced by digest. The format of the image pull spec is: host[:port][/namespace]/name@sha256:, where the digest must be 64 characters long, and consist only of lowercase hexadecimal characters, a-f and 0-9. The length of the whole spec must be between 1 to 447 characters.", +} + +func (MachineConfigNodeStatusInternalReleaseImageRef) SwaggerDoc() map[string]string { + return map_MachineConfigNodeStatusInternalReleaseImageRef +} + var map_MachineConfigNodeStatusMachineConfigVersion = map[string]string{ "": "MachineConfigNodeStatusMachineConfigVersion holds the current and desired config versions as last updated in the MCN status. When the current and desired versions do not match, the machine config pool is processing an upgrade and the machine config node will monitor the upgrade process. When the current and desired versions do match, the machine config node will ignore these events given that certain operations happen both during the MCO's upgrade mode and the daily operations mode.", "current": "current is the name of the machine config currently in use on the node. This value is updated once the machine config daemon has completed the update of the configuration for the node. This value should match the desired version unless an upgrade is in progress. Must be a lowercase RFC-1123 subdomain name (https://tools.ietf.org/html/rfc1123) consisting of only lowercase alphanumeric characters, hyphens (-), and periods (.), and must start and end with an alphanumeric character, and be at most 253 characters in length.", diff --git a/machineconfiguration/v1alpha1/register.go b/machineconfiguration/v1alpha1/register.go index 3f0cf2d13f6..27610a91bc2 100644 --- a/machineconfiguration/v1alpha1/register.go +++ b/machineconfiguration/v1alpha1/register.go @@ -30,6 +30,8 @@ func addKnownTypes(scheme *runtime.Scheme) error { &PinnedImageSetList{}, &OSImageStream{}, &OSImageStreamList{}, + &InternalReleaseImage{}, + &InternalReleaseImageList{}, ) metav1.AddToGroupVersion(scheme, GroupVersion) return nil diff --git a/machineconfiguration/v1alpha1/tests/internalreleaseimages.machineconfiguration.openshift.io/NoRegistryClusterOperations.yaml b/machineconfiguration/v1alpha1/tests/internalreleaseimages.machineconfiguration.openshift.io/NoRegistryClusterOperations.yaml new file mode 100644 index 00000000000..e9de1049fca --- /dev/null +++ b/machineconfiguration/v1alpha1/tests/internalreleaseimages.machineconfiguration.openshift.io/NoRegistryClusterOperations.yaml @@ -0,0 +1,43 @@ +apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this +name: "[TechPreview] InternalReleaseImage" +crdName: internalreleaseimages.machineconfiguration.openshift.io +featureGate: NoRegistryClusterOperations +tests: + onCreate: + - name: Should be able to create a minimal InternalReleaseImage + initial: | + apiVersion: machineconfiguration.openshift.io/v1alpha1 + kind: InternalReleaseImage + spec: + releases: + - name: ocp-release-bundle-4.18.0-x86_64 + expected: | + apiVersion: machineconfiguration.openshift.io/v1alpha1 + kind: InternalReleaseImage + spec: + releases: + - name: ocp-release-bundle-4.18.0-x86_64 + - name: Invalid undefined releases + initial: | + apiVersion: machineconfiguration.openshift.io/v1alpha1 + kind: InternalReleaseImage + spec: + expectedError: "spec: Required value" + - name: Invalid empty release name + initial: | + apiVersion: machineconfiguration.openshift.io/v1alpha1 + kind: InternalReleaseImage + spec: + releases: + - name: "" + expectedError: "Invalid value: \"\": spec.releases[0].name in body should be at least 1 chars long" + - name: Should reject duplicate releases + initial: | + apiVersion: machineconfiguration.openshift.io/v1alpha1 + kind: InternalReleaseImage + spec: + releases: + - name: ocp-release-bundle-4.18.0-x86_64 + - name: ocp-release-bundle-4.18.0-x86_64 + expectedError: "Duplicate value: map[string]interface {}{\"name\":\"ocp-release-bundle-4.18.0-x86_64\"}" + diff --git a/machineconfiguration/v1alpha1/types_internalreleaseimage.go b/machineconfiguration/v1alpha1/types_internalreleaseimage.go new file mode 100644 index 00000000000..3f36f08b9b7 --- /dev/null +++ b/machineconfiguration/v1alpha1/types_internalreleaseimage.go @@ -0,0 +1,125 @@ +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true +// +kubebuilder:resource:path=internalreleaseimages,scope=Cluster +// +kubebuilder:subresource:status +// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/2510 +// +openshift:file-pattern=cvoRunLevel=0000_80,operatorName=machine-config,operatorOrdering=01 +// +openshift:enable:FeatureGate=NoRegistryClusterOperations +// +kubebuilder:metadata:labels=openshift.io/operator-managed= + +// InternalReleaseImage is used to keep track and manage a set +// of release bundles (OCP and OLM operators images) that are stored +// into the control planes nodes. +// +// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. +// +openshift:compatibility-gen:level=4 +type InternalReleaseImage struct { + metav1.TypeMeta `json:",inline"` + + // metadata is the standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitempty"` + + // spec describes the configuration of this internal release image. + // +required + Spec InternalReleaseImageSpec `json:"spec,omitzero"` + + // status describes the last observed state of this internal release image. + // +optional + Status *InternalReleaseImageStatus `json:"status,omitempty"` +} + +// InternalReleaseImageSpec defines the desired state of a InternalReleaseImage. +type InternalReleaseImageSpec struct { + // releases is a list of release bundle identifiers that the user wants to + // add/remove to/from the control plane nodes. + // This field can contain between 1 and 5 entries. + // +kubebuilder:validation:MinItems=1 + // +kubebuilder:validation:MaxItems=5 + // +listType=map + // +listMapKey=name + // +required + Releases []InternalReleaseImageRef `json:"releases,omitempty"` +} + +// InternalReleaseImageRef is used to provide a simple reference for a release +// bundle. Currently it contains only the name field. +type InternalReleaseImageRef struct { + // name indicates the desired release bundle identifier. This field is required and must be between 1 and 64 characters long. + // +required + // +kubebuilder:validation:MinLength=1 + // +kubebuilder:validation:MaxLength=64 + Name string `json:"name,omitempty"` +} + +// InternalReleaseImageStatus describes the current state of a InternalReleaseImage. +type InternalReleaseImageStatus struct { + // mountedReleases is a list of release bundle identifiers currently detected + // from the ISO attached to one of the control plane nodes. Any reported identifier can + // be used to amend the `spec.Releases` field to add a new release bundle to the cluster. + // An empty value indicates that no ISOs are currently being detected on any control plane + // node. + // Must not exceed 5 entries. + // +listType=map + // +listMapKey=name + // +kubebuilder:validation:MaxItems=5 + // +optional + MountedReleases []InternalReleaseImageRef `json:"mountedReleases,omitempty"` + + // availableReleases is a list of the release bundles currently owned and managed by the + // cluster, indicating that their images can be safely pulled by any cluster entity + // requiring them. + // This field can contain between 1 and 5 entries. + // +listType=map + // +listMapKey=name + // +kubebuilder:validation:MinItems=1 + // +kubebuilder:validation:MaxItems=5 + // +optional + AvailableReleases []InternalReleaseImageDetailedRef `json:"availableReleases,omitempty"` +} + +// InternalReleaseImageDetailedRef is used to provide a more detailed reference for +// a release bundle. +type InternalReleaseImageDetailedRef struct { + // name indicates the desired release bundle identifier. This field is required and must be between 1 and 64 characters long. + // +kubebuilder:validation:MinLength=1 + // +kubebuilder:validation:MaxLength=64 + // +required + Name string `json:"name,omitempty"` + + // image is an OCP release image referenced by digest. + // The format of the image pull spec is: host[:port][/namespace]/name@sha256:, + // where the digest must be 64 characters long, and consist only of lowercase hexadecimal characters, a-f and 0-9. + // The length of the whole spec must be between 1 to 447 characters. + // +kubebuilder:validation:MinLength=1 + // +kubebuilder:validation:MaxLength=447 + // +kubebuilder:validation:XValidation:rule=`(self.split('@').size() == 2 && self.split('@')[1].matches('^sha256:[a-f0-9]{64}$'))`,message="the OCI Image reference must end with a valid '@sha256:' suffix, where '' is 64 characters long" + // +kubebuilder:validation:XValidation:rule=`(self.split('@')[0].matches('^([a-zA-Z0-9-]+\\.)+[a-zA-Z0-9-]+(:[0-9]{2,5})?/([a-zA-Z0-9-_]{0,61}/)?[a-zA-Z0-9-_.]*?$'))`,message="the OCI Image name should follow the host[:port][/namespace]/name format, resembling a valid URL without the scheme" + // +required + Image string `json:"image,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// InternalReleaseImageList is a list of InternalReleaseImage resources +// +// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. +// +openshift:compatibility-gen:level=4 +type InternalReleaseImageList struct { + metav1.TypeMeta `json:",inline"` + + // metadata is the standard list's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + metav1.ListMeta `json:"metadata"` + + Items []InternalReleaseImage `json:"items"` +} diff --git a/machineconfiguration/v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_internalreleaseimages-CustomNoUpgrade.crd.yaml b/machineconfiguration/v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_internalreleaseimages-CustomNoUpgrade.crd.yaml new file mode 100644 index 00000000000..285d1e76ada --- /dev/null +++ b/machineconfiguration/v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_internalreleaseimages-CustomNoUpgrade.crd.yaml @@ -0,0 +1,165 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + api-approved.openshift.io: https://github.com/openshift/api/pull/2510 + api.openshift.io/merged-by-featuregates: "true" + include.release.openshift.io/ibm-cloud-managed: "true" + include.release.openshift.io/self-managed-high-availability: "true" + release.openshift.io/feature-set: CustomNoUpgrade + labels: + openshift.io/operator-managed: "" + name: internalreleaseimages.machineconfiguration.openshift.io +spec: + group: machineconfiguration.openshift.io + names: + kind: InternalReleaseImage + listKind: InternalReleaseImageList + plural: internalreleaseimages + singular: internalreleaseimage + scope: Cluster + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: |- + InternalReleaseImage is used to keep track and manage a set + of release bundles (OCP and OLM operators images) that are stored + into the control planes nodes. + + 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. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: spec describes the configuration of this internal release + image. + properties: + releases: + description: |- + releases is a list of release bundle identifiers that the user wants to + add/remove to/from the control plane nodes. + This field can contain between 1 and 5 entries. + items: + description: |- + InternalReleaseImageRef is used to provide a simple reference for a release + bundle. Currently it contains only the name field. + properties: + name: + description: name indicates the desired release bundle identifier. + This field is required and must be between 1 and 64 characters + long. + maxLength: 64 + minLength: 1 + type: string + required: + - name + type: object + maxItems: 5 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + required: + - releases + type: object + status: + description: status describes the last observed state of this internal + release image. + properties: + availableReleases: + description: |- + availableReleases is a list of the release bundles currently owned and managed by the + cluster, indicating that their images can be safely pulled by any cluster entity + requiring them. + This field can contain between 1 and 5 entries. + items: + description: |- + InternalReleaseImageDetailedRef is used to provide a more detailed reference for + a release bundle. + properties: + image: + description: |- + image is an OCP release image referenced by digest. + The format of the image pull spec is: host[:port][/namespace]/name@sha256:, + where the digest must be 64 characters long, and consist only of lowercase hexadecimal characters, a-f and 0-9. + The length of the whole spec must be between 1 to 447 characters. + maxLength: 447 + minLength: 1 + type: string + x-kubernetes-validations: + - message: the OCI Image reference must end with a valid '@sha256:' + suffix, where '' is 64 characters long + rule: (self.split('@').size() == 2 && self.split('@')[1].matches('^sha256:[a-f0-9]{64}$')) + - message: the OCI Image name should follow the host[:port][/namespace]/name + format, resembling a valid URL without the scheme + rule: (self.split('@')[0].matches('^([a-zA-Z0-9-]+\\.)+[a-zA-Z0-9-]+(:[0-9]{2,5})?/([a-zA-Z0-9-_]{0,61}/)?[a-zA-Z0-9-_.]*?$')) + name: + description: name indicates the desired release bundle identifier. + This field is required and must be between 1 and 64 characters + long. + maxLength: 64 + minLength: 1 + type: string + required: + - image + - name + type: object + maxItems: 5 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + mountedReleases: + description: |- + mountedReleases is a list of release bundle identifiers currently detected + from the ISO attached to one of the control plane nodes. Any reported identifier can + be used to amend the `spec.Releases` field to add a new release bundle to the cluster. + An empty value indicates that no ISOs are currently being detected on any control plane + node. + Must not exceed 5 entries. + items: + description: |- + InternalReleaseImageRef is used to provide a simple reference for a release + bundle. Currently it contains only the name field. + properties: + name: + description: name indicates the desired release bundle identifier. + This field is required and must be between 1 and 64 characters + long. + maxLength: 64 + minLength: 1 + type: string + required: + - name + type: object + maxItems: 5 + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} diff --git a/machineconfiguration/v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_internalreleaseimages-DevPreviewNoUpgrade.crd.yaml b/machineconfiguration/v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_internalreleaseimages-DevPreviewNoUpgrade.crd.yaml new file mode 100644 index 00000000000..6d9f2f31d7f --- /dev/null +++ b/machineconfiguration/v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_internalreleaseimages-DevPreviewNoUpgrade.crd.yaml @@ -0,0 +1,164 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + api-approved.openshift.io: https://github.com/openshift/api/pull/2510 + api.openshift.io/merged-by-featuregates: "true" + include.release.openshift.io/self-managed-high-availability: "true" + release.openshift.io/feature-set: DevPreviewNoUpgrade + labels: + openshift.io/operator-managed: "" + name: internalreleaseimages.machineconfiguration.openshift.io +spec: + group: machineconfiguration.openshift.io + names: + kind: InternalReleaseImage + listKind: InternalReleaseImageList + plural: internalreleaseimages + singular: internalreleaseimage + scope: Cluster + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: |- + InternalReleaseImage is used to keep track and manage a set + of release bundles (OCP and OLM operators images) that are stored + into the control planes nodes. + + 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. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: spec describes the configuration of this internal release + image. + properties: + releases: + description: |- + releases is a list of release bundle identifiers that the user wants to + add/remove to/from the control plane nodes. + This field can contain between 1 and 5 entries. + items: + description: |- + InternalReleaseImageRef is used to provide a simple reference for a release + bundle. Currently it contains only the name field. + properties: + name: + description: name indicates the desired release bundle identifier. + This field is required and must be between 1 and 64 characters + long. + maxLength: 64 + minLength: 1 + type: string + required: + - name + type: object + maxItems: 5 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + required: + - releases + type: object + status: + description: status describes the last observed state of this internal + release image. + properties: + availableReleases: + description: |- + availableReleases is a list of the release bundles currently owned and managed by the + cluster, indicating that their images can be safely pulled by any cluster entity + requiring them. + This field can contain between 1 and 5 entries. + items: + description: |- + InternalReleaseImageDetailedRef is used to provide a more detailed reference for + a release bundle. + properties: + image: + description: |- + image is an OCP release image referenced by digest. + The format of the image pull spec is: host[:port][/namespace]/name@sha256:, + where the digest must be 64 characters long, and consist only of lowercase hexadecimal characters, a-f and 0-9. + The length of the whole spec must be between 1 to 447 characters. + maxLength: 447 + minLength: 1 + type: string + x-kubernetes-validations: + - message: the OCI Image reference must end with a valid '@sha256:' + suffix, where '' is 64 characters long + rule: (self.split('@').size() == 2 && self.split('@')[1].matches('^sha256:[a-f0-9]{64}$')) + - message: the OCI Image name should follow the host[:port][/namespace]/name + format, resembling a valid URL without the scheme + rule: (self.split('@')[0].matches('^([a-zA-Z0-9-]+\\.)+[a-zA-Z0-9-]+(:[0-9]{2,5})?/([a-zA-Z0-9-_]{0,61}/)?[a-zA-Z0-9-_.]*?$')) + name: + description: name indicates the desired release bundle identifier. + This field is required and must be between 1 and 64 characters + long. + maxLength: 64 + minLength: 1 + type: string + required: + - image + - name + type: object + maxItems: 5 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + mountedReleases: + description: |- + mountedReleases is a list of release bundle identifiers currently detected + from the ISO attached to one of the control plane nodes. Any reported identifier can + be used to amend the `spec.Releases` field to add a new release bundle to the cluster. + An empty value indicates that no ISOs are currently being detected on any control plane + node. + Must not exceed 5 entries. + items: + description: |- + InternalReleaseImageRef is used to provide a simple reference for a release + bundle. Currently it contains only the name field. + properties: + name: + description: name indicates the desired release bundle identifier. + This field is required and must be between 1 and 64 characters + long. + maxLength: 64 + minLength: 1 + type: string + required: + - name + type: object + maxItems: 5 + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} diff --git a/machineconfiguration/v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_internalreleaseimages-TechPreviewNoUpgrade.crd.yaml b/machineconfiguration/v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_internalreleaseimages-TechPreviewNoUpgrade.crd.yaml new file mode 100644 index 00000000000..8e85fb15b3b --- /dev/null +++ b/machineconfiguration/v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_internalreleaseimages-TechPreviewNoUpgrade.crd.yaml @@ -0,0 +1,164 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + api-approved.openshift.io: https://github.com/openshift/api/pull/2510 + api.openshift.io/merged-by-featuregates: "true" + include.release.openshift.io/self-managed-high-availability: "true" + release.openshift.io/feature-set: TechPreviewNoUpgrade + labels: + openshift.io/operator-managed: "" + name: internalreleaseimages.machineconfiguration.openshift.io +spec: + group: machineconfiguration.openshift.io + names: + kind: InternalReleaseImage + listKind: InternalReleaseImageList + plural: internalreleaseimages + singular: internalreleaseimage + scope: Cluster + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: |- + InternalReleaseImage is used to keep track and manage a set + of release bundles (OCP and OLM operators images) that are stored + into the control planes nodes. + + 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. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: spec describes the configuration of this internal release + image. + properties: + releases: + description: |- + releases is a list of release bundle identifiers that the user wants to + add/remove to/from the control plane nodes. + This field can contain between 1 and 5 entries. + items: + description: |- + InternalReleaseImageRef is used to provide a simple reference for a release + bundle. Currently it contains only the name field. + properties: + name: + description: name indicates the desired release bundle identifier. + This field is required and must be between 1 and 64 characters + long. + maxLength: 64 + minLength: 1 + type: string + required: + - name + type: object + maxItems: 5 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + required: + - releases + type: object + status: + description: status describes the last observed state of this internal + release image. + properties: + availableReleases: + description: |- + availableReleases is a list of the release bundles currently owned and managed by the + cluster, indicating that their images can be safely pulled by any cluster entity + requiring them. + This field can contain between 1 and 5 entries. + items: + description: |- + InternalReleaseImageDetailedRef is used to provide a more detailed reference for + a release bundle. + properties: + image: + description: |- + image is an OCP release image referenced by digest. + The format of the image pull spec is: host[:port][/namespace]/name@sha256:, + where the digest must be 64 characters long, and consist only of lowercase hexadecimal characters, a-f and 0-9. + The length of the whole spec must be between 1 to 447 characters. + maxLength: 447 + minLength: 1 + type: string + x-kubernetes-validations: + - message: the OCI Image reference must end with a valid '@sha256:' + suffix, where '' is 64 characters long + rule: (self.split('@').size() == 2 && self.split('@')[1].matches('^sha256:[a-f0-9]{64}$')) + - message: the OCI Image name should follow the host[:port][/namespace]/name + format, resembling a valid URL without the scheme + rule: (self.split('@')[0].matches('^([a-zA-Z0-9-]+\\.)+[a-zA-Z0-9-]+(:[0-9]{2,5})?/([a-zA-Z0-9-_]{0,61}/)?[a-zA-Z0-9-_.]*?$')) + name: + description: name indicates the desired release bundle identifier. + This field is required and must be between 1 and 64 characters + long. + maxLength: 64 + minLength: 1 + type: string + required: + - image + - name + type: object + maxItems: 5 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + mountedReleases: + description: |- + mountedReleases is a list of release bundle identifiers currently detected + from the ISO attached to one of the control plane nodes. Any reported identifier can + be used to amend the `spec.Releases` field to add a new release bundle to the cluster. + An empty value indicates that no ISOs are currently being detected on any control plane + node. + Must not exceed 5 entries. + items: + description: |- + InternalReleaseImageRef is used to provide a simple reference for a release + bundle. Currently it contains only the name field. + properties: + name: + description: name indicates the desired release bundle identifier. + This field is required and must be between 1 and 64 characters + long. + maxLength: 64 + minLength: 1 + type: string + required: + - name + type: object + maxItems: 5 + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} diff --git a/machineconfiguration/v1alpha1/zz_generated.deepcopy.go b/machineconfiguration/v1alpha1/zz_generated.deepcopy.go index 89d4a02db5e..045b4c5e8bb 100644 --- a/machineconfiguration/v1alpha1/zz_generated.deepcopy.go +++ b/machineconfiguration/v1alpha1/zz_generated.deepcopy.go @@ -10,6 +10,150 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" ) +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *InternalReleaseImage) DeepCopyInto(out *InternalReleaseImage) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + if in.Status != nil { + in, out := &in.Status, &out.Status + *out = new(InternalReleaseImageStatus) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InternalReleaseImage. +func (in *InternalReleaseImage) DeepCopy() *InternalReleaseImage { + if in == nil { + return nil + } + out := new(InternalReleaseImage) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *InternalReleaseImage) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *InternalReleaseImageDetailedRef) DeepCopyInto(out *InternalReleaseImageDetailedRef) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InternalReleaseImageDetailedRef. +func (in *InternalReleaseImageDetailedRef) DeepCopy() *InternalReleaseImageDetailedRef { + if in == nil { + return nil + } + out := new(InternalReleaseImageDetailedRef) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *InternalReleaseImageList) DeepCopyInto(out *InternalReleaseImageList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]InternalReleaseImage, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InternalReleaseImageList. +func (in *InternalReleaseImageList) DeepCopy() *InternalReleaseImageList { + if in == nil { + return nil + } + out := new(InternalReleaseImageList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *InternalReleaseImageList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *InternalReleaseImageRef) DeepCopyInto(out *InternalReleaseImageRef) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InternalReleaseImageRef. +func (in *InternalReleaseImageRef) DeepCopy() *InternalReleaseImageRef { + if in == nil { + return nil + } + out := new(InternalReleaseImageRef) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *InternalReleaseImageSpec) DeepCopyInto(out *InternalReleaseImageSpec) { + *out = *in + if in.Releases != nil { + in, out := &in.Releases, &out.Releases + *out = make([]InternalReleaseImageRef, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InternalReleaseImageSpec. +func (in *InternalReleaseImageSpec) DeepCopy() *InternalReleaseImageSpec { + if in == nil { + return nil + } + out := new(InternalReleaseImageSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *InternalReleaseImageStatus) DeepCopyInto(out *InternalReleaseImageStatus) { + *out = *in + if in.MountedReleases != nil { + in, out := &in.MountedReleases, &out.MountedReleases + *out = make([]InternalReleaseImageRef, len(*in)) + copy(*out, *in) + } + if in.AvailableReleases != nil { + in, out := &in.AvailableReleases, &out.AvailableReleases + *out = make([]InternalReleaseImageDetailedRef, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InternalReleaseImageStatus. +func (in *InternalReleaseImageStatus) DeepCopy() *InternalReleaseImageStatus { + if in == nil { + return nil + } + out := new(InternalReleaseImageStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MCOObjectReference) DeepCopyInto(out *MCOObjectReference) { *out = *in diff --git a/machineconfiguration/v1alpha1/zz_generated.featuregated-crd-manifests.yaml b/machineconfiguration/v1alpha1/zz_generated.featuregated-crd-manifests.yaml index a2b8d213cfe..3dfc0ccc370 100644 --- a/machineconfiguration/v1alpha1/zz_generated.featuregated-crd-manifests.yaml +++ b/machineconfiguration/v1alpha1/zz_generated.featuregated-crd-manifests.yaml @@ -1,3 +1,27 @@ +internalreleaseimages.machineconfiguration.openshift.io: + Annotations: {} + ApprovedPRNumber: https://github.com/openshift/api/pull/2510 + CRDName: internalreleaseimages.machineconfiguration.openshift.io + Capability: "" + Category: "" + FeatureGates: + - NoRegistryClusterOperations + FilenameOperatorName: machine-config + FilenameOperatorOrdering: "01" + FilenameRunLevel: "0000_80" + GroupName: machineconfiguration.openshift.io + HasStatus: true + KindName: InternalReleaseImage + Labels: + openshift.io/operator-managed: "" + PluralName: internalreleaseimages + PrinterColumns: [] + Scope: Cluster + ShortNames: null + TopLevelFeatureGates: + - NoRegistryClusterOperations + Version: v1alpha1 + machineconfignodes.machineconfiguration.openshift.io: Annotations: {} ApprovedPRNumber: https://github.com/openshift/api/pull/2256 diff --git a/machineconfiguration/v1alpha1/zz_generated.featuregated-crd-manifests/internalreleaseimages.machineconfiguration.openshift.io/NoRegistryClusterOperations.yaml b/machineconfiguration/v1alpha1/zz_generated.featuregated-crd-manifests/internalreleaseimages.machineconfiguration.openshift.io/NoRegistryClusterOperations.yaml new file mode 100644 index 00000000000..e1f90f35365 --- /dev/null +++ b/machineconfiguration/v1alpha1/zz_generated.featuregated-crd-manifests/internalreleaseimages.machineconfiguration.openshift.io/NoRegistryClusterOperations.yaml @@ -0,0 +1,165 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + api-approved.openshift.io: https://github.com/openshift/api/pull/2510 + api.openshift.io/filename-cvo-runlevel: "0000_80" + api.openshift.io/filename-operator: machine-config + api.openshift.io/filename-ordering: "01" + feature-gate.release.openshift.io/NoRegistryClusterOperations: "true" + labels: + openshift.io/operator-managed: "" + name: internalreleaseimages.machineconfiguration.openshift.io +spec: + group: machineconfiguration.openshift.io + names: + kind: InternalReleaseImage + listKind: InternalReleaseImageList + plural: internalreleaseimages + singular: internalreleaseimage + scope: Cluster + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: |- + InternalReleaseImage is used to keep track and manage a set + of release bundles (OCP and OLM operators images) that are stored + into the control planes nodes. + + 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. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: spec describes the configuration of this internal release + image. + properties: + releases: + description: |- + releases is a list of release bundle identifiers that the user wants to + add/remove to/from the control plane nodes. + This field can contain between 1 and 5 entries. + items: + description: |- + InternalReleaseImageRef is used to provide a simple reference for a release + bundle. Currently it contains only the name field. + properties: + name: + description: name indicates the desired release bundle identifier. + This field is required and must be between 1 and 64 characters + long. + maxLength: 64 + minLength: 1 + type: string + required: + - name + type: object + maxItems: 5 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + required: + - releases + type: object + status: + description: status describes the last observed state of this internal + release image. + properties: + availableReleases: + description: |- + availableReleases is a list of the release bundles currently owned and managed by the + cluster, indicating that their images can be safely pulled by any cluster entity + requiring them. + This field can contain between 1 and 5 entries. + items: + description: |- + InternalReleaseImageDetailedRef is used to provide a more detailed reference for + a release bundle. + properties: + image: + description: |- + image is an OCP release image referenced by digest. + The format of the image pull spec is: host[:port][/namespace]/name@sha256:, + where the digest must be 64 characters long, and consist only of lowercase hexadecimal characters, a-f and 0-9. + The length of the whole spec must be between 1 to 447 characters. + maxLength: 447 + minLength: 1 + type: string + x-kubernetes-validations: + - message: the OCI Image reference must end with a valid '@sha256:' + suffix, where '' is 64 characters long + rule: (self.split('@').size() == 2 && self.split('@')[1].matches('^sha256:[a-f0-9]{64}$')) + - message: the OCI Image name should follow the host[:port][/namespace]/name + format, resembling a valid URL without the scheme + rule: (self.split('@')[0].matches('^([a-zA-Z0-9-]+\\.)+[a-zA-Z0-9-]+(:[0-9]{2,5})?/([a-zA-Z0-9-_]{0,61}/)?[a-zA-Z0-9-_.]*?$')) + name: + description: name indicates the desired release bundle identifier. + This field is required and must be between 1 and 64 characters + long. + maxLength: 64 + minLength: 1 + type: string + required: + - image + - name + type: object + maxItems: 5 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + mountedReleases: + description: |- + mountedReleases is a list of release bundle identifiers currently detected + from the ISO attached to one of the control plane nodes. Any reported identifier can + be used to amend the `spec.Releases` field to add a new release bundle to the cluster. + An empty value indicates that no ISOs are currently being detected on any control plane + node. + Must not exceed 5 entries. + items: + description: |- + InternalReleaseImageRef is used to provide a simple reference for a release + bundle. Currently it contains only the name field. + properties: + name: + description: name indicates the desired release bundle identifier. + This field is required and must be between 1 and 64 characters + long. + maxLength: 64 + minLength: 1 + type: string + required: + - name + type: object + maxItems: 5 + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} diff --git a/machineconfiguration/v1alpha1/zz_generated.swagger_doc_generated.go b/machineconfiguration/v1alpha1/zz_generated.swagger_doc_generated.go index 7086fb3486e..e11e9f4447c 100644 --- a/machineconfiguration/v1alpha1/zz_generated.swagger_doc_generated.go +++ b/machineconfiguration/v1alpha1/zz_generated.swagger_doc_generated.go @@ -11,6 +11,64 @@ package v1alpha1 // Those methods can be generated by using hack/update-swagger-docs.sh // AUTO-GENERATED FUNCTIONS START HERE +var map_InternalReleaseImage = map[string]string{ + "": "InternalReleaseImage is used to keep track and manage a set of release bundles (OCP and OLM operators images) that are stored into the control planes nodes.\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", + "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "spec": "spec describes the configuration of this internal release image.", + "status": "status describes the last observed state of this internal release image.", +} + +func (InternalReleaseImage) SwaggerDoc() map[string]string { + return map_InternalReleaseImage +} + +var map_InternalReleaseImageDetailedRef = map[string]string{ + "": "InternalReleaseImageDetailedRef is used to provide a more detailed reference for a release bundle.", + "name": "name indicates the desired release bundle identifier. This field is required and must be between 1 and 64 characters long.", + "image": "image is an OCP release image referenced by digest. The format of the image pull spec is: host[:port][/namespace]/name@sha256:, where the digest must be 64 characters long, and consist only of lowercase hexadecimal characters, a-f and 0-9. The length of the whole spec must be between 1 to 447 characters.", +} + +func (InternalReleaseImageDetailedRef) SwaggerDoc() map[string]string { + return map_InternalReleaseImageDetailedRef +} + +var map_InternalReleaseImageList = map[string]string{ + "": "InternalReleaseImageList is a list of InternalReleaseImage resources\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", + "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", +} + +func (InternalReleaseImageList) SwaggerDoc() map[string]string { + return map_InternalReleaseImageList +} + +var map_InternalReleaseImageRef = map[string]string{ + "": "InternalReleaseImageRef is used to provide a simple reference for a release bundle. Currently it contains only the name field.", + "name": "name indicates the desired release bundle identifier. This field is required and must be between 1 and 64 characters long.", +} + +func (InternalReleaseImageRef) SwaggerDoc() map[string]string { + return map_InternalReleaseImageRef +} + +var map_InternalReleaseImageSpec = map[string]string{ + "": "InternalReleaseImageSpec defines the desired state of a InternalReleaseImage.", + "releases": "releases is a list of release bundle identifiers that the user wants to add/remove to/from the control plane nodes. This field can contain between 1 and 5 entries.", +} + +func (InternalReleaseImageSpec) SwaggerDoc() map[string]string { + return map_InternalReleaseImageSpec +} + +var map_InternalReleaseImageStatus = map[string]string{ + "": "InternalReleaseImageStatus describes the current state of a InternalReleaseImage.", + "mountedReleases": "mountedReleases is a list of release bundle identifiers currently detected from the ISO attached to one of the control plane nodes. Any reported identifier can be used to amend the `spec.Releases` field to add a new release bundle to the cluster. An empty value indicates that no ISOs are currently being detected on any control plane node. Must not exceed 5 entries.", + "availableReleases": "availableReleases is a list of the release bundles currently owned and managed by the cluster, indicating that their images can be safely pulled by any cluster entity requiring them. This field can contain between 1 and 5 entries.", +} + +func (InternalReleaseImageStatus) SwaggerDoc() map[string]string { + return map_InternalReleaseImageStatus +} + var map_MCOObjectReference = map[string]string{ "": "MCOObjectReference holds information about an object the MCO either owns or modifies in some way", "name": "name is the name of the object being referenced. For example, this can represent a machine config pool or node name. Must be a lowercase RFC-1123 subdomain name (https://tools.ietf.org/html/rfc1123) consisting of only lowercase alphanumeric characters, hyphens (-), and periods (.), and must start and end with an alphanumeric character, and be at most 253 characters in length.", diff --git a/openapi/generated_openapi/zz_generated.openapi.go b/openapi/generated_openapi/zz_generated.openapi.go index 63174363ee5..737d704e652 100644 --- a/openapi/generated_openapi/zz_generated.openapi.go +++ b/openapi/generated_openapi/zz_generated.openapi.go @@ -851,6 +851,12 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "github.com/openshift/api/machine/v1beta1.VSphereMachineProviderSpec": schema_openshift_api_machine_v1beta1_VSphereMachineProviderSpec(ref), "github.com/openshift/api/machine/v1beta1.VSphereMachineProviderStatus": schema_openshift_api_machine_v1beta1_VSphereMachineProviderStatus(ref), "github.com/openshift/api/machine/v1beta1.Workspace": schema_openshift_api_machine_v1beta1_Workspace(ref), + "github.com/openshift/api/machineconfiguration/v1alpha1.InternalReleaseImage": schema_openshift_api_machineconfiguration_v1alpha1_InternalReleaseImage(ref), + "github.com/openshift/api/machineconfiguration/v1alpha1.InternalReleaseImageDetailedRef": schema_openshift_api_machineconfiguration_v1alpha1_InternalReleaseImageDetailedRef(ref), + "github.com/openshift/api/machineconfiguration/v1alpha1.InternalReleaseImageList": schema_openshift_api_machineconfiguration_v1alpha1_InternalReleaseImageList(ref), + "github.com/openshift/api/machineconfiguration/v1alpha1.InternalReleaseImageRef": schema_openshift_api_machineconfiguration_v1alpha1_InternalReleaseImageRef(ref), + "github.com/openshift/api/machineconfiguration/v1alpha1.InternalReleaseImageSpec": schema_openshift_api_machineconfiguration_v1alpha1_InternalReleaseImageSpec(ref), + "github.com/openshift/api/machineconfiguration/v1alpha1.InternalReleaseImageStatus": schema_openshift_api_machineconfiguration_v1alpha1_InternalReleaseImageStatus(ref), "github.com/openshift/api/machineconfiguration/v1alpha1.MCOObjectReference": schema_openshift_api_machineconfiguration_v1alpha1_MCOObjectReference(ref), "github.com/openshift/api/machineconfiguration/v1alpha1.MachineConfigNode": schema_openshift_api_machineconfiguration_v1alpha1_MachineConfigNode(ref), "github.com/openshift/api/machineconfiguration/v1alpha1.MachineConfigNodeList": schema_openshift_api_machineconfiguration_v1alpha1_MachineConfigNodeList(ref), @@ -43362,6 +43368,252 @@ func schema_openshift_api_machine_v1beta1_Workspace(ref common.ReferenceCallback } } +func schema_openshift_api_machineconfiguration_v1alpha1_InternalReleaseImage(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "InternalReleaseImage is used to keep track and manage a set of release bundles (OCP and OLM operators images) that are stored into the control planes nodes.\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: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + 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{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "spec describes the configuration of this internal release image.", + Default: map[string]interface{}{}, + Ref: ref("github.com/openshift/api/machineconfiguration/v1alpha1.InternalReleaseImageSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "status describes the last observed state of this internal release image.", + Ref: ref("github.com/openshift/api/machineconfiguration/v1alpha1.InternalReleaseImageStatus"), + }, + }, + }, + Required: []string{"spec"}, + }, + }, + Dependencies: []string{ + "github.com/openshift/api/machineconfiguration/v1alpha1.InternalReleaseImageSpec", "github.com/openshift/api/machineconfiguration/v1alpha1.InternalReleaseImageStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_openshift_api_machineconfiguration_v1alpha1_InternalReleaseImageDetailedRef(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "InternalReleaseImageDetailedRef is used to provide a more detailed reference for a release bundle.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "name indicates the desired release bundle identifier. This field is required and must be between 1 and 64 characters long.", + Type: []string{"string"}, + Format: "", + }, + }, + "image": { + SchemaProps: spec.SchemaProps{ + Description: "image is an OCP release image referenced by digest. The format of the image pull spec is: host[:port][/namespace]/name@sha256:, where the digest must be 64 characters long, and consist only of lowercase hexadecimal characters, a-f and 0-9. The length of the whole spec must be between 1 to 447 characters.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name", "image"}, + }, + }, + } +} + +func schema_openshift_api_machineconfiguration_v1alpha1_InternalReleaseImageList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "InternalReleaseImageList is a list of InternalReleaseImage resources\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: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + 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{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/openshift/api/machineconfiguration/v1alpha1.InternalReleaseImage"), + }, + }, + }, + }, + }, + }, + Required: []string{"metadata", "items"}, + }, + }, + Dependencies: []string{ + "github.com/openshift/api/machineconfiguration/v1alpha1.InternalReleaseImage", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_openshift_api_machineconfiguration_v1alpha1_InternalReleaseImageRef(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "InternalReleaseImageRef is used to provide a simple reference for a release bundle. Currently it contains only the name field.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "name indicates the desired release bundle identifier. This field is required and must be between 1 and 64 characters long.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name"}, + }, + }, + } +} + +func schema_openshift_api_machineconfiguration_v1alpha1_InternalReleaseImageSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "InternalReleaseImageSpec defines the desired state of a InternalReleaseImage.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "releases": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "name", + }, + "x-kubernetes-list-type": "map", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "releases is a list of release bundle identifiers that the user wants to add/remove to/from the control plane nodes. This field can contain between 1 and 5 entries.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/openshift/api/machineconfiguration/v1alpha1.InternalReleaseImageRef"), + }, + }, + }, + }, + }, + }, + Required: []string{"releases"}, + }, + }, + Dependencies: []string{ + "github.com/openshift/api/machineconfiguration/v1alpha1.InternalReleaseImageRef"}, + } +} + +func schema_openshift_api_machineconfiguration_v1alpha1_InternalReleaseImageStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "InternalReleaseImageStatus describes the current state of a InternalReleaseImage.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "mountedReleases": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "name", + }, + "x-kubernetes-list-type": "map", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "mountedReleases is a list of release bundle identifiers currently detected from the ISO attached to one of the control plane nodes. Any reported identifier can be used to amend the `spec.Releases` field to add a new release bundle to the cluster. An empty value indicates that no ISOs are currently being detected on any control plane node. Must not exceed 5 entries.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/openshift/api/machineconfiguration/v1alpha1.InternalReleaseImageRef"), + }, + }, + }, + }, + }, + "availableReleases": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "name", + }, + "x-kubernetes-list-type": "map", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "availableReleases is a list of the release bundles currently owned and managed by the cluster, indicating that their images can be safely pulled by any cluster entity requiring them. This field can contain between 1 and 5 entries.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/openshift/api/machineconfiguration/v1alpha1.InternalReleaseImageDetailedRef"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/openshift/api/machineconfiguration/v1alpha1.InternalReleaseImageDetailedRef", "github.com/openshift/api/machineconfiguration/v1alpha1.InternalReleaseImageRef"}, + } +} + func schema_openshift_api_machineconfiguration_v1alpha1_MCOObjectReference(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ diff --git a/openapi/openapi.json b/openapi/openapi.json index ed68c69c625..7f0b769e679 100644 --- a/openapi/openapi.json +++ b/openapi/openapi.json @@ -25038,6 +25038,149 @@ } } }, + "com.github.openshift.api.machineconfiguration.v1alpha1.InternalReleaseImage": { + "description": "InternalReleaseImage is used to keep track and manage a set of release bundles (OCP and OLM operators images) that are stored into the control planes nodes.\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": [ + "spec" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "default": {}, + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "spec describes the configuration of this internal release image.", + "default": {}, + "$ref": "#/definitions/com.github.openshift.api.machineconfiguration.v1alpha1.InternalReleaseImageSpec" + }, + "status": { + "description": "status describes the last observed state of this internal release image.", + "$ref": "#/definitions/com.github.openshift.api.machineconfiguration.v1alpha1.InternalReleaseImageStatus" + } + } + }, + "com.github.openshift.api.machineconfiguration.v1alpha1.InternalReleaseImageDetailedRef": { + "description": "InternalReleaseImageDetailedRef is used to provide a more detailed reference for a release bundle.", + "type": "object", + "required": [ + "name", + "image" + ], + "properties": { + "image": { + "description": "image is an OCP release image referenced by digest. The format of the image pull spec is: host[:port][/namespace]/name@sha256:, where the digest must be 64 characters long, and consist only of lowercase hexadecimal characters, a-f and 0-9. The length of the whole spec must be between 1 to 447 characters.", + "type": "string" + }, + "name": { + "description": "name indicates the desired release bundle identifier. This field is required and must be between 1 and 64 characters long.", + "type": "string" + } + } + }, + "com.github.openshift.api.machineconfiguration.v1alpha1.InternalReleaseImageList": { + "description": "InternalReleaseImageList is a list of InternalReleaseImage resources\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": { + "type": "array", + "items": { + "default": {}, + "$ref": "#/definitions/com.github.openshift.api.machineconfiguration.v1alpha1.InternalReleaseImage" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "default": {}, + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + } + }, + "com.github.openshift.api.machineconfiguration.v1alpha1.InternalReleaseImageRef": { + "description": "InternalReleaseImageRef is used to provide a simple reference for a release bundle. Currently it contains only the name field.", + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "description": "name indicates the desired release bundle identifier. This field is required and must be between 1 and 64 characters long.", + "type": "string" + } + } + }, + "com.github.openshift.api.machineconfiguration.v1alpha1.InternalReleaseImageSpec": { + "description": "InternalReleaseImageSpec defines the desired state of a InternalReleaseImage.", + "type": "object", + "required": [ + "releases" + ], + "properties": { + "releases": { + "description": "releases is a list of release bundle identifiers that the user wants to add/remove to/from the control plane nodes. This field can contain between 1 and 5 entries.", + "type": "array", + "items": { + "default": {}, + "$ref": "#/definitions/com.github.openshift.api.machineconfiguration.v1alpha1.InternalReleaseImageRef" + }, + "x-kubernetes-list-map-keys": [ + "name" + ], + "x-kubernetes-list-type": "map" + } + } + }, + "com.github.openshift.api.machineconfiguration.v1alpha1.InternalReleaseImageStatus": { + "description": "InternalReleaseImageStatus describes the current state of a InternalReleaseImage.", + "type": "object", + "properties": { + "availableReleases": { + "description": "availableReleases is a list of the release bundles currently owned and managed by the cluster, indicating that their images can be safely pulled by any cluster entity requiring them. This field can contain between 1 and 5 entries.", + "type": "array", + "items": { + "default": {}, + "$ref": "#/definitions/com.github.openshift.api.machineconfiguration.v1alpha1.InternalReleaseImageDetailedRef" + }, + "x-kubernetes-list-map-keys": [ + "name" + ], + "x-kubernetes-list-type": "map" + }, + "mountedReleases": { + "description": "mountedReleases is a list of release bundle identifiers currently detected from the ISO attached to one of the control plane nodes. Any reported identifier can be used to amend the `spec.Releases` field to add a new release bundle to the cluster. An empty value indicates that no ISOs are currently being detected on any control plane node. Must not exceed 5 entries.", + "type": "array", + "items": { + "default": {}, + "$ref": "#/definitions/com.github.openshift.api.machineconfiguration.v1alpha1.InternalReleaseImageRef" + }, + "x-kubernetes-list-map-keys": [ + "name" + ], + "x-kubernetes-list-type": "map" + } + } + }, "com.github.openshift.api.machineconfiguration.v1alpha1.MCOObjectReference": { "description": "MCOObjectReference holds information about an object the MCO either owns or modifies in some way", "type": "object", diff --git a/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-Hypershift-CustomNoUpgrade.crd.yaml b/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-Hypershift-CustomNoUpgrade.crd.yaml new file mode 100644 index 00000000000..c1956dde36c --- /dev/null +++ b/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-Hypershift-CustomNoUpgrade.crd.yaml @@ -0,0 +1,619 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + api-approved.openshift.io: https://github.com/openshift/api/pull/2255 + api.openshift.io/merged-by-featuregates: "true" + include.release.openshift.io/ibm-cloud-managed: "true" + release.openshift.io/feature-set: CustomNoUpgrade + labels: + openshift.io/operator-managed: "" + name: machineconfignodes.machineconfiguration.openshift.io +spec: + group: machineconfiguration.openshift.io + names: + kind: MachineConfigNode + listKind: MachineConfigNodeList + plural: machineconfignodes + singular: machineconfignode + scope: Cluster + versions: + - additionalPrinterColumns: + - jsonPath: .spec.pool.name + name: PoolName + type: string + - jsonPath: .spec.configVersion.desired + name: DesiredConfig + type: string + - jsonPath: .status.configVersion.current + name: CurrentConfig + type: string + - jsonPath: .status.conditions[?(@.type=="Updated")].status + name: Updated + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + - jsonPath: .status.conditions[?(@.type=="UpdatePrepared")].status + name: UpdatePrepared + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="UpdateExecuted")].status + name: UpdateExecuted + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="UpdatePostActionComplete")].status + name: UpdatePostActionComplete + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="UpdateComplete")].status + name: UpdateComplete + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="Resumed")].status + name: Resumed + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="AppliedFilesAndOS")].status + name: UpdatedFilesAndOS + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="Cordoned")].status + name: CordonedNode + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="Drained")].status + name: DrainedNode + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="RebootedNode")].status + name: RebootedNode + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="Uncordoned")].status + name: UncordonedNode + priority: 1 + type: string + name: v1 + schema: + openAPIV3Schema: + description: |- + MachineConfigNode describes the health of the Machines on the system + Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: spec describes the configuration of the machine config node. + properties: + configImage: + description: |- + configImage is an optional field for configuring the OS image to be used for this node. This field will only exist if the node belongs to a pool opted into on-cluster image builds, and will override any MachineConfig referenced OSImageURL fields + When omitted, Image Mode is not be enabled and the node will follow the standard update process of creating a rendered MachineConfig and updating to its specifications. + When specified, Image Mode is enabled and will attempt to update the node to use the desired image. Following this, the node will follow the standard update process of creating a rendered MachineConfig and updating to its specifications. + properties: + desiredImage: + description: |- + desiredImage is a required field that configures the image that the node should be updated to use. + It must be a fully qualified OCI image pull spec of the format host[:port][/namespace]/name@sha256:, where the digest must be exactly 64 characters in length and consist only of lowercase hexadecimal characters, a-f and 0-9. + desiredImage must not be an empty string and must not exceed 447 characters in length. + maxLength: 447 + minLength: 1 + type: string + x-kubernetes-validations: + - message: the OCI Image reference must end with a valid '@sha256:' + suffix, where '' is 64 characters long + rule: (self.split('@').size() == 2 && self.split('@')[1].matches('^sha256:[a-f0-9]{64}$')) + - message: the OCI Image name should follow the host[:port][/namespace]/name + format, resembling a valid URL without the scheme + rule: (self.split('@')[0].matches('^([a-zA-Z0-9-]+\\.)+[a-zA-Z0-9-]+(:[0-9]{2,5})?/([a-zA-Z0-9-_]{0,61}/)?[a-zA-Z0-9-_.]*?$')) + required: + - desiredImage + type: object + 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 and gets set before the machine config operator validates + the new machine config against the current machine config. + 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 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 + 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 + node: + description: node contains a reference to the node for this machine + config node. + properties: + name: + 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. + maxLength: 253 + 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 + pool: + description: |- + pool contains a reference to the machine config pool that this machine config node's + referenced node belongs to. + properties: + name: + 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. + maxLength: 253 + 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 + required: + - configVersion + - node + - pool + type: object + status: + description: status describes the last observed state of this machine + config node. + properties: + conditions: + description: |- + conditions represent the observations of a machine config node's current state. Valid types are: + UpdatePrepared, UpdateExecuted, UpdatePostActionComplete, UpdateComplete, Updated, Resumed, + Drained, AppliedFilesAndOS, Cordoned, Uncordoned, RebootedNode, NodeDegraded, PinnedImageSetsProgressing, + and PinnedImageSetsDegraded. + The following types are only available when the ImageModeStatusReporting feature gate is enabled: ImagePulledFromRegistry, + AppliedOSImage, AppliedFiles + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 20 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + configImage: + description: |- + configImage is an optional field for configuring the OS image to be used for this node. This field will only exist if the node belongs to a pool opted into on-cluster image builds, and will override any MachineConfig referenced OSImageURL fields. + When omitted, this means that the Image Mode feature is not being used and the node will be up to date with the specific current rendered config version for the nodes MachinePool. + When specified, the Image Mode feature is enabled and the contents of this field show the observed state of the node image. + When Image Mode is enabled and a new MachineConfig is applied such that a new OS image build is not created, only the configVersion field will change. + When Image Mode is enabled and a new MachineConfig is applied such that a new OS image build is created, then only the configImage field will change. It is also possible that both the configImage + and configVersion change during the same update. + minProperties: 1 + properties: + currentImage: + description: |- + currentImage is an optional field that represents the current image that is applied to the node. + When omitted, this means that no image updates have been applied to the node and it will be up to date with the specific current rendered config version. + When specified, this means that the node is currently using this image. + currentImage must be a fully qualified OCI image pull spec of the format host[:port][/namespace]/name@sha256:, where the digest must be exactly 64 characters in length and consist only of lowercase hexadecimal characters, a-f and 0-9. + currentImage must not be an empty string and must not exceed 447 characters in length. + maxLength: 447 + minLength: 1 + type: string + x-kubernetes-validations: + - message: the OCI Image reference must end with a valid '@sha256:' + suffix, where '' is 64 characters long + rule: (self.split('@').size() == 2 && self.split('@')[1].matches('^sha256:[a-f0-9]{64}$')) + - message: the OCI Image name should follow the host[:port][/namespace]/name + format, resembling a valid URL without the scheme + rule: (self.split('@')[0].matches('^([a-zA-Z0-9-]+\\.)+[a-zA-Z0-9-]+(:[0-9]{2,5})?/([a-zA-Z0-9-_]{0,61}/)?[a-zA-Z0-9-_.]*?$')) + desiredImage: + description: |- + desiredImage is an optional field that represents the currently observed state of image that the node should be updated to use. + When not specified, this means that Image Mode has been disabled and the node will up to date with the specific current rendered config version. + When specified, this means that Image Mode has been enabled and the node is actively progressing to update the node to this image. + If currentImage and desiredImage match, the node has been successfully updated to use the desired image. + desiredImage must be a fully qualified OCI image pull spec of the format host[:port][/namespace]/name@sha256:, where the digest must be exactly 64 characters in length and consist only of lowercase hexadecimal characters, a-f and 0-9. + desiredImage must not be an empty string and must not exceed 447 characters in length. + maxLength: 447 + minLength: 1 + type: string + x-kubernetes-validations: + - message: the OCI Image reference must end with a valid '@sha256:' + suffix, where '' is 64 characters long + rule: (self.split('@').size() == 2 && self.split('@')[1].matches('^sha256:[a-f0-9]{64}$')) + - message: the OCI Image name should follow the host[:port][/namespace]/name + format, resembling a valid URL without the scheme + rule: (self.split('@')[0].matches('^([a-zA-Z0-9-]+\\.)+[a-zA-Z0-9-]+(:[0-9]{2,5})?/([a-zA-Z0-9-_]{0,61}/)?[a-zA-Z0-9-_.]*?$')) + type: object + configVersion: + 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 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 + 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 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 + 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 + internalReleaseImage: + description: |- + internalReleaseImage describes the status of the release payloads stored in the node. + When specified, an internalReleaseImage custom resource exists on the cluster, and the specified images will be made available on the control plane nodes. + This field will reflect the actual on-disk state of those release images. + properties: + releases: + description: |- + releases is a list of the release bundles currently owned and managed by the + cluster, indicating that their images can be safely pulled by any cluster entity + requiring them. + This field can contain between 1 and 5 entries. + items: + description: |- + MachineConfigNodeStatusInternalReleaseImageRef is used to provide a more detailed reference for + a release bundle. + properties: + conditions: + description: |- + conditions represent the observations of an internal release image current state. See InternalReleaseImageConditionType for the possible + type values. + items: + description: Condition contains details for one aspect + of the current state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, + False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in + foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 5 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + image: + description: |- + image is an OCP release image referenced by digest. + The format of the image pull spec is: host[:port][/namespace]/name@sha256:, + where the digest must be 64 characters long, and consist only of lowercase hexadecimal characters, a-f and 0-9. + The length of the whole spec must be between 1 to 447 characters. + maxLength: 447 + minLength: 1 + type: string + x-kubernetes-validations: + - message: the OCI Image reference must end with a valid + '@sha256:' suffix, where '' is 64 characters + long + rule: (self.split('@').size() == 2 && self.split('@')[1].matches('^sha256:[a-f0-9]{64}$')) + - message: the OCI Image name should follow the host[:port][/namespace]/name + format, resembling a valid URL without the scheme + rule: (self.split('@')[0].matches('^([a-zA-Z0-9-]+\\.)+[a-zA-Z0-9-]+(:[0-9]{2,5})?/([a-zA-Z0-9-_]{0,61}/)?[a-zA-Z0-9-_.]*?$')) + name: + description: name indicates the desired release bundle identifier. + This field is required and must be between 1 and 64 characters + long. + maxLength: 64 + minLength: 1 + type: string + required: + - image + - name + type: object + maxItems: 5 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + required: + - releases + type: object + irreconcilableChanges: + description: |- + irreconcilableChanges is an optional field that contains the observed differences between this nodes + configuration and the target rendered MachineConfig. + This field will be set when there are changes to the target rendered MachineConfig that can only be applied to + new nodes joining the cluster. + Entries must be unique, keyed on the fieldPath field. + Must not exceed 32 entries. + items: + description: |- + IrreconcilableChangeDiff holds an individual diff between the initial install-time MachineConfig + and the latest applied one caused by the presence of irreconcilable changes. + properties: + diff: + description: |- + diff is a required field containing the difference between the nodes current configuration and the latest + rendered MachineConfig for the field specified in fieldPath. + Must not be an empty string and must not exceed 4096 characters in length. + maxLength: 4096 + minLength: 1 + type: string + fieldPath: + description: |- + fieldPath is a required reference to the path in the latest rendered MachineConfig that differs from this nodes + configuration. + Must not be empty and must not exceed 70 characters in length. + Must begin with the prefix 'spec.' and only contain alphanumeric characters, square brackets ('[]'), or dots ('.'). + maxLength: 70 + minLength: 1 + type: string + x-kubernetes-validations: + - message: The fieldPath must start with `spec.` + rule: self.startsWith('spec.') + - message: The fieldPath must consist only of alphanumeric characters, + brackets [] and dots ('.'). + rule: self.matches('^[\\da-zA-Z\\.\\[\\]]+$') + required: + - diff + - fieldPath + type: object + maxItems: 32 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - fieldPath + x-kubernetes-list-type: map + observedGeneration: + 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. + format: int64 + minimum: 1 + 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. + 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: 1 + type: integer + x-kubernetes-validations: + - message: currentGeneration must not decrease + rule: self >= oldSelf + desiredGeneration: + description: desiredGeneration is the generation of the pinned + image set that is targeted to be pulled and pinned on this + node. + format: int32 + minimum: 1 + 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 + on this node. + format: int32 + minimum: 1 + type: integer + 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 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 + 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 + x-kubernetes-validations: + - message: desired generation must be greater than or equal to the + current generation + rule: 'has(self.desiredGeneration) && has(self.currentGeneration) + ? self.desiredGeneration >= self.currentGeneration : true' + - 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: 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: + - name + x-kubernetes-list-type: map + type: object + required: + - spec + type: object + x-kubernetes-validations: + - message: spec.node.name should match metadata.name + rule: self.metadata.name == self.spec.node.name + served: true + storage: true + subresources: + status: {} diff --git a/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-Hypershift-Default.crd.yaml b/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-Hypershift-Default.crd.yaml new file mode 100644 index 00000000000..b05742e01ee --- /dev/null +++ b/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-Hypershift-Default.crd.yaml @@ -0,0 +1,383 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + api-approved.openshift.io: https://github.com/openshift/api/pull/2255 + api.openshift.io/merged-by-featuregates: "true" + include.release.openshift.io/ibm-cloud-managed: "true" + release.openshift.io/feature-set: Default + labels: + openshift.io/operator-managed: "" + name: machineconfignodes.machineconfiguration.openshift.io +spec: + group: machineconfiguration.openshift.io + names: + kind: MachineConfigNode + listKind: MachineConfigNodeList + plural: machineconfignodes + singular: machineconfignode + scope: Cluster + versions: + - additionalPrinterColumns: + - jsonPath: .spec.pool.name + name: PoolName + type: string + - jsonPath: .spec.configVersion.desired + name: DesiredConfig + type: string + - jsonPath: .status.configVersion.current + name: CurrentConfig + type: string + - jsonPath: .status.conditions[?(@.type=="Updated")].status + name: Updated + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + - jsonPath: .status.conditions[?(@.type=="UpdatePrepared")].status + name: UpdatePrepared + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="UpdateExecuted")].status + name: UpdateExecuted + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="UpdatePostActionComplete")].status + name: UpdatePostActionComplete + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="UpdateComplete")].status + name: UpdateComplete + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="Resumed")].status + name: Resumed + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="AppliedFilesAndOS")].status + name: UpdatedFilesAndOS + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="Cordoned")].status + name: CordonedNode + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="Drained")].status + name: DrainedNode + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="RebootedNode")].status + name: RebootedNode + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="Uncordoned")].status + name: UncordonedNode + priority: 1 + type: string + name: v1 + schema: + openAPIV3Schema: + description: |- + MachineConfigNode describes the health of the Machines on the system + Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: spec describes the configuration of the machine config node. + 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 and gets set before the machine config operator validates + the new machine config against the current machine config. + 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 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 + 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 + node: + description: node contains a reference to the node for this machine + config node. + properties: + name: + 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. + maxLength: 253 + 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 + pool: + description: |- + pool contains a reference to the machine config pool that this machine config node's + referenced node belongs to. + properties: + name: + 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. + maxLength: 253 + 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 + required: + - configVersion + - node + - pool + type: object + status: + description: status describes the last observed state of this machine + config node. + properties: + conditions: + description: |- + conditions represent the observations of a machine config node's current state. Valid types are: + UpdatePrepared, UpdateExecuted, UpdatePostActionComplete, UpdateComplete, Updated, Resumed, + Drained, AppliedFilesAndOS, Cordoned, Uncordoned, RebootedNode, NodeDegraded, PinnedImageSetsProgressing, + and PinnedImageSetsDegraded. + The following types are only available when the ImageModeStatusReporting feature gate is enabled: ImagePulledFromRegistry, + AppliedOSImage, AppliedFiles + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - 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 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 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 + 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 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 + 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 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: 1 + 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. + 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: 1 + type: integer + x-kubernetes-validations: + - message: currentGeneration must not decrease + rule: self >= oldSelf + desiredGeneration: + description: desiredGeneration is the generation of the pinned + image set that is targeted to be pulled and pinned on this + node. + format: int32 + minimum: 1 + 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 + on this node. + format: int32 + minimum: 1 + type: integer + 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 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 + 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 + x-kubernetes-validations: + - message: desired generation must be greater than or equal to the + current generation + rule: 'has(self.desiredGeneration) && has(self.currentGeneration) + ? self.desiredGeneration >= self.currentGeneration : true' + - 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: 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: + - name + x-kubernetes-list-type: map + type: object + required: + - spec + type: object + x-kubernetes-validations: + - message: spec.node.name should match metadata.name + rule: self.metadata.name == self.spec.node.name + served: true + storage: true + subresources: + status: {} 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-Hypershift-DevPreviewNoUpgrade.crd.yaml similarity index 99% rename from payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-DevPreviewNoUpgrade.crd.yaml rename to payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-Hypershift-DevPreviewNoUpgrade.crd.yaml index 15523b5db10..4e0cddf98e2 100644 --- a/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-DevPreviewNoUpgrade.crd.yaml +++ b/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-Hypershift-DevPreviewNoUpgrade.crd.yaml @@ -5,7 +5,6 @@ metadata: api-approved.openshift.io: https://github.com/openshift/api/pull/2255 api.openshift.io/merged-by-featuregates: "true" include.release.openshift.io/ibm-cloud-managed: "true" - include.release.openshift.io/self-managed-high-availability: "true" release.openshift.io/feature-set: DevPreviewNoUpgrade labels: openshift.io/operator-managed: "" diff --git a/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-TechPreviewNoUpgrade.crd.yaml b/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-Hypershift-TechPreviewNoUpgrade.crd.yaml similarity index 99% rename from machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-TechPreviewNoUpgrade.crd.yaml rename to payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-Hypershift-TechPreviewNoUpgrade.crd.yaml index 02402f75056..1022ae3ccb4 100644 --- a/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-TechPreviewNoUpgrade.crd.yaml +++ b/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-Hypershift-TechPreviewNoUpgrade.crd.yaml @@ -5,7 +5,6 @@ metadata: api-approved.openshift.io: https://github.com/openshift/api/pull/2255 api.openshift.io/merged-by-featuregates: "true" include.release.openshift.io/ibm-cloud-managed: "true" - include.release.openshift.io/self-managed-high-availability: "true" release.openshift.io/feature-set: TechPreviewNoUpgrade labels: openshift.io/operator-managed: "" 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-SelfManagedHA-CustomNoUpgrade.crd.yaml similarity index 79% rename from payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-CustomNoUpgrade.crd.yaml rename to payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-CustomNoUpgrade.crd.yaml index 03e01cd2f60..727733b84ea 100644 --- a/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-CustomNoUpgrade.crd.yaml +++ b/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-CustomNoUpgrade.crd.yaml @@ -4,7 +4,6 @@ metadata: annotations: api-approved.openshift.io: https://github.com/openshift/api/pull/2255 api.openshift.io/merged-by-featuregates: "true" - include.release.openshift.io/ibm-cloud-managed: "true" include.release.openshift.io/self-managed-high-availability: "true" release.openshift.io/feature-set: CustomNoUpgrade labels: @@ -353,6 +352,126 @@ spec: required: - desired type: object + internalReleaseImage: + description: |- + internalReleaseImage describes the status of the release payloads stored in the node. + When specified, an internalReleaseImage custom resource exists on the cluster, and the specified images will be made available on the control plane nodes. + This field will reflect the actual on-disk state of those release images. + properties: + releases: + description: |- + releases is a list of the release bundles currently owned and managed by the + cluster, indicating that their images can be safely pulled by any cluster entity + requiring them. + This field can contain between 1 and 5 entries. + items: + description: |- + MachineConfigNodeStatusInternalReleaseImageRef is used to provide a more detailed reference for + a release bundle. + properties: + conditions: + description: |- + conditions represent the observations of an internal release image current state. See InternalReleaseImageConditionType for the possible + type values. + items: + description: Condition contains details for one aspect + of the current state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, + False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in + foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 5 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + image: + description: |- + image is an OCP release image referenced by digest. + The format of the image pull spec is: host[:port][/namespace]/name@sha256:, + where the digest must be 64 characters long, and consist only of lowercase hexadecimal characters, a-f and 0-9. + The length of the whole spec must be between 1 to 447 characters. + maxLength: 447 + minLength: 1 + type: string + x-kubernetes-validations: + - message: the OCI Image reference must end with a valid + '@sha256:' suffix, where '' is 64 characters + long + rule: (self.split('@').size() == 2 && self.split('@')[1].matches('^sha256:[a-f0-9]{64}$')) + - message: the OCI Image name should follow the host[:port][/namespace]/name + format, resembling a valid URL without the scheme + rule: (self.split('@')[0].matches('^([a-zA-Z0-9-]+\\.)+[a-zA-Z0-9-]+(:[0-9]{2,5})?/([a-zA-Z0-9-_]{0,61}/)?[a-zA-Z0-9-_.]*?$')) + name: + description: name indicates the desired release bundle identifier. + This field is required and must be between 1 and 64 characters + long. + maxLength: 64 + minLength: 1 + type: string + required: + - image + - name + type: object + maxItems: 5 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + required: + - releases + type: object irreconcilableChanges: description: |- irreconcilableChanges is an optional field that contains the observed differences between this nodes diff --git a/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-Default.crd.yaml b/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-Default.crd.yaml similarity index 99% rename from payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-Default.crd.yaml rename to payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-Default.crd.yaml index 4e96be5ea9e..84e5ff76260 100644 --- a/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-Default.crd.yaml +++ b/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-Default.crd.yaml @@ -4,7 +4,6 @@ metadata: annotations: api-approved.openshift.io: https://github.com/openshift/api/pull/2255 api.openshift.io/merged-by-featuregates: "true" - include.release.openshift.io/ibm-cloud-managed: "true" include.release.openshift.io/self-managed-high-availability: "true" release.openshift.io/feature-set: Default labels: diff --git a/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-DevPreviewNoUpgrade.crd.yaml b/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-DevPreviewNoUpgrade.crd.yaml new file mode 100644 index 00000000000..0b8e0d0ee4c --- /dev/null +++ b/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-DevPreviewNoUpgrade.crd.yaml @@ -0,0 +1,619 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + api-approved.openshift.io: https://github.com/openshift/api/pull/2255 + api.openshift.io/merged-by-featuregates: "true" + include.release.openshift.io/self-managed-high-availability: "true" + release.openshift.io/feature-set: DevPreviewNoUpgrade + labels: + openshift.io/operator-managed: "" + name: machineconfignodes.machineconfiguration.openshift.io +spec: + group: machineconfiguration.openshift.io + names: + kind: MachineConfigNode + listKind: MachineConfigNodeList + plural: machineconfignodes + singular: machineconfignode + scope: Cluster + versions: + - additionalPrinterColumns: + - jsonPath: .spec.pool.name + name: PoolName + type: string + - jsonPath: .spec.configVersion.desired + name: DesiredConfig + type: string + - jsonPath: .status.configVersion.current + name: CurrentConfig + type: string + - jsonPath: .status.conditions[?(@.type=="Updated")].status + name: Updated + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + - jsonPath: .status.conditions[?(@.type=="UpdatePrepared")].status + name: UpdatePrepared + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="UpdateExecuted")].status + name: UpdateExecuted + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="UpdatePostActionComplete")].status + name: UpdatePostActionComplete + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="UpdateComplete")].status + name: UpdateComplete + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="Resumed")].status + name: Resumed + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="AppliedFilesAndOS")].status + name: UpdatedFilesAndOS + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="Cordoned")].status + name: CordonedNode + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="Drained")].status + name: DrainedNode + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="RebootedNode")].status + name: RebootedNode + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="Uncordoned")].status + name: UncordonedNode + priority: 1 + type: string + name: v1 + schema: + openAPIV3Schema: + description: |- + MachineConfigNode describes the health of the Machines on the system + Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: spec describes the configuration of the machine config node. + properties: + configImage: + description: |- + configImage is an optional field for configuring the OS image to be used for this node. This field will only exist if the node belongs to a pool opted into on-cluster image builds, and will override any MachineConfig referenced OSImageURL fields + When omitted, Image Mode is not be enabled and the node will follow the standard update process of creating a rendered MachineConfig and updating to its specifications. + When specified, Image Mode is enabled and will attempt to update the node to use the desired image. Following this, the node will follow the standard update process of creating a rendered MachineConfig and updating to its specifications. + properties: + desiredImage: + description: |- + desiredImage is a required field that configures the image that the node should be updated to use. + It must be a fully qualified OCI image pull spec of the format host[:port][/namespace]/name@sha256:, where the digest must be exactly 64 characters in length and consist only of lowercase hexadecimal characters, a-f and 0-9. + desiredImage must not be an empty string and must not exceed 447 characters in length. + maxLength: 447 + minLength: 1 + type: string + x-kubernetes-validations: + - message: the OCI Image reference must end with a valid '@sha256:' + suffix, where '' is 64 characters long + rule: (self.split('@').size() == 2 && self.split('@')[1].matches('^sha256:[a-f0-9]{64}$')) + - message: the OCI Image name should follow the host[:port][/namespace]/name + format, resembling a valid URL without the scheme + rule: (self.split('@')[0].matches('^([a-zA-Z0-9-]+\\.)+[a-zA-Z0-9-]+(:[0-9]{2,5})?/([a-zA-Z0-9-_]{0,61}/)?[a-zA-Z0-9-_.]*?$')) + required: + - desiredImage + type: object + 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 and gets set before the machine config operator validates + the new machine config against the current machine config. + 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 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 + 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 + node: + description: node contains a reference to the node for this machine + config node. + properties: + name: + 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. + maxLength: 253 + 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 + pool: + description: |- + pool contains a reference to the machine config pool that this machine config node's + referenced node belongs to. + properties: + name: + 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. + maxLength: 253 + 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 + required: + - configVersion + - node + - pool + type: object + status: + description: status describes the last observed state of this machine + config node. + properties: + conditions: + description: |- + conditions represent the observations of a machine config node's current state. Valid types are: + UpdatePrepared, UpdateExecuted, UpdatePostActionComplete, UpdateComplete, Updated, Resumed, + Drained, AppliedFilesAndOS, Cordoned, Uncordoned, RebootedNode, NodeDegraded, PinnedImageSetsProgressing, + and PinnedImageSetsDegraded. + The following types are only available when the ImageModeStatusReporting feature gate is enabled: ImagePulledFromRegistry, + AppliedOSImage, AppliedFiles + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 20 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + configImage: + description: |- + configImage is an optional field for configuring the OS image to be used for this node. This field will only exist if the node belongs to a pool opted into on-cluster image builds, and will override any MachineConfig referenced OSImageURL fields. + When omitted, this means that the Image Mode feature is not being used and the node will be up to date with the specific current rendered config version for the nodes MachinePool. + When specified, the Image Mode feature is enabled and the contents of this field show the observed state of the node image. + When Image Mode is enabled and a new MachineConfig is applied such that a new OS image build is not created, only the configVersion field will change. + When Image Mode is enabled and a new MachineConfig is applied such that a new OS image build is created, then only the configImage field will change. It is also possible that both the configImage + and configVersion change during the same update. + minProperties: 1 + properties: + currentImage: + description: |- + currentImage is an optional field that represents the current image that is applied to the node. + When omitted, this means that no image updates have been applied to the node and it will be up to date with the specific current rendered config version. + When specified, this means that the node is currently using this image. + currentImage must be a fully qualified OCI image pull spec of the format host[:port][/namespace]/name@sha256:, where the digest must be exactly 64 characters in length and consist only of lowercase hexadecimal characters, a-f and 0-9. + currentImage must not be an empty string and must not exceed 447 characters in length. + maxLength: 447 + minLength: 1 + type: string + x-kubernetes-validations: + - message: the OCI Image reference must end with a valid '@sha256:' + suffix, where '' is 64 characters long + rule: (self.split('@').size() == 2 && self.split('@')[1].matches('^sha256:[a-f0-9]{64}$')) + - message: the OCI Image name should follow the host[:port][/namespace]/name + format, resembling a valid URL without the scheme + rule: (self.split('@')[0].matches('^([a-zA-Z0-9-]+\\.)+[a-zA-Z0-9-]+(:[0-9]{2,5})?/([a-zA-Z0-9-_]{0,61}/)?[a-zA-Z0-9-_.]*?$')) + desiredImage: + description: |- + desiredImage is an optional field that represents the currently observed state of image that the node should be updated to use. + When not specified, this means that Image Mode has been disabled and the node will up to date with the specific current rendered config version. + When specified, this means that Image Mode has been enabled and the node is actively progressing to update the node to this image. + If currentImage and desiredImage match, the node has been successfully updated to use the desired image. + desiredImage must be a fully qualified OCI image pull spec of the format host[:port][/namespace]/name@sha256:, where the digest must be exactly 64 characters in length and consist only of lowercase hexadecimal characters, a-f and 0-9. + desiredImage must not be an empty string and must not exceed 447 characters in length. + maxLength: 447 + minLength: 1 + type: string + x-kubernetes-validations: + - message: the OCI Image reference must end with a valid '@sha256:' + suffix, where '' is 64 characters long + rule: (self.split('@').size() == 2 && self.split('@')[1].matches('^sha256:[a-f0-9]{64}$')) + - message: the OCI Image name should follow the host[:port][/namespace]/name + format, resembling a valid URL without the scheme + rule: (self.split('@')[0].matches('^([a-zA-Z0-9-]+\\.)+[a-zA-Z0-9-]+(:[0-9]{2,5})?/([a-zA-Z0-9-_]{0,61}/)?[a-zA-Z0-9-_.]*?$')) + type: object + configVersion: + 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 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 + 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 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 + 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 + internalReleaseImage: + description: |- + internalReleaseImage describes the status of the release payloads stored in the node. + When specified, an internalReleaseImage custom resource exists on the cluster, and the specified images will be made available on the control plane nodes. + This field will reflect the actual on-disk state of those release images. + properties: + releases: + description: |- + releases is a list of the release bundles currently owned and managed by the + cluster, indicating that their images can be safely pulled by any cluster entity + requiring them. + This field can contain between 1 and 5 entries. + items: + description: |- + MachineConfigNodeStatusInternalReleaseImageRef is used to provide a more detailed reference for + a release bundle. + properties: + conditions: + description: |- + conditions represent the observations of an internal release image current state. See InternalReleaseImageConditionType for the possible + type values. + items: + description: Condition contains details for one aspect + of the current state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, + False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in + foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 5 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + image: + description: |- + image is an OCP release image referenced by digest. + The format of the image pull spec is: host[:port][/namespace]/name@sha256:, + where the digest must be 64 characters long, and consist only of lowercase hexadecimal characters, a-f and 0-9. + The length of the whole spec must be between 1 to 447 characters. + maxLength: 447 + minLength: 1 + type: string + x-kubernetes-validations: + - message: the OCI Image reference must end with a valid + '@sha256:' suffix, where '' is 64 characters + long + rule: (self.split('@').size() == 2 && self.split('@')[1].matches('^sha256:[a-f0-9]{64}$')) + - message: the OCI Image name should follow the host[:port][/namespace]/name + format, resembling a valid URL without the scheme + rule: (self.split('@')[0].matches('^([a-zA-Z0-9-]+\\.)+[a-zA-Z0-9-]+(:[0-9]{2,5})?/([a-zA-Z0-9-_]{0,61}/)?[a-zA-Z0-9-_.]*?$')) + name: + description: name indicates the desired release bundle identifier. + This field is required and must be between 1 and 64 characters + long. + maxLength: 64 + minLength: 1 + type: string + required: + - image + - name + type: object + maxItems: 5 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + required: + - releases + type: object + irreconcilableChanges: + description: |- + irreconcilableChanges is an optional field that contains the observed differences between this nodes + configuration and the target rendered MachineConfig. + This field will be set when there are changes to the target rendered MachineConfig that can only be applied to + new nodes joining the cluster. + Entries must be unique, keyed on the fieldPath field. + Must not exceed 32 entries. + items: + description: |- + IrreconcilableChangeDiff holds an individual diff between the initial install-time MachineConfig + and the latest applied one caused by the presence of irreconcilable changes. + properties: + diff: + description: |- + diff is a required field containing the difference between the nodes current configuration and the latest + rendered MachineConfig for the field specified in fieldPath. + Must not be an empty string and must not exceed 4096 characters in length. + maxLength: 4096 + minLength: 1 + type: string + fieldPath: + description: |- + fieldPath is a required reference to the path in the latest rendered MachineConfig that differs from this nodes + configuration. + Must not be empty and must not exceed 70 characters in length. + Must begin with the prefix 'spec.' and only contain alphanumeric characters, square brackets ('[]'), or dots ('.'). + maxLength: 70 + minLength: 1 + type: string + x-kubernetes-validations: + - message: The fieldPath must start with `spec.` + rule: self.startsWith('spec.') + - message: The fieldPath must consist only of alphanumeric characters, + brackets [] and dots ('.'). + rule: self.matches('^[\\da-zA-Z\\.\\[\\]]+$') + required: + - diff + - fieldPath + type: object + maxItems: 32 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - fieldPath + x-kubernetes-list-type: map + observedGeneration: + 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. + format: int64 + minimum: 1 + 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. + 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: 1 + type: integer + x-kubernetes-validations: + - message: currentGeneration must not decrease + rule: self >= oldSelf + desiredGeneration: + description: desiredGeneration is the generation of the pinned + image set that is targeted to be pulled and pinned on this + node. + format: int32 + minimum: 1 + 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 + on this node. + format: int32 + minimum: 1 + type: integer + 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 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 + 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 + x-kubernetes-validations: + - message: desired generation must be greater than or equal to the + current generation + rule: 'has(self.desiredGeneration) && has(self.currentGeneration) + ? self.desiredGeneration >= self.currentGeneration : true' + - 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: 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: + - name + x-kubernetes-list-type: map + type: object + required: + - spec + type: object + x-kubernetes-validations: + - message: spec.node.name should match metadata.name + rule: self.metadata.name == self.spec.node.name + served: true + storage: true + subresources: + status: {} diff --git a/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-TechPreviewNoUpgrade.crd.yaml b/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-TechPreviewNoUpgrade.crd.yaml new file mode 100644 index 00000000000..34b48f9006e --- /dev/null +++ b/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-TechPreviewNoUpgrade.crd.yaml @@ -0,0 +1,619 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + api-approved.openshift.io: https://github.com/openshift/api/pull/2255 + api.openshift.io/merged-by-featuregates: "true" + include.release.openshift.io/self-managed-high-availability: "true" + release.openshift.io/feature-set: TechPreviewNoUpgrade + labels: + openshift.io/operator-managed: "" + name: machineconfignodes.machineconfiguration.openshift.io +spec: + group: machineconfiguration.openshift.io + names: + kind: MachineConfigNode + listKind: MachineConfigNodeList + plural: machineconfignodes + singular: machineconfignode + scope: Cluster + versions: + - additionalPrinterColumns: + - jsonPath: .spec.pool.name + name: PoolName + type: string + - jsonPath: .spec.configVersion.desired + name: DesiredConfig + type: string + - jsonPath: .status.configVersion.current + name: CurrentConfig + type: string + - jsonPath: .status.conditions[?(@.type=="Updated")].status + name: Updated + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + - jsonPath: .status.conditions[?(@.type=="UpdatePrepared")].status + name: UpdatePrepared + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="UpdateExecuted")].status + name: UpdateExecuted + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="UpdatePostActionComplete")].status + name: UpdatePostActionComplete + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="UpdateComplete")].status + name: UpdateComplete + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="Resumed")].status + name: Resumed + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="AppliedFilesAndOS")].status + name: UpdatedFilesAndOS + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="Cordoned")].status + name: CordonedNode + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="Drained")].status + name: DrainedNode + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="RebootedNode")].status + name: RebootedNode + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="Uncordoned")].status + name: UncordonedNode + priority: 1 + type: string + name: v1 + schema: + openAPIV3Schema: + description: |- + MachineConfigNode describes the health of the Machines on the system + Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: spec describes the configuration of the machine config node. + properties: + configImage: + description: |- + configImage is an optional field for configuring the OS image to be used for this node. This field will only exist if the node belongs to a pool opted into on-cluster image builds, and will override any MachineConfig referenced OSImageURL fields + When omitted, Image Mode is not be enabled and the node will follow the standard update process of creating a rendered MachineConfig and updating to its specifications. + When specified, Image Mode is enabled and will attempt to update the node to use the desired image. Following this, the node will follow the standard update process of creating a rendered MachineConfig and updating to its specifications. + properties: + desiredImage: + description: |- + desiredImage is a required field that configures the image that the node should be updated to use. + It must be a fully qualified OCI image pull spec of the format host[:port][/namespace]/name@sha256:, where the digest must be exactly 64 characters in length and consist only of lowercase hexadecimal characters, a-f and 0-9. + desiredImage must not be an empty string and must not exceed 447 characters in length. + maxLength: 447 + minLength: 1 + type: string + x-kubernetes-validations: + - message: the OCI Image reference must end with a valid '@sha256:' + suffix, where '' is 64 characters long + rule: (self.split('@').size() == 2 && self.split('@')[1].matches('^sha256:[a-f0-9]{64}$')) + - message: the OCI Image name should follow the host[:port][/namespace]/name + format, resembling a valid URL without the scheme + rule: (self.split('@')[0].matches('^([a-zA-Z0-9-]+\\.)+[a-zA-Z0-9-]+(:[0-9]{2,5})?/([a-zA-Z0-9-_]{0,61}/)?[a-zA-Z0-9-_.]*?$')) + required: + - desiredImage + type: object + 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 and gets set before the machine config operator validates + the new machine config against the current machine config. + 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 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 + 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 + node: + description: node contains a reference to the node for this machine + config node. + properties: + name: + 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. + maxLength: 253 + 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 + pool: + description: |- + pool contains a reference to the machine config pool that this machine config node's + referenced node belongs to. + properties: + name: + 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. + maxLength: 253 + 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 + required: + - configVersion + - node + - pool + type: object + status: + description: status describes the last observed state of this machine + config node. + properties: + conditions: + description: |- + conditions represent the observations of a machine config node's current state. Valid types are: + UpdatePrepared, UpdateExecuted, UpdatePostActionComplete, UpdateComplete, Updated, Resumed, + Drained, AppliedFilesAndOS, Cordoned, Uncordoned, RebootedNode, NodeDegraded, PinnedImageSetsProgressing, + and PinnedImageSetsDegraded. + The following types are only available when the ImageModeStatusReporting feature gate is enabled: ImagePulledFromRegistry, + AppliedOSImage, AppliedFiles + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 20 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + configImage: + description: |- + configImage is an optional field for configuring the OS image to be used for this node. This field will only exist if the node belongs to a pool opted into on-cluster image builds, and will override any MachineConfig referenced OSImageURL fields. + When omitted, this means that the Image Mode feature is not being used and the node will be up to date with the specific current rendered config version for the nodes MachinePool. + When specified, the Image Mode feature is enabled and the contents of this field show the observed state of the node image. + When Image Mode is enabled and a new MachineConfig is applied such that a new OS image build is not created, only the configVersion field will change. + When Image Mode is enabled and a new MachineConfig is applied such that a new OS image build is created, then only the configImage field will change. It is also possible that both the configImage + and configVersion change during the same update. + minProperties: 1 + properties: + currentImage: + description: |- + currentImage is an optional field that represents the current image that is applied to the node. + When omitted, this means that no image updates have been applied to the node and it will be up to date with the specific current rendered config version. + When specified, this means that the node is currently using this image. + currentImage must be a fully qualified OCI image pull spec of the format host[:port][/namespace]/name@sha256:, where the digest must be exactly 64 characters in length and consist only of lowercase hexadecimal characters, a-f and 0-9. + currentImage must not be an empty string and must not exceed 447 characters in length. + maxLength: 447 + minLength: 1 + type: string + x-kubernetes-validations: + - message: the OCI Image reference must end with a valid '@sha256:' + suffix, where '' is 64 characters long + rule: (self.split('@').size() == 2 && self.split('@')[1].matches('^sha256:[a-f0-9]{64}$')) + - message: the OCI Image name should follow the host[:port][/namespace]/name + format, resembling a valid URL without the scheme + rule: (self.split('@')[0].matches('^([a-zA-Z0-9-]+\\.)+[a-zA-Z0-9-]+(:[0-9]{2,5})?/([a-zA-Z0-9-_]{0,61}/)?[a-zA-Z0-9-_.]*?$')) + desiredImage: + description: |- + desiredImage is an optional field that represents the currently observed state of image that the node should be updated to use. + When not specified, this means that Image Mode has been disabled and the node will up to date with the specific current rendered config version. + When specified, this means that Image Mode has been enabled and the node is actively progressing to update the node to this image. + If currentImage and desiredImage match, the node has been successfully updated to use the desired image. + desiredImage must be a fully qualified OCI image pull spec of the format host[:port][/namespace]/name@sha256:, where the digest must be exactly 64 characters in length and consist only of lowercase hexadecimal characters, a-f and 0-9. + desiredImage must not be an empty string and must not exceed 447 characters in length. + maxLength: 447 + minLength: 1 + type: string + x-kubernetes-validations: + - message: the OCI Image reference must end with a valid '@sha256:' + suffix, where '' is 64 characters long + rule: (self.split('@').size() == 2 && self.split('@')[1].matches('^sha256:[a-f0-9]{64}$')) + - message: the OCI Image name should follow the host[:port][/namespace]/name + format, resembling a valid URL without the scheme + rule: (self.split('@')[0].matches('^([a-zA-Z0-9-]+\\.)+[a-zA-Z0-9-]+(:[0-9]{2,5})?/([a-zA-Z0-9-_]{0,61}/)?[a-zA-Z0-9-_.]*?$')) + type: object + configVersion: + 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 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 + 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 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 + 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 + internalReleaseImage: + description: |- + internalReleaseImage describes the status of the release payloads stored in the node. + When specified, an internalReleaseImage custom resource exists on the cluster, and the specified images will be made available on the control plane nodes. + This field will reflect the actual on-disk state of those release images. + properties: + releases: + description: |- + releases is a list of the release bundles currently owned and managed by the + cluster, indicating that their images can be safely pulled by any cluster entity + requiring them. + This field can contain between 1 and 5 entries. + items: + description: |- + MachineConfigNodeStatusInternalReleaseImageRef is used to provide a more detailed reference for + a release bundle. + properties: + conditions: + description: |- + conditions represent the observations of an internal release image current state. See InternalReleaseImageConditionType for the possible + type values. + items: + description: Condition contains details for one aspect + of the current state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, + False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in + foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 5 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + image: + description: |- + image is an OCP release image referenced by digest. + The format of the image pull spec is: host[:port][/namespace]/name@sha256:, + where the digest must be 64 characters long, and consist only of lowercase hexadecimal characters, a-f and 0-9. + The length of the whole spec must be between 1 to 447 characters. + maxLength: 447 + minLength: 1 + type: string + x-kubernetes-validations: + - message: the OCI Image reference must end with a valid + '@sha256:' suffix, where '' is 64 characters + long + rule: (self.split('@').size() == 2 && self.split('@')[1].matches('^sha256:[a-f0-9]{64}$')) + - message: the OCI Image name should follow the host[:port][/namespace]/name + format, resembling a valid URL without the scheme + rule: (self.split('@')[0].matches('^([a-zA-Z0-9-]+\\.)+[a-zA-Z0-9-]+(:[0-9]{2,5})?/([a-zA-Z0-9-_]{0,61}/)?[a-zA-Z0-9-_.]*?$')) + name: + description: name indicates the desired release bundle identifier. + This field is required and must be between 1 and 64 characters + long. + maxLength: 64 + minLength: 1 + type: string + required: + - image + - name + type: object + maxItems: 5 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + required: + - releases + type: object + irreconcilableChanges: + description: |- + irreconcilableChanges is an optional field that contains the observed differences between this nodes + configuration and the target rendered MachineConfig. + This field will be set when there are changes to the target rendered MachineConfig that can only be applied to + new nodes joining the cluster. + Entries must be unique, keyed on the fieldPath field. + Must not exceed 32 entries. + items: + description: |- + IrreconcilableChangeDiff holds an individual diff between the initial install-time MachineConfig + and the latest applied one caused by the presence of irreconcilable changes. + properties: + diff: + description: |- + diff is a required field containing the difference between the nodes current configuration and the latest + rendered MachineConfig for the field specified in fieldPath. + Must not be an empty string and must not exceed 4096 characters in length. + maxLength: 4096 + minLength: 1 + type: string + fieldPath: + description: |- + fieldPath is a required reference to the path in the latest rendered MachineConfig that differs from this nodes + configuration. + Must not be empty and must not exceed 70 characters in length. + Must begin with the prefix 'spec.' and only contain alphanumeric characters, square brackets ('[]'), or dots ('.'). + maxLength: 70 + minLength: 1 + type: string + x-kubernetes-validations: + - message: The fieldPath must start with `spec.` + rule: self.startsWith('spec.') + - message: The fieldPath must consist only of alphanumeric characters, + brackets [] and dots ('.'). + rule: self.matches('^[\\da-zA-Z\\.\\[\\]]+$') + required: + - diff + - fieldPath + type: object + maxItems: 32 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - fieldPath + x-kubernetes-list-type: map + observedGeneration: + 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. + format: int64 + minimum: 1 + 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. + 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: 1 + type: integer + x-kubernetes-validations: + - message: currentGeneration must not decrease + rule: self >= oldSelf + desiredGeneration: + description: desiredGeneration is the generation of the pinned + image set that is targeted to be pulled and pinned on this + node. + format: int32 + minimum: 1 + 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 + on this node. + format: int32 + minimum: 1 + type: integer + 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 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 + 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 + x-kubernetes-validations: + - message: desired generation must be greater than or equal to the + current generation + rule: 'has(self.desiredGeneration) && has(self.currentGeneration) + ? self.desiredGeneration >= self.currentGeneration : true' + - 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: 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: + - name + x-kubernetes-list-type: map + type: object + required: + - spec + type: object + x-kubernetes-validations: + - message: spec.node.name should match metadata.name + rule: self.metadata.name == self.spec.node.name + served: true + storage: true + subresources: + status: {} From a7690be7ac1e4ea56be6fed2ffcd7685ae196c06 Mon Sep 17 00:00:00 2001 From: Andrea Fasano Date: Tue, 28 Oct 2025 05:09:34 -0400 Subject: [PATCH 2/3] modified v1alpha1 internalreleaseimage status to use the same structure adopted for the MCN status field --- hack/update-payload-crds.sh | 1 + ...ons.yaml => NoRegistryClusterInstall.yaml} | 2 +- .../v1/types_machineconfignode.go | 31 +- ...gnodes-Hypershift-CustomNoUpgrade.crd.yaml | 32 +- ...des-SelfManagedHA-CustomNoUpgrade.crd.yaml | 32 +- ...SelfManagedHA-DevPreviewNoUpgrade.crd.yaml | 32 +- ...elfManagedHA-TechPreviewNoUpgrade.crd.yaml | 32 +- ..._generated.featuregated-crd-manifests.yaml | 2 +- ...ons.yaml => NoRegistryClusterInstall.yaml} | 34 ++- .../v1/zz_generated.swagger_doc_generated.go | 8 +- .../NoRegistryClusterInstall.yaml | 281 ++++++++++++++++++ .../NoRegistryClusterOperations.yaml | 43 --- .../v1alpha1/types_internalreleaseimage.go | 91 ++++-- ...rnalreleaseimages-CustomNoUpgrade.crd.yaml | 152 +++++++--- ...releaseimages-DevPreviewNoUpgrade.crd.yaml | 152 +++++++--- ...eleaseimages-TechPreviewNoUpgrade.crd.yaml | 152 +++++++--- .../v1alpha1/zz_generated.deepcopy.go | 36 +-- ..._generated.featuregated-crd-manifests.yaml | 4 +- .../NoRegistryClusterInstall.yaml | 225 ++++++++++++++ .../NoRegistryClusterOperations.yaml | 165 ---------- .../zz_generated.swagger_doc_generated.go | 21 +- .../generated_openapi/zz_generated.openapi.go | 75 ++--- ...rnalreleaseimages-CustomNoUpgrade.crd.yaml | 225 ++++++++++++++ ...releaseimages-DevPreviewNoUpgrade.crd.yaml | 224 ++++++++++++++ ...eleaseimages-TechPreviewNoUpgrade.crd.yaml | 224 ++++++++++++++ ...gnodes-Hypershift-CustomNoUpgrade.crd.yaml | 32 +- ...des-SelfManagedHA-CustomNoUpgrade.crd.yaml | 32 +- ...SelfManagedHA-DevPreviewNoUpgrade.crd.yaml | 32 +- ...elfManagedHA-TechPreviewNoUpgrade.crd.yaml | 32 +- 29 files changed, 1856 insertions(+), 548 deletions(-) rename machineconfiguration/v1/tests/machineconfignodes.machineconfiguration.openshift.io/{NoRegistryClusterOperations.yaml => NoRegistryClusterInstall.yaml} (99%) rename machineconfiguration/v1/zz_generated.featuregated-crd-manifests/machineconfignodes.machineconfiguration.openshift.io/{NoRegistryClusterOperations.yaml => NoRegistryClusterInstall.yaml} (92%) create mode 100644 machineconfiguration/v1alpha1/tests/internalreleaseimages.machineconfiguration.openshift.io/NoRegistryClusterInstall.yaml delete mode 100644 machineconfiguration/v1alpha1/tests/internalreleaseimages.machineconfiguration.openshift.io/NoRegistryClusterOperations.yaml create mode 100644 machineconfiguration/v1alpha1/zz_generated.featuregated-crd-manifests/internalreleaseimages.machineconfiguration.openshift.io/NoRegistryClusterInstall.yaml delete mode 100644 machineconfiguration/v1alpha1/zz_generated.featuregated-crd-manifests/internalreleaseimages.machineconfiguration.openshift.io/NoRegistryClusterOperations.yaml create mode 100644 payload-manifests/crds/0000_80_machine-config_01_internalreleaseimages-CustomNoUpgrade.crd.yaml create mode 100644 payload-manifests/crds/0000_80_machine-config_01_internalreleaseimages-DevPreviewNoUpgrade.crd.yaml create mode 100644 payload-manifests/crds/0000_80_machine-config_01_internalreleaseimages-TechPreviewNoUpgrade.crd.yaml diff --git a/hack/update-payload-crds.sh b/hack/update-payload-crds.sh index 462783369a8..368bf31db54 100755 --- a/hack/update-payload-crds.sh +++ b/hack/update-payload-crds.sh @@ -24,6 +24,7 @@ crd_globs="\ config/v1/zz_generated.crd-manifests/0000_10_openshift-controller-manager_01_builds*.crd.yaml operator/v1/zz_generated.crd-manifests/0000_50_openshift-controller-manager_02_openshiftcontrollermanagers*.crd.yaml machineconfiguration/v1/zz_generated.crd-manifests/*.crd.yaml + machineconfiguration/v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_internalreleaseimages-*.crd.yaml operator/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfigurations*.crd.yaml config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_clustermonitoring*.crd.yaml operator/v1/zz_generated.crd-manifests/*_storage_01_storages*.crd.yaml diff --git a/machineconfiguration/v1/tests/machineconfignodes.machineconfiguration.openshift.io/NoRegistryClusterOperations.yaml b/machineconfiguration/v1/tests/machineconfignodes.machineconfiguration.openshift.io/NoRegistryClusterInstall.yaml similarity index 99% rename from machineconfiguration/v1/tests/machineconfignodes.machineconfiguration.openshift.io/NoRegistryClusterOperations.yaml rename to machineconfiguration/v1/tests/machineconfignodes.machineconfiguration.openshift.io/NoRegistryClusterInstall.yaml index 1fcdc2ff572..55e3c912e99 100644 --- a/machineconfiguration/v1/tests/machineconfignodes.machineconfiguration.openshift.io/NoRegistryClusterOperations.yaml +++ b/machineconfiguration/v1/tests/machineconfignodes.machineconfiguration.openshift.io/NoRegistryClusterInstall.yaml @@ -3,7 +3,7 @@ name: "[TechPreview] InternalReleaseImage" crdName: machineconfignodes.machineconfiguration.openshift.io featureGates: - MachineConfigNodes -- NoRegistryClusterOperations +- NoRegistryClusterInstall tests: onUpdate: - name: Should be able to update a MachineConfigNode with a minimal internalReleaseImage status field. diff --git a/machineconfiguration/v1/types_machineconfignode.go b/machineconfiguration/v1/types_machineconfignode.go index ca5d55334f8..549e174eabb 100644 --- a/machineconfiguration/v1/types_machineconfignode.go +++ b/machineconfiguration/v1/types_machineconfignode.go @@ -161,7 +161,7 @@ type MachineConfigNodeStatus struct { // internalReleaseImage describes the status of the release payloads stored in the node. // When specified, an internalReleaseImage custom resource exists on the cluster, and the specified images will be made available on the control plane nodes. // This field will reflect the actual on-disk state of those release images. - // +openshift:enable:FeatureGate=NoRegistryClusterOperations + // +openshift:enable:FeatureGate=NoRegistryClusterInstall // +optional InternalReleaseImage MachineConfigNodeStatusInternalReleaseImage `json:"internalReleaseImage,omitzero,omitempty"` } @@ -170,23 +170,31 @@ type MachineConfigNodeStatus struct { // config node. type MachineConfigNodeStatusInternalReleaseImage struct { // releases is a list of the release bundles currently owned and managed by the - // cluster, indicating that their images can be safely pulled by any cluster entity - // requiring them. - // This field can contain between 1 and 5 entries. + // cluster. + // A release bundle content could be safely pulled only when its Conditions field + // contains at least an Available entry set to "True" and Degraded to "False". + // Entries must be unique, keyed on the name field. + // releases must contain at least one entry and must not exceed 32 entries. // +listType=map // +listMapKey=name // +kubebuilder:validation:MinItems=1 - // +kubebuilder:validation:MaxItems=5 + // +kubebuilder:validation:MaxItems=32 // +required Releases []MachineConfigNodeStatusInternalReleaseImageRef `json:"releases,omitempty"` } // MachineConfigNodeStatusInternalReleaseImageRef is used to provide a more detailed reference for // a release bundle. -// +openshift:enable:FeatureGate=NoRegistryClusterOperations type MachineConfigNodeStatusInternalReleaseImageRef struct { - // conditions represent the observations of an internal release image current state. See InternalReleaseImageConditionType for the possible - // type values. + // conditions represent the observations of an internal release image current state. Valid types are: + // Mounted, Installing, Available, Removing and Degraded. + // + // If Mounted is true, that means that a valid ISO has been mounted on the current node. + // If Installing is true, that means that a new release bundle is currently being copied on the current node, and not yet completed. + // If Available is true, it means that the release has been previously installed on the current node, and it can be used. + // If Removing is true, it means that a release deletion is in progress on the current node, and not yet completed. + // If Degraded is true, that means something has gone wrong in the current node. + // // +listType=map // +listMapKey=type // +kubebuilder:validation:MinItems=1 @@ -194,23 +202,26 @@ type MachineConfigNodeStatusInternalReleaseImageRef struct { // +optional Conditions []metav1.Condition `json:"conditions,omitempty"` // name indicates the desired release bundle identifier. This field is required and must be between 1 and 64 characters long. + // The expected name format is ocp-release-bundle--. // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=64 + // +kubebuilder:validation:XValidation:rule=`self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9_-]+$')`,message="must be ocp-release-bundle-- and <= 64 chars" // +required Name string `json:"name,omitempty"` // image is an OCP release image referenced by digest. // The format of the image pull spec is: host[:port][/namespace]/name@sha256:, // where the digest must be 64 characters long, and consist only of lowercase hexadecimal characters, a-f and 0-9. // The length of the whole spec must be between 1 to 447 characters. + // The field is optional, and it will be provided after a release will be successfully installed. // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=447 // +kubebuilder:validation:XValidation:rule=`(self.split('@').size() == 2 && self.split('@')[1].matches('^sha256:[a-f0-9]{64}$'))`,message="the OCI Image reference must end with a valid '@sha256:' suffix, where '' is 64 characters long" // +kubebuilder:validation:XValidation:rule=`(self.split('@')[0].matches('^([a-zA-Z0-9-]+\\.)+[a-zA-Z0-9-]+(:[0-9]{2,5})?/([a-zA-Z0-9-_]{0,61}/)?[a-zA-Z0-9-_.]*?$'))`,message="the OCI Image name should follow the host[:port][/namespace]/name format, resembling a valid URL without the scheme" - // +required + // +optional Image string `json:"image,omitempty"` } -// InternalReleaseImageConditionType is each possible state for each possible MachineConfigNodeStatusInternalReleaseImageRef +// InternalReleaseImageConditionType is each possible state for each possible InternalReleaseImageBundleStatus // conditions type. // +enum type InternalReleaseImageConditionType string diff --git a/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-Hypershift-CustomNoUpgrade.crd.yaml b/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-Hypershift-CustomNoUpgrade.crd.yaml index c1956dde36c..990142911cc 100644 --- a/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-Hypershift-CustomNoUpgrade.crd.yaml +++ b/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-Hypershift-CustomNoUpgrade.crd.yaml @@ -361,9 +361,11 @@ spec: releases: description: |- releases is a list of the release bundles currently owned and managed by the - cluster, indicating that their images can be safely pulled by any cluster entity - requiring them. - This field can contain between 1 and 5 entries. + cluster. + A release bundle content could be safely pulled only when its Conditions field + contains at least an Available entry set to "True" and Degraded to "False". + Entries must be unique, keyed on the name field. + releases must contain at least one entry and must not exceed 32 entries. items: description: |- MachineConfigNodeStatusInternalReleaseImageRef is used to provide a more detailed reference for @@ -371,8 +373,14 @@ spec: properties: conditions: description: |- - conditions represent the observations of an internal release image current state. See InternalReleaseImageConditionType for the possible - type values. + conditions represent the observations of an internal release image current state. Valid types are: + Mounted, Installing, Available, Removing and Degraded. + + If Mounted is true, that means that a valid ISO has been mounted on the current node. + If Installing is true, that means that a new release bundle is currently being copied on the current node, and not yet completed. + If Available is true, it means that the release has been previously installed on the current node, and it can be used. + If Removing is true, it means that a release deletion is in progress on the current node, and not yet completed. + If Degraded is true, that means something has gone wrong in the current node. items: description: Condition contains details for one aspect of the current state of this API Resource. @@ -441,6 +449,7 @@ spec: The format of the image pull spec is: host[:port][/namespace]/name@sha256:, where the digest must be 64 characters long, and consist only of lowercase hexadecimal characters, a-f and 0-9. The length of the whole spec must be between 1 to 447 characters. + The field is optional, and it will be provided after a release will be successfully installed. maxLength: 447 minLength: 1 type: string @@ -453,17 +462,20 @@ spec: format, resembling a valid URL without the scheme rule: (self.split('@')[0].matches('^([a-zA-Z0-9-]+\\.)+[a-zA-Z0-9-]+(:[0-9]{2,5})?/([a-zA-Z0-9-_]{0,61}/)?[a-zA-Z0-9-_.]*?$')) name: - description: name indicates the desired release bundle identifier. - This field is required and must be between 1 and 64 characters - long. + description: |- + name indicates the desired release bundle identifier. This field is required and must be between 1 and 64 characters long. + The expected name format is ocp-release-bundle--. maxLength: 64 minLength: 1 type: string + x-kubernetes-validations: + - message: must be ocp-release-bundle-- + and <= 64 chars + rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9_-]+$') required: - - image - name type: object - maxItems: 5 + maxItems: 32 minItems: 1 type: array x-kubernetes-list-map-keys: diff --git a/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-CustomNoUpgrade.crd.yaml b/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-CustomNoUpgrade.crd.yaml index 727733b84ea..cdb99247c8a 100644 --- a/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-CustomNoUpgrade.crd.yaml +++ b/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-CustomNoUpgrade.crd.yaml @@ -361,9 +361,11 @@ spec: releases: description: |- releases is a list of the release bundles currently owned and managed by the - cluster, indicating that their images can be safely pulled by any cluster entity - requiring them. - This field can contain between 1 and 5 entries. + cluster. + A release bundle content could be safely pulled only when its Conditions field + contains at least an Available entry set to "True" and Degraded to "False". + Entries must be unique, keyed on the name field. + releases must contain at least one entry and must not exceed 32 entries. items: description: |- MachineConfigNodeStatusInternalReleaseImageRef is used to provide a more detailed reference for @@ -371,8 +373,14 @@ spec: properties: conditions: description: |- - conditions represent the observations of an internal release image current state. See InternalReleaseImageConditionType for the possible - type values. + conditions represent the observations of an internal release image current state. Valid types are: + Mounted, Installing, Available, Removing and Degraded. + + If Mounted is true, that means that a valid ISO has been mounted on the current node. + If Installing is true, that means that a new release bundle is currently being copied on the current node, and not yet completed. + If Available is true, it means that the release has been previously installed on the current node, and it can be used. + If Removing is true, it means that a release deletion is in progress on the current node, and not yet completed. + If Degraded is true, that means something has gone wrong in the current node. items: description: Condition contains details for one aspect of the current state of this API Resource. @@ -441,6 +449,7 @@ spec: The format of the image pull spec is: host[:port][/namespace]/name@sha256:, where the digest must be 64 characters long, and consist only of lowercase hexadecimal characters, a-f and 0-9. The length of the whole spec must be between 1 to 447 characters. + The field is optional, and it will be provided after a release will be successfully installed. maxLength: 447 minLength: 1 type: string @@ -453,17 +462,20 @@ spec: format, resembling a valid URL without the scheme rule: (self.split('@')[0].matches('^([a-zA-Z0-9-]+\\.)+[a-zA-Z0-9-]+(:[0-9]{2,5})?/([a-zA-Z0-9-_]{0,61}/)?[a-zA-Z0-9-_.]*?$')) name: - description: name indicates the desired release bundle identifier. - This field is required and must be between 1 and 64 characters - long. + description: |- + name indicates the desired release bundle identifier. This field is required and must be between 1 and 64 characters long. + The expected name format is ocp-release-bundle--. maxLength: 64 minLength: 1 type: string + x-kubernetes-validations: + - message: must be ocp-release-bundle-- + and <= 64 chars + rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9_-]+$') required: - - image - name type: object - maxItems: 5 + maxItems: 32 minItems: 1 type: array x-kubernetes-list-map-keys: diff --git a/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-DevPreviewNoUpgrade.crd.yaml b/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-DevPreviewNoUpgrade.crd.yaml index 0b8e0d0ee4c..b4f6bd7d4c8 100644 --- a/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-DevPreviewNoUpgrade.crd.yaml +++ b/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-DevPreviewNoUpgrade.crd.yaml @@ -361,9 +361,11 @@ spec: releases: description: |- releases is a list of the release bundles currently owned and managed by the - cluster, indicating that their images can be safely pulled by any cluster entity - requiring them. - This field can contain between 1 and 5 entries. + cluster. + A release bundle content could be safely pulled only when its Conditions field + contains at least an Available entry set to "True" and Degraded to "False". + Entries must be unique, keyed on the name field. + releases must contain at least one entry and must not exceed 32 entries. items: description: |- MachineConfigNodeStatusInternalReleaseImageRef is used to provide a more detailed reference for @@ -371,8 +373,14 @@ spec: properties: conditions: description: |- - conditions represent the observations of an internal release image current state. See InternalReleaseImageConditionType for the possible - type values. + conditions represent the observations of an internal release image current state. Valid types are: + Mounted, Installing, Available, Removing and Degraded. + + If Mounted is true, that means that a valid ISO has been mounted on the current node. + If Installing is true, that means that a new release bundle is currently being copied on the current node, and not yet completed. + If Available is true, it means that the release has been previously installed on the current node, and it can be used. + If Removing is true, it means that a release deletion is in progress on the current node, and not yet completed. + If Degraded is true, that means something has gone wrong in the current node. items: description: Condition contains details for one aspect of the current state of this API Resource. @@ -441,6 +449,7 @@ spec: The format of the image pull spec is: host[:port][/namespace]/name@sha256:, where the digest must be 64 characters long, and consist only of lowercase hexadecimal characters, a-f and 0-9. The length of the whole spec must be between 1 to 447 characters. + The field is optional, and it will be provided after a release will be successfully installed. maxLength: 447 minLength: 1 type: string @@ -453,17 +462,20 @@ spec: format, resembling a valid URL without the scheme rule: (self.split('@')[0].matches('^([a-zA-Z0-9-]+\\.)+[a-zA-Z0-9-]+(:[0-9]{2,5})?/([a-zA-Z0-9-_]{0,61}/)?[a-zA-Z0-9-_.]*?$')) name: - description: name indicates the desired release bundle identifier. - This field is required and must be between 1 and 64 characters - long. + description: |- + name indicates the desired release bundle identifier. This field is required and must be between 1 and 64 characters long. + The expected name format is ocp-release-bundle--. maxLength: 64 minLength: 1 type: string + x-kubernetes-validations: + - message: must be ocp-release-bundle-- + and <= 64 chars + rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9_-]+$') required: - - image - name type: object - maxItems: 5 + maxItems: 32 minItems: 1 type: array x-kubernetes-list-map-keys: diff --git a/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-TechPreviewNoUpgrade.crd.yaml b/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-TechPreviewNoUpgrade.crd.yaml index 34b48f9006e..8c3db81dd3b 100644 --- a/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-TechPreviewNoUpgrade.crd.yaml +++ b/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-TechPreviewNoUpgrade.crd.yaml @@ -361,9 +361,11 @@ spec: releases: description: |- releases is a list of the release bundles currently owned and managed by the - cluster, indicating that their images can be safely pulled by any cluster entity - requiring them. - This field can contain between 1 and 5 entries. + cluster. + A release bundle content could be safely pulled only when its Conditions field + contains at least an Available entry set to "True" and Degraded to "False". + Entries must be unique, keyed on the name field. + releases must contain at least one entry and must not exceed 32 entries. items: description: |- MachineConfigNodeStatusInternalReleaseImageRef is used to provide a more detailed reference for @@ -371,8 +373,14 @@ spec: properties: conditions: description: |- - conditions represent the observations of an internal release image current state. See InternalReleaseImageConditionType for the possible - type values. + conditions represent the observations of an internal release image current state. Valid types are: + Mounted, Installing, Available, Removing and Degraded. + + If Mounted is true, that means that a valid ISO has been mounted on the current node. + If Installing is true, that means that a new release bundle is currently being copied on the current node, and not yet completed. + If Available is true, it means that the release has been previously installed on the current node, and it can be used. + If Removing is true, it means that a release deletion is in progress on the current node, and not yet completed. + If Degraded is true, that means something has gone wrong in the current node. items: description: Condition contains details for one aspect of the current state of this API Resource. @@ -441,6 +449,7 @@ spec: The format of the image pull spec is: host[:port][/namespace]/name@sha256:, where the digest must be 64 characters long, and consist only of lowercase hexadecimal characters, a-f and 0-9. The length of the whole spec must be between 1 to 447 characters. + The field is optional, and it will be provided after a release will be successfully installed. maxLength: 447 minLength: 1 type: string @@ -453,17 +462,20 @@ spec: format, resembling a valid URL without the scheme rule: (self.split('@')[0].matches('^([a-zA-Z0-9-]+\\.)+[a-zA-Z0-9-]+(:[0-9]{2,5})?/([a-zA-Z0-9-_]{0,61}/)?[a-zA-Z0-9-_.]*?$')) name: - description: name indicates the desired release bundle identifier. - This field is required and must be between 1 and 64 characters - long. + description: |- + name indicates the desired release bundle identifier. This field is required and must be between 1 and 64 characters long. + The expected name format is ocp-release-bundle--. maxLength: 64 minLength: 1 type: string + x-kubernetes-validations: + - message: must be ocp-release-bundle-- + and <= 64 chars + rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9_-]+$') required: - - image - name type: object - maxItems: 5 + maxItems: 32 minItems: 1 type: array x-kubernetes-list-map-keys: diff --git a/machineconfiguration/v1/zz_generated.featuregated-crd-manifests.yaml b/machineconfiguration/v1/zz_generated.featuregated-crd-manifests.yaml index ba901de1e1d..e788cc1fa45 100644 --- a/machineconfiguration/v1/zz_generated.featuregated-crd-manifests.yaml +++ b/machineconfiguration/v1/zz_generated.featuregated-crd-manifests.yaml @@ -124,7 +124,7 @@ machineconfignodes.machineconfiguration.openshift.io: - ImageModeStatusReporting - IrreconcilableMachineConfig - MachineConfigNodes - - NoRegistryClusterOperations + - NoRegistryClusterInstall FilenameOperatorName: machine-config FilenameOperatorOrdering: "01" FilenameRunLevel: "0000_80" diff --git a/machineconfiguration/v1/zz_generated.featuregated-crd-manifests/machineconfignodes.machineconfiguration.openshift.io/NoRegistryClusterOperations.yaml b/machineconfiguration/v1/zz_generated.featuregated-crd-manifests/machineconfignodes.machineconfiguration.openshift.io/NoRegistryClusterInstall.yaml similarity index 92% rename from machineconfiguration/v1/zz_generated.featuregated-crd-manifests/machineconfignodes.machineconfiguration.openshift.io/NoRegistryClusterOperations.yaml rename to machineconfiguration/v1/zz_generated.featuregated-crd-manifests/machineconfignodes.machineconfiguration.openshift.io/NoRegistryClusterInstall.yaml index 4bab74e8403..4775b5a9412 100644 --- a/machineconfiguration/v1/zz_generated.featuregated-crd-manifests/machineconfignodes.machineconfiguration.openshift.io/NoRegistryClusterOperations.yaml +++ b/machineconfiguration/v1/zz_generated.featuregated-crd-manifests/machineconfignodes.machineconfiguration.openshift.io/NoRegistryClusterInstall.yaml @@ -6,7 +6,7 @@ metadata: api.openshift.io/filename-cvo-runlevel: "0000_80" api.openshift.io/filename-operator: machine-config api.openshift.io/filename-ordering: "01" - feature-gate.release.openshift.io/NoRegistryClusterOperations: "true" + feature-gate.release.openshift.io/NoRegistryClusterInstall: "true" labels: openshift.io/operator-managed: "" name: machineconfignodes.machineconfiguration.openshift.io @@ -292,9 +292,11 @@ spec: releases: description: |- releases is a list of the release bundles currently owned and managed by the - cluster, indicating that their images can be safely pulled by any cluster entity - requiring them. - This field can contain between 1 and 5 entries. + cluster. + A release bundle content could be safely pulled only when its Conditions field + contains at least an Available entry set to "True" and Degraded to "False". + Entries must be unique, keyed on the name field. + releases must contain at least one entry and must not exceed 32 entries. items: description: |- MachineConfigNodeStatusInternalReleaseImageRef is used to provide a more detailed reference for @@ -302,8 +304,14 @@ spec: properties: conditions: description: |- - conditions represent the observations of an internal release image current state. See InternalReleaseImageConditionType for the possible - type values. + conditions represent the observations of an internal release image current state. Valid types are: + Mounted, Installing, Available, Removing and Degraded. + + If Mounted is true, that means that a valid ISO has been mounted on the current node. + If Installing is true, that means that a new release bundle is currently being copied on the current node, and not yet completed. + If Available is true, it means that the release has been previously installed on the current node, and it can be used. + If Removing is true, it means that a release deletion is in progress on the current node, and not yet completed. + If Degraded is true, that means something has gone wrong in the current node. items: description: Condition contains details for one aspect of the current state of this API Resource. @@ -372,6 +380,7 @@ spec: The format of the image pull spec is: host[:port][/namespace]/name@sha256:, where the digest must be 64 characters long, and consist only of lowercase hexadecimal characters, a-f and 0-9. The length of the whole spec must be between 1 to 447 characters. + The field is optional, and it will be provided after a release will be successfully installed. maxLength: 447 minLength: 1 type: string @@ -384,17 +393,20 @@ spec: format, resembling a valid URL without the scheme rule: (self.split('@')[0].matches('^([a-zA-Z0-9-]+\\.)+[a-zA-Z0-9-]+(:[0-9]{2,5})?/([a-zA-Z0-9-_]{0,61}/)?[a-zA-Z0-9-_.]*?$')) name: - description: name indicates the desired release bundle identifier. - This field is required and must be between 1 and 64 characters - long. + description: |- + name indicates the desired release bundle identifier. This field is required and must be between 1 and 64 characters long. + The expected name format is ocp-release-bundle--. maxLength: 64 minLength: 1 type: string + x-kubernetes-validations: + - message: must be ocp-release-bundle-- + and <= 64 chars + rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9_-]+$') required: - - image - name type: object - maxItems: 5 + maxItems: 32 minItems: 1 type: array x-kubernetes-list-map-keys: diff --git a/machineconfiguration/v1/zz_generated.swagger_doc_generated.go b/machineconfiguration/v1/zz_generated.swagger_doc_generated.go index 6d055307672..650fc1709da 100644 --- a/machineconfiguration/v1/zz_generated.swagger_doc_generated.go +++ b/machineconfiguration/v1/zz_generated.swagger_doc_generated.go @@ -475,7 +475,7 @@ func (MachineConfigNodeStatusConfigImage) SwaggerDoc() map[string]string { var map_MachineConfigNodeStatusInternalReleaseImage = map[string]string{ "": "MachineConfigNodeStatusInternalReleaseImage holds information about the current and discovered release bundles for the observed machine config node.", - "releases": "releases is a list of the release bundles currently owned and managed by the cluster, indicating that their images can be safely pulled by any cluster entity requiring them. This field can contain between 1 and 5 entries.", + "releases": "releases is a list of the release bundles currently owned and managed by the cluster. A release bundle content could be safely pulled only when its Conditions field contains at least an Available entry set to \"True\" and Degraded to \"False\". Entries must be unique, keyed on the name field. releases must contain at least one entry and must not exceed 32 entries.", } func (MachineConfigNodeStatusInternalReleaseImage) SwaggerDoc() map[string]string { @@ -484,9 +484,9 @@ func (MachineConfigNodeStatusInternalReleaseImage) SwaggerDoc() map[string]strin var map_MachineConfigNodeStatusInternalReleaseImageRef = map[string]string{ "": "MachineConfigNodeStatusInternalReleaseImageRef is used to provide a more detailed reference for a release bundle.", - "conditions": "conditions represent the observations of an internal release image current state. See InternalReleaseImageConditionType for the possible type values.", - "name": "name indicates the desired release bundle identifier. This field is required and must be between 1 and 64 characters long.", - "image": "image is an OCP release image referenced by digest. The format of the image pull spec is: host[:port][/namespace]/name@sha256:, where the digest must be 64 characters long, and consist only of lowercase hexadecimal characters, a-f and 0-9. The length of the whole spec must be between 1 to 447 characters.", + "conditions": "conditions represent the observations of an internal release image current state. Valid types are: Mounted, Installing, Available, Removing and Degraded.\n\nIf Mounted is true, that means that a valid ISO has been mounted on the current node. If Installing is true, that means that a new release bundle is currently being copied on the current node, and not yet completed. If Available is true, it means that the release has been previously installed on the current node, and it can be used. If Removing is true, it means that a release deletion is in progress on the current node, and not yet completed. If Degraded is true, that means something has gone wrong in the current node.", + "name": "name indicates the desired release bundle identifier. This field is required and must be between 1 and 64 characters long. The expected name format is ocp-release-bundle--.", + "image": "image is an OCP release image referenced by digest. The format of the image pull spec is: host[:port][/namespace]/name@sha256:, where the digest must be 64 characters long, and consist only of lowercase hexadecimal characters, a-f and 0-9. The length of the whole spec must be between 1 to 447 characters. The field is optional, and it will be provided after a release will be successfully installed.", } func (MachineConfigNodeStatusInternalReleaseImageRef) SwaggerDoc() map[string]string { diff --git a/machineconfiguration/v1alpha1/tests/internalreleaseimages.machineconfiguration.openshift.io/NoRegistryClusterInstall.yaml b/machineconfiguration/v1alpha1/tests/internalreleaseimages.machineconfiguration.openshift.io/NoRegistryClusterInstall.yaml new file mode 100644 index 00000000000..43ff9be2552 --- /dev/null +++ b/machineconfiguration/v1alpha1/tests/internalreleaseimages.machineconfiguration.openshift.io/NoRegistryClusterInstall.yaml @@ -0,0 +1,281 @@ +apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this +name: "[TechPreview] InternalReleaseImage" +crdName: internalreleaseimages.machineconfiguration.openshift.io +featureGate: NoRegistryClusterInstall +tests: + onCreate: + - name: Should be able to create a minimal InternalReleaseImage + initial: | + apiVersion: machineconfiguration.openshift.io/v1alpha1 + kind: InternalReleaseImage + metadata: + name: cluster + spec: + releases: + - name: ocp-release-bundle-4.18.0-x86_64 + expected: | + apiVersion: machineconfiguration.openshift.io/v1alpha1 + kind: InternalReleaseImage + metadata: + name: cluster + spec: + releases: + - name: ocp-release-bundle-4.18.0-x86_64 + - name: Invalid undefined releases + initial: | + apiVersion: machineconfiguration.openshift.io/v1alpha1 + kind: InternalReleaseImage + metadata: + name: cluster + spec: + expectedError: "spec: Required value" + - name: Invalid empty release name + initial: | + apiVersion: machineconfiguration.openshift.io/v1alpha1 + kind: InternalReleaseImage + metadata: + name: cluster + spec: + releases: + - name: "" + expectedError: "Invalid value: \"\": spec.releases[0].name in body should be at least 1 chars long" + - name: Should reject duplicate releases + initial: | + apiVersion: machineconfiguration.openshift.io/v1alpha1 + kind: InternalReleaseImage + metadata: + name: cluster + spec: + releases: + - name: ocp-release-bundle-4.18.0-x86_64 + - name: ocp-release-bundle-4.18.0-x86_64 + expectedError: "Duplicate value: map[string]interface {}{\"name\":\"ocp-release-bundle-4.18.0-x86_64\"}" + - name: Invalid release name format + initial: | + apiVersion: machineconfiguration.openshift.io/v1alpha1 + kind: InternalReleaseImage + metadata: + name: cluster + spec: + releases: + - name: "Not a valid release name format" + expectedError: "Invalid value: \"string\": must be ocp-release-bundle-- and <= 64 chars" + onUpdate: + - name: A new mounted release has been discovered + initial: | + apiVersion: machineconfiguration.openshift.io/v1alpha1 + kind: InternalReleaseImage + metadata: + name: cluster + spec: + releases: + - name: ocp-release-bundle-4.18.0-x86_64 + updated: | + apiVersion: machineconfiguration.openshift.io/v1alpha1 + kind: InternalReleaseImage + spec: + releases: + - name: ocp-release-bundle-4.18.0-x86_64 + status: + releases: + - name: ocp-release-bundle-4.18.0-x86_64 + image: example.com/example/openshift-release-dev@sha256:aa8795f7932441b30bb8bcfbbf05912875383fad1f2b3be08a22ec148d6860ff + conditions: + - type: Available + status: "True" + reason: "Available" + message: "Release ocp-release-bundle-4.18.0-x86_64 is currently available" + lastTransitionTime: "2024-11-01T07:00:00Z" + - name: ocp-release-bundle-4.19.0-x86_64 + conditions: + - type: Mounted + status: "True" + reason: "Mounted" + message: "Release ocp-release-bundle-4.19.0-x86_64 discovered on node master-0" + lastTransitionTime: "2024-12-01T08:04:21Z" + expected: | + apiVersion: machineconfiguration.openshift.io/v1alpha1 + kind: InternalReleaseImage + metadata: + name: cluster + spec: + releases: + - name: ocp-release-bundle-4.18.0-x86_64 + status: + releases: + - name: ocp-release-bundle-4.18.0-x86_64 + image: example.com/example/openshift-release-dev@sha256:aa8795f7932441b30bb8bcfbbf05912875383fad1f2b3be08a22ec148d6860ff + conditions: + - type: Available + status: "True" + reason: "Available" + message: "Release ocp-release-bundle-4.18.0-x86_64 is currently available" + lastTransitionTime: "2024-11-01T07:00:00Z" + - name: ocp-release-bundle-4.19.0-x86_64 + conditions: + - type: Mounted + status: "True" + reason: "Mounted" + message: "Release ocp-release-bundle-4.19.0-x86_64 discovered on node master-0" + lastTransitionTime: "2024-12-01T08:04:21Z" + - name: A release has been installed + initial: | + apiVersion: machineconfiguration.openshift.io/v1alpha1 + kind: InternalReleaseImage + metadata: + name: cluster + spec: + releases: + - name: ocp-release-bundle-4.18.0-x86_64 + updated: | + apiVersion: machineconfiguration.openshift.io/v1alpha1 + kind: InternalReleaseImage + metadata: + name: cluster + spec: + releases: + - name: ocp-release-bundle-4.18.0-x86_64 + - name: ocp-release-bundle-4.19.0-x86_64 + status: + releases: + - name: ocp-release-bundle-4.18.0-x86_64 + image: example.com/example/openshift-release-dev@sha256:aa8795f7932441b30bb8bcfbbf05912875383fad1f2b3be08a22ec148d6860ff + conditions: + - type: Available + status: "True" + reason: "Available" + message: "Release ocp-release-bundle-4.18.0-x86_64 is currently available" + lastTransitionTime: "2024-11-01T07:00:00Z" + - name: ocp-release-bundle-4.19.0-x86_64 + image: example.com/example/openshift-release-dev@sha256:d98795f7932441b30bb8bcfbbf05912875383fad1f2b3be08a22ec148d68607f + conditions: + - type: Available + status: "True" + reason: "Available" + message: "Release ocp-release-bundle-4.19.0-x86_64 is currently available" + lastTransitionTime: "2024-12-01T09:00:00Z" + expected: | + apiVersion: machineconfiguration.openshift.io/v1alpha1 + kind: InternalReleaseImage + metadata: + name: cluster + spec: + releases: + - name: ocp-release-bundle-4.18.0-x86_64 + - name: ocp-release-bundle-4.19.0-x86_64 + status: + releases: + - name: ocp-release-bundle-4.18.0-x86_64 + image: example.com/example/openshift-release-dev@sha256:aa8795f7932441b30bb8bcfbbf05912875383fad1f2b3be08a22ec148d6860ff + conditions: + - type: Available + status: "True" + reason: "Available" + message: "Release ocp-release-bundle-4.18.0-x86_64 is currently available" + lastTransitionTime: "2024-11-01T07:00:00Z" + - name: ocp-release-bundle-4.19.0-x86_64 + image: example.com/example/openshift-release-dev@sha256:d98795f7932441b30bb8bcfbbf05912875383fad1f2b3be08a22ec148d68607f + conditions: + - type: Available + status: "True" + reason: "Available" + message: "Release ocp-release-bundle-4.19.0-x86_64 is currently available" + lastTransitionTime: "2024-12-01T09:00:00Z" + - name: A degraded release + initial: | + apiVersion: machineconfiguration.openshift.io/v1alpha1 + kind: InternalReleaseImage + metadata: + name: cluster + spec: + releases: + - name: ocp-release-bundle-4.18.0-x86_64 + updated: | + apiVersion: machineconfiguration.openshift.io/v1alpha1 + kind: InternalReleaseImage + metadata: + name: cluster + spec: + releases: + - name: ocp-release-bundle-4.18.0-x86_64 + - name: ocp-release-bundle-4.19.0-x86_64 + status: + releases: + - name: ocp-release-bundle-4.18.0-x86_64 + image: example.com/example/openshift-release-dev@sha256:aa8795f7932441b30bb8bcfbbf05912875383fad1f2b3be08a22ec148d6860ff + conditions: + - type: Available + status: "True" + reason: "Available" + message: "Release ocp-release-bundle-4.18.0-x86_64 is currently available" + lastTransitionTime: "2024-11-01T07:00:00Z" + - name: ocp-release-bundle-4.19.0-x86_64 + conditions: + - type: Degraded + status: "True" + reason: "Degraded" + message: "Cannot install release ocp-release-bundle-4.19.0-x86_64 on master-0, out of disk space" + lastTransitionTime: "2024-12-01T09:00:00Z" + expected: | + apiVersion: machineconfiguration.openshift.io/v1alpha1 + kind: InternalReleaseImage + metadata: + name: cluster + spec: + releases: + - name: ocp-release-bundle-4.18.0-x86_64 + - name: ocp-release-bundle-4.19.0-x86_64 + status: + releases: + - name: ocp-release-bundle-4.18.0-x86_64 + image: example.com/example/openshift-release-dev@sha256:aa8795f7932441b30bb8bcfbbf05912875383fad1f2b3be08a22ec148d6860ff + conditions: + - type: Available + status: "True" + reason: "Available" + message: "Release ocp-release-bundle-4.18.0-x86_64 is currently available" + lastTransitionTime: "2024-11-01T07:00:00Z" + - name: ocp-release-bundle-4.19.0-x86_64 + conditions: + - type: Degraded + status: "True" + reason: "Degraded" + message: "Cannot install release ocp-release-bundle-4.19.0-x86_64 on master-0, out of disk space" + lastTransitionTime: "2024-12-01T09:00:00Z" + - name: Invalid image reference format + initial: | + apiVersion: machineconfiguration.openshift.io/v1alpha1 + kind: InternalReleaseImage + metadata: + name: cluster + spec: + releases: + - name: ocp-release-bundle-4.18.0-x86_64 + status: + releases: + - name: ocp-release-bundle-4.18.0-x86_64 + conditions: + - type: Available + status: "True" + reason: "Available" + message: "Release ocp-release-bundle-4.18.0-x86_64 is currently available" + lastTransitionTime: "2024-11-01T07:00:00Z" + updated: | + apiVersion: machineconfiguration.openshift.io/v1alpha1 + kind: InternalReleaseImage + metadata: + name: cluster + spec: + releases: + - name: ocp-release-bundle-4.18.0-x86_64 + status: + releases: + - name: ocp-release-bundle-4.18.0-x86_64 + image: not-a-valid-image-reference + conditions: + - type: Available + status: "True" + reason: "Available" + message: "Release ocp-release-bundle-4.18.0-x86_64 is currently available" + lastTransitionTime: "2024-11-01T07:00:00Z" + expectedStatusError: "Invalid value: \"string\": the OCI Image name should follow the host[:port][/namespace]/name format, resembling a valid URL without the scheme" \ No newline at end of file diff --git a/machineconfiguration/v1alpha1/tests/internalreleaseimages.machineconfiguration.openshift.io/NoRegistryClusterOperations.yaml b/machineconfiguration/v1alpha1/tests/internalreleaseimages.machineconfiguration.openshift.io/NoRegistryClusterOperations.yaml deleted file mode 100644 index e9de1049fca..00000000000 --- a/machineconfiguration/v1alpha1/tests/internalreleaseimages.machineconfiguration.openshift.io/NoRegistryClusterOperations.yaml +++ /dev/null @@ -1,43 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this -name: "[TechPreview] InternalReleaseImage" -crdName: internalreleaseimages.machineconfiguration.openshift.io -featureGate: NoRegistryClusterOperations -tests: - onCreate: - - name: Should be able to create a minimal InternalReleaseImage - initial: | - apiVersion: machineconfiguration.openshift.io/v1alpha1 - kind: InternalReleaseImage - spec: - releases: - - name: ocp-release-bundle-4.18.0-x86_64 - expected: | - apiVersion: machineconfiguration.openshift.io/v1alpha1 - kind: InternalReleaseImage - spec: - releases: - - name: ocp-release-bundle-4.18.0-x86_64 - - name: Invalid undefined releases - initial: | - apiVersion: machineconfiguration.openshift.io/v1alpha1 - kind: InternalReleaseImage - spec: - expectedError: "spec: Required value" - - name: Invalid empty release name - initial: | - apiVersion: machineconfiguration.openshift.io/v1alpha1 - kind: InternalReleaseImage - spec: - releases: - - name: "" - expectedError: "Invalid value: \"\": spec.releases[0].name in body should be at least 1 chars long" - - name: Should reject duplicate releases - initial: | - apiVersion: machineconfiguration.openshift.io/v1alpha1 - kind: InternalReleaseImage - spec: - releases: - - name: ocp-release-bundle-4.18.0-x86_64 - - name: ocp-release-bundle-4.18.0-x86_64 - expectedError: "Duplicate value: map[string]interface {}{\"name\":\"ocp-release-bundle-4.18.0-x86_64\"}" - diff --git a/machineconfiguration/v1alpha1/types_internalreleaseimage.go b/machineconfiguration/v1alpha1/types_internalreleaseimage.go index 3f36f08b9b7..e0994b14961 100644 --- a/machineconfiguration/v1alpha1/types_internalreleaseimage.go +++ b/machineconfiguration/v1alpha1/types_internalreleaseimage.go @@ -12,8 +12,9 @@ import ( // +kubebuilder:subresource:status // +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/2510 // +openshift:file-pattern=cvoRunLevel=0000_80,operatorName=machine-config,operatorOrdering=01 -// +openshift:enable:FeatureGate=NoRegistryClusterOperations +// +openshift:enable:FeatureGate=NoRegistryClusterInstall // +kubebuilder:metadata:labels=openshift.io/operator-managed= +// +kubebuilder:validation:XValidation:rule="self.metadata.name == 'cluster'",message="internalreleaseimage is a singleton, .metadata.name must be 'cluster'" // InternalReleaseImage is used to keep track and manage a set // of release bundles (OCP and OLM operators images) that are stored @@ -26,25 +27,26 @@ type InternalReleaseImage struct { // metadata is the standard object's metadata. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional + // +required metav1.ObjectMeta `json:"metadata,omitempty"` // spec describes the configuration of this internal release image. // +required - Spec InternalReleaseImageSpec `json:"spec,omitzero"` + Spec InternalReleaseImageSpec `json:"spec,omitempty,omitzero"` // status describes the last observed state of this internal release image. // +optional - Status *InternalReleaseImageStatus `json:"status,omitempty"` + Status InternalReleaseImageStatus `json:"status,omitempty,omitzero"` } // InternalReleaseImageSpec defines the desired state of a InternalReleaseImage. type InternalReleaseImageSpec struct { // releases is a list of release bundle identifiers that the user wants to // add/remove to/from the control plane nodes. - // This field can contain between 1 and 5 entries. + // Entries must be unique, keyed on the name field. + // releases must contain at least one entry and must not exceed 16 entries. // +kubebuilder:validation:MinItems=1 - // +kubebuilder:validation:MaxItems=5 + // +kubebuilder:validation:MaxItems=16 // +listType=map // +listMapKey=name // +required @@ -55,59 +57,92 @@ type InternalReleaseImageSpec struct { // bundle. Currently it contains only the name field. type InternalReleaseImageRef struct { // name indicates the desired release bundle identifier. This field is required and must be between 1 and 64 characters long. + // The expected name format is ocp-release-bundle--. // +required // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=64 + // +kubebuilder:validation:XValidation:rule=`self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9_-]+$')`,message="must be ocp-release-bundle-- and <= 64 chars" Name string `json:"name,omitempty"` } // InternalReleaseImageStatus describes the current state of a InternalReleaseImage. type InternalReleaseImageStatus struct { - // mountedReleases is a list of release bundle identifiers currently detected - // from the ISO attached to one of the control plane nodes. Any reported identifier can - // be used to amend the `spec.Releases` field to add a new release bundle to the cluster. - // An empty value indicates that no ISOs are currently being detected on any control plane - // node. - // Must not exceed 5 entries. + // releases is a list of the release bundles currently owned and managed by the + // cluster. + // A release bundle content could be safely pulled only when its Conditions field + // contains at least an Available entry set to "True" and Degraded to "False". + // Entries must be unique, keyed on the name field. + // releases must contain at least one entry and must not exceed 32 entries. // +listType=map // +listMapKey=name - // +kubebuilder:validation:MaxItems=5 - // +optional - MountedReleases []InternalReleaseImageRef `json:"mountedReleases,omitempty"` + // +kubebuilder:validation:MinItems=1 + // +kubebuilder:validation:MaxItems=32 + // +required + Releases []InternalReleaseImageBundleStatus `json:"releases,omitempty"` +} - // availableReleases is a list of the release bundles currently owned and managed by the - // cluster, indicating that their images can be safely pulled by any cluster entity - // requiring them. - // This field can contain between 1 and 5 entries. +type InternalReleaseImageBundleStatus struct { + // conditions represent the observations of an internal release image current state. Valid types are: + // Mounted, Installing, Available, Removing and Degraded. + // + // If Mounted is true, that means that a valid ISO has been discovered and mounted on one of the cluster nodes. + // If Installing is true, that means that a new release bundle is currently being copied on one (or more) cluster nodes, and not yet completed. + // If Available is true, it means that the release has been previously installed on all the cluster nodes, and it can be used. + // If Removing is true, it means that a release deletion is in progress on one (or more) cluster nodes, and not yet completed. + // If Degraded is true, that means something has gone wrong (possibly on one or more cluster nodes). + // + // In general, after installing a new release bundle, it is required to wait for the Conditions "Available" to become "True" (and all + // the other conditions to be equal to "False") before being able to pull its content. + // // +listType=map - // +listMapKey=name + // +listMapKey=type // +kubebuilder:validation:MinItems=1 // +kubebuilder:validation:MaxItems=5 // +optional - AvailableReleases []InternalReleaseImageDetailedRef `json:"availableReleases,omitempty"` -} - -// InternalReleaseImageDetailedRef is used to provide a more detailed reference for -// a release bundle. -type InternalReleaseImageDetailedRef struct { + Conditions []metav1.Condition `json:"conditions,omitempty"` // name indicates the desired release bundle identifier. This field is required and must be between 1 and 64 characters long. + // The expected name format is ocp-release-bundle--. // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=64 + // +kubebuilder:validation:XValidation:rule=`self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9_-]+$')`,message="must be ocp-release-bundle-- and <= 64 chars" // +required Name string `json:"name,omitempty"` - // image is an OCP release image referenced by digest. // The format of the image pull spec is: host[:port][/namespace]/name@sha256:, // where the digest must be 64 characters long, and consist only of lowercase hexadecimal characters, a-f and 0-9. // The length of the whole spec must be between 1 to 447 characters. + // The field is optional, and it will be provided after a release will be successfully installed. // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=447 // +kubebuilder:validation:XValidation:rule=`(self.split('@').size() == 2 && self.split('@')[1].matches('^sha256:[a-f0-9]{64}$'))`,message="the OCI Image reference must end with a valid '@sha256:' suffix, where '' is 64 characters long" // +kubebuilder:validation:XValidation:rule=`(self.split('@')[0].matches('^([a-zA-Z0-9-]+\\.)+[a-zA-Z0-9-]+(:[0-9]{2,5})?/([a-zA-Z0-9-_]{0,61}/)?[a-zA-Z0-9-_.]*?$'))`,message="the OCI Image name should follow the host[:port][/namespace]/name format, resembling a valid URL without the scheme" - // +required + // +optional Image string `json:"image,omitempty"` } +// InternalReleaseImageConditionType is each possible state for each possible InternalReleaseImageBundleStatus +// conditions type. +// +enum +type InternalReleaseImageConditionType string + +const ( + // InternalReleaseImageConditionTypeMounted describes a new release, not yet installed, that has been discovered when an ISO has been attached to + // one of the control plane nodes + InternalReleaseImageConditionTypeMounted InternalReleaseImageConditionType = "Mounted" + // InternalReleaseImageConditionTypeInstalling describes a new release that is getting installed in the cluster. Due the size of the data + // transfered, the operation could take several minutes. The condition will remain in such state until all the control plane nodes will + // complete the installing operation + InternalReleaseImageConditionTypeInstalling InternalReleaseImageConditionType = "Installing" + // InternalReleaseImageConditionTypeAvailable describes a release that has been successfully installed in the cluster, ready to be consumed. This + // means that the release has been successfully installed on all the control plane nodes + InternalReleaseImageConditionTypeAvailable InternalReleaseImageConditionType = "Available" + // InternalReleaseImageConditionTypeRemoving describes an existing release that is getting removed from the cluster. The condition will remain in such + // state until all the control plane nodes will complete the removal operation + InternalReleaseImageConditionTypeRemoving InternalReleaseImageConditionType = "Removing" + // InternalReleaseImageConditionTypeDegraded describes a failure, happened in one or more control plane nodes, for the current release + InternalReleaseImageConditionTypeDegraded InternalReleaseImageConditionType = "Degraded" +) + // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // InternalReleaseImageList is a list of InternalReleaseImage resources diff --git a/machineconfiguration/v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_internalreleaseimages-CustomNoUpgrade.crd.yaml b/machineconfiguration/v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_internalreleaseimages-CustomNoUpgrade.crd.yaml index 285d1e76ada..ee921d43058 100644 --- a/machineconfiguration/v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_internalreleaseimages-CustomNoUpgrade.crd.yaml +++ b/machineconfiguration/v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_internalreleaseimages-CustomNoUpgrade.crd.yaml @@ -54,23 +54,28 @@ spec: description: |- releases is a list of release bundle identifiers that the user wants to add/remove to/from the control plane nodes. - This field can contain between 1 and 5 entries. + Entries must be unique, keyed on the name field. + releases must contain at least one entry and must not exceed 16 entries. items: description: |- InternalReleaseImageRef is used to provide a simple reference for a release bundle. Currently it contains only the name field. properties: name: - description: name indicates the desired release bundle identifier. - This field is required and must be between 1 and 64 characters - long. + description: |- + name indicates the desired release bundle identifier. This field is required and must be between 1 and 64 characters long. + The expected name format is ocp-release-bundle--. maxLength: 64 minLength: 1 type: string + x-kubernetes-validations: + - message: must be ocp-release-bundle-- + and <= 64 chars + rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9_-]+$') required: - name type: object - maxItems: 5 + maxItems: 16 minItems: 1 type: array x-kubernetes-list-map-keys: @@ -83,23 +88,97 @@ spec: description: status describes the last observed state of this internal release image. properties: - availableReleases: + releases: description: |- - availableReleases is a list of the release bundles currently owned and managed by the - cluster, indicating that their images can be safely pulled by any cluster entity - requiring them. - This field can contain between 1 and 5 entries. + releases is a list of the release bundles currently owned and managed by the + cluster. + A release bundle content could be safely pulled only when its Conditions field + contains at least an Available entry set to "True" and Degraded to "False". + Entries must be unique, keyed on the name field. + releases must contain at least one entry and must not exceed 32 entries. items: - description: |- - InternalReleaseImageDetailedRef is used to provide a more detailed reference for - a release bundle. properties: + conditions: + description: |- + conditions represent the observations of an internal release image current state. Valid types are: + Mounted, Installing, Available, Removing and Degraded. + + If Mounted is true, that means that a valid ISO has been discovered and mounted on one of the cluster nodes. + If Installing is true, that means that a new release bundle is currently being copied on one (or more) cluster nodes, and not yet completed. + If Available is true, it means that the release has been previously installed on all the cluster nodes, and it can be used. + If Removing is true, it means that a release deletion is in progress on one (or more) cluster nodes, and not yet completed. + If Degraded is true, that means something has gone wrong (possibly on one or more cluster nodes). + + In general, after installing a new release bundle, it is required to wait for the Conditions "Available" to become "True" (and all + the other conditions to be equal to "False") before being able to pull its content. + items: + description: Condition contains details for one aspect of + the current state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, + Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 5 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map image: description: |- image is an OCP release image referenced by digest. The format of the image pull spec is: host[:port][/namespace]/name@sha256:, where the digest must be 64 characters long, and consist only of lowercase hexadecimal characters, a-f and 0-9. The length of the whole spec must be between 1 to 447 characters. + The field is optional, and it will be provided after a release will be successfully installed. maxLength: 447 minLength: 1 type: string @@ -111,54 +190,35 @@ spec: format, resembling a valid URL without the scheme rule: (self.split('@')[0].matches('^([a-zA-Z0-9-]+\\.)+[a-zA-Z0-9-]+(:[0-9]{2,5})?/([a-zA-Z0-9-_]{0,61}/)?[a-zA-Z0-9-_.]*?$')) name: - description: name indicates the desired release bundle identifier. - This field is required and must be between 1 and 64 characters - long. + description: |- + name indicates the desired release bundle identifier. This field is required and must be between 1 and 64 characters long. + The expected name format is ocp-release-bundle--. maxLength: 64 minLength: 1 type: string + x-kubernetes-validations: + - message: must be ocp-release-bundle-- + and <= 64 chars + rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9_-]+$') required: - - image - name type: object - maxItems: 5 + maxItems: 32 minItems: 1 type: array x-kubernetes-list-map-keys: - name x-kubernetes-list-type: map - mountedReleases: - description: |- - mountedReleases is a list of release bundle identifiers currently detected - from the ISO attached to one of the control plane nodes. Any reported identifier can - be used to amend the `spec.Releases` field to add a new release bundle to the cluster. - An empty value indicates that no ISOs are currently being detected on any control plane - node. - Must not exceed 5 entries. - items: - description: |- - InternalReleaseImageRef is used to provide a simple reference for a release - bundle. Currently it contains only the name field. - properties: - name: - description: name indicates the desired release bundle identifier. - This field is required and must be between 1 and 64 characters - long. - maxLength: 64 - minLength: 1 - type: string - required: - - name - type: object - maxItems: 5 - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map + required: + - releases type: object required: + - metadata - spec type: object + x-kubernetes-validations: + - message: internalreleaseimage is a singleton, .metadata.name must be 'cluster' + rule: self.metadata.name == 'cluster' served: true storage: true subresources: diff --git a/machineconfiguration/v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_internalreleaseimages-DevPreviewNoUpgrade.crd.yaml b/machineconfiguration/v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_internalreleaseimages-DevPreviewNoUpgrade.crd.yaml index 6d9f2f31d7f..a94eddbf95b 100644 --- a/machineconfiguration/v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_internalreleaseimages-DevPreviewNoUpgrade.crd.yaml +++ b/machineconfiguration/v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_internalreleaseimages-DevPreviewNoUpgrade.crd.yaml @@ -53,23 +53,28 @@ spec: description: |- releases is a list of release bundle identifiers that the user wants to add/remove to/from the control plane nodes. - This field can contain between 1 and 5 entries. + Entries must be unique, keyed on the name field. + releases must contain at least one entry and must not exceed 16 entries. items: description: |- InternalReleaseImageRef is used to provide a simple reference for a release bundle. Currently it contains only the name field. properties: name: - description: name indicates the desired release bundle identifier. - This field is required and must be between 1 and 64 characters - long. + description: |- + name indicates the desired release bundle identifier. This field is required and must be between 1 and 64 characters long. + The expected name format is ocp-release-bundle--. maxLength: 64 minLength: 1 type: string + x-kubernetes-validations: + - message: must be ocp-release-bundle-- + and <= 64 chars + rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9_-]+$') required: - name type: object - maxItems: 5 + maxItems: 16 minItems: 1 type: array x-kubernetes-list-map-keys: @@ -82,23 +87,97 @@ spec: description: status describes the last observed state of this internal release image. properties: - availableReleases: + releases: description: |- - availableReleases is a list of the release bundles currently owned and managed by the - cluster, indicating that their images can be safely pulled by any cluster entity - requiring them. - This field can contain between 1 and 5 entries. + releases is a list of the release bundles currently owned and managed by the + cluster. + A release bundle content could be safely pulled only when its Conditions field + contains at least an Available entry set to "True" and Degraded to "False". + Entries must be unique, keyed on the name field. + releases must contain at least one entry and must not exceed 32 entries. items: - description: |- - InternalReleaseImageDetailedRef is used to provide a more detailed reference for - a release bundle. properties: + conditions: + description: |- + conditions represent the observations of an internal release image current state. Valid types are: + Mounted, Installing, Available, Removing and Degraded. + + If Mounted is true, that means that a valid ISO has been discovered and mounted on one of the cluster nodes. + If Installing is true, that means that a new release bundle is currently being copied on one (or more) cluster nodes, and not yet completed. + If Available is true, it means that the release has been previously installed on all the cluster nodes, and it can be used. + If Removing is true, it means that a release deletion is in progress on one (or more) cluster nodes, and not yet completed. + If Degraded is true, that means something has gone wrong (possibly on one or more cluster nodes). + + In general, after installing a new release bundle, it is required to wait for the Conditions "Available" to become "True" (and all + the other conditions to be equal to "False") before being able to pull its content. + items: + description: Condition contains details for one aspect of + the current state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, + Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 5 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map image: description: |- image is an OCP release image referenced by digest. The format of the image pull spec is: host[:port][/namespace]/name@sha256:, where the digest must be 64 characters long, and consist only of lowercase hexadecimal characters, a-f and 0-9. The length of the whole spec must be between 1 to 447 characters. + The field is optional, and it will be provided after a release will be successfully installed. maxLength: 447 minLength: 1 type: string @@ -110,54 +189,35 @@ spec: format, resembling a valid URL without the scheme rule: (self.split('@')[0].matches('^([a-zA-Z0-9-]+\\.)+[a-zA-Z0-9-]+(:[0-9]{2,5})?/([a-zA-Z0-9-_]{0,61}/)?[a-zA-Z0-9-_.]*?$')) name: - description: name indicates the desired release bundle identifier. - This field is required and must be between 1 and 64 characters - long. + description: |- + name indicates the desired release bundle identifier. This field is required and must be between 1 and 64 characters long. + The expected name format is ocp-release-bundle--. maxLength: 64 minLength: 1 type: string + x-kubernetes-validations: + - message: must be ocp-release-bundle-- + and <= 64 chars + rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9_-]+$') required: - - image - name type: object - maxItems: 5 + maxItems: 32 minItems: 1 type: array x-kubernetes-list-map-keys: - name x-kubernetes-list-type: map - mountedReleases: - description: |- - mountedReleases is a list of release bundle identifiers currently detected - from the ISO attached to one of the control plane nodes. Any reported identifier can - be used to amend the `spec.Releases` field to add a new release bundle to the cluster. - An empty value indicates that no ISOs are currently being detected on any control plane - node. - Must not exceed 5 entries. - items: - description: |- - InternalReleaseImageRef is used to provide a simple reference for a release - bundle. Currently it contains only the name field. - properties: - name: - description: name indicates the desired release bundle identifier. - This field is required and must be between 1 and 64 characters - long. - maxLength: 64 - minLength: 1 - type: string - required: - - name - type: object - maxItems: 5 - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map + required: + - releases type: object required: + - metadata - spec type: object + x-kubernetes-validations: + - message: internalreleaseimage is a singleton, .metadata.name must be 'cluster' + rule: self.metadata.name == 'cluster' served: true storage: true subresources: diff --git a/machineconfiguration/v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_internalreleaseimages-TechPreviewNoUpgrade.crd.yaml b/machineconfiguration/v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_internalreleaseimages-TechPreviewNoUpgrade.crd.yaml index 8e85fb15b3b..be6de10a68d 100644 --- a/machineconfiguration/v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_internalreleaseimages-TechPreviewNoUpgrade.crd.yaml +++ b/machineconfiguration/v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_internalreleaseimages-TechPreviewNoUpgrade.crd.yaml @@ -53,23 +53,28 @@ spec: description: |- releases is a list of release bundle identifiers that the user wants to add/remove to/from the control plane nodes. - This field can contain between 1 and 5 entries. + Entries must be unique, keyed on the name field. + releases must contain at least one entry and must not exceed 16 entries. items: description: |- InternalReleaseImageRef is used to provide a simple reference for a release bundle. Currently it contains only the name field. properties: name: - description: name indicates the desired release bundle identifier. - This field is required and must be between 1 and 64 characters - long. + description: |- + name indicates the desired release bundle identifier. This field is required and must be between 1 and 64 characters long. + The expected name format is ocp-release-bundle--. maxLength: 64 minLength: 1 type: string + x-kubernetes-validations: + - message: must be ocp-release-bundle-- + and <= 64 chars + rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9_-]+$') required: - name type: object - maxItems: 5 + maxItems: 16 minItems: 1 type: array x-kubernetes-list-map-keys: @@ -82,23 +87,97 @@ spec: description: status describes the last observed state of this internal release image. properties: - availableReleases: + releases: description: |- - availableReleases is a list of the release bundles currently owned and managed by the - cluster, indicating that their images can be safely pulled by any cluster entity - requiring them. - This field can contain between 1 and 5 entries. + releases is a list of the release bundles currently owned and managed by the + cluster. + A release bundle content could be safely pulled only when its Conditions field + contains at least an Available entry set to "True" and Degraded to "False". + Entries must be unique, keyed on the name field. + releases must contain at least one entry and must not exceed 32 entries. items: - description: |- - InternalReleaseImageDetailedRef is used to provide a more detailed reference for - a release bundle. properties: + conditions: + description: |- + conditions represent the observations of an internal release image current state. Valid types are: + Mounted, Installing, Available, Removing and Degraded. + + If Mounted is true, that means that a valid ISO has been discovered and mounted on one of the cluster nodes. + If Installing is true, that means that a new release bundle is currently being copied on one (or more) cluster nodes, and not yet completed. + If Available is true, it means that the release has been previously installed on all the cluster nodes, and it can be used. + If Removing is true, it means that a release deletion is in progress on one (or more) cluster nodes, and not yet completed. + If Degraded is true, that means something has gone wrong (possibly on one or more cluster nodes). + + In general, after installing a new release bundle, it is required to wait for the Conditions "Available" to become "True" (and all + the other conditions to be equal to "False") before being able to pull its content. + items: + description: Condition contains details for one aspect of + the current state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, + Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 5 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map image: description: |- image is an OCP release image referenced by digest. The format of the image pull spec is: host[:port][/namespace]/name@sha256:, where the digest must be 64 characters long, and consist only of lowercase hexadecimal characters, a-f and 0-9. The length of the whole spec must be between 1 to 447 characters. + The field is optional, and it will be provided after a release will be successfully installed. maxLength: 447 minLength: 1 type: string @@ -110,54 +189,35 @@ spec: format, resembling a valid URL without the scheme rule: (self.split('@')[0].matches('^([a-zA-Z0-9-]+\\.)+[a-zA-Z0-9-]+(:[0-9]{2,5})?/([a-zA-Z0-9-_]{0,61}/)?[a-zA-Z0-9-_.]*?$')) name: - description: name indicates the desired release bundle identifier. - This field is required and must be between 1 and 64 characters - long. + description: |- + name indicates the desired release bundle identifier. This field is required and must be between 1 and 64 characters long. + The expected name format is ocp-release-bundle--. maxLength: 64 minLength: 1 type: string + x-kubernetes-validations: + - message: must be ocp-release-bundle-- + and <= 64 chars + rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9_-]+$') required: - - image - name type: object - maxItems: 5 + maxItems: 32 minItems: 1 type: array x-kubernetes-list-map-keys: - name x-kubernetes-list-type: map - mountedReleases: - description: |- - mountedReleases is a list of release bundle identifiers currently detected - from the ISO attached to one of the control plane nodes. Any reported identifier can - be used to amend the `spec.Releases` field to add a new release bundle to the cluster. - An empty value indicates that no ISOs are currently being detected on any control plane - node. - Must not exceed 5 entries. - items: - description: |- - InternalReleaseImageRef is used to provide a simple reference for a release - bundle. Currently it contains only the name field. - properties: - name: - description: name indicates the desired release bundle identifier. - This field is required and must be between 1 and 64 characters - long. - maxLength: 64 - minLength: 1 - type: string - required: - - name - type: object - maxItems: 5 - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map + required: + - releases type: object required: + - metadata - spec type: object + x-kubernetes-validations: + - message: internalreleaseimage is a singleton, .metadata.name must be 'cluster' + rule: self.metadata.name == 'cluster' served: true storage: true subresources: diff --git a/machineconfiguration/v1alpha1/zz_generated.deepcopy.go b/machineconfiguration/v1alpha1/zz_generated.deepcopy.go index 045b4c5e8bb..1554d101998 100644 --- a/machineconfiguration/v1alpha1/zz_generated.deepcopy.go +++ b/machineconfiguration/v1alpha1/zz_generated.deepcopy.go @@ -16,11 +16,7 @@ func (in *InternalReleaseImage) DeepCopyInto(out *InternalReleaseImage) { out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) - if in.Status != nil { - in, out := &in.Status, &out.Status - *out = new(InternalReleaseImageStatus) - (*in).DeepCopyInto(*out) - } + in.Status.DeepCopyInto(&out.Status) return } @@ -43,17 +39,24 @@ func (in *InternalReleaseImage) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *InternalReleaseImageDetailedRef) DeepCopyInto(out *InternalReleaseImageDetailedRef) { +func (in *InternalReleaseImageBundleStatus) DeepCopyInto(out *InternalReleaseImageBundleStatus) { *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]v1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InternalReleaseImageDetailedRef. -func (in *InternalReleaseImageDetailedRef) DeepCopy() *InternalReleaseImageDetailedRef { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InternalReleaseImageBundleStatus. +func (in *InternalReleaseImageBundleStatus) DeepCopy() *InternalReleaseImageBundleStatus { if in == nil { return nil } - out := new(InternalReleaseImageDetailedRef) + out := new(InternalReleaseImageBundleStatus) in.DeepCopyInto(out) return out } @@ -131,15 +134,12 @@ func (in *InternalReleaseImageSpec) DeepCopy() *InternalReleaseImageSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *InternalReleaseImageStatus) DeepCopyInto(out *InternalReleaseImageStatus) { *out = *in - if in.MountedReleases != nil { - in, out := &in.MountedReleases, &out.MountedReleases - *out = make([]InternalReleaseImageRef, len(*in)) - copy(*out, *in) - } - if in.AvailableReleases != nil { - in, out := &in.AvailableReleases, &out.AvailableReleases - *out = make([]InternalReleaseImageDetailedRef, len(*in)) - copy(*out, *in) + if in.Releases != nil { + in, out := &in.Releases, &out.Releases + *out = make([]InternalReleaseImageBundleStatus, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } } return } diff --git a/machineconfiguration/v1alpha1/zz_generated.featuregated-crd-manifests.yaml b/machineconfiguration/v1alpha1/zz_generated.featuregated-crd-manifests.yaml index 3dfc0ccc370..dc82dc2049a 100644 --- a/machineconfiguration/v1alpha1/zz_generated.featuregated-crd-manifests.yaml +++ b/machineconfiguration/v1alpha1/zz_generated.featuregated-crd-manifests.yaml @@ -5,7 +5,7 @@ internalreleaseimages.machineconfiguration.openshift.io: Capability: "" Category: "" FeatureGates: - - NoRegistryClusterOperations + - NoRegistryClusterInstall FilenameOperatorName: machine-config FilenameOperatorOrdering: "01" FilenameRunLevel: "0000_80" @@ -19,7 +19,7 @@ internalreleaseimages.machineconfiguration.openshift.io: Scope: Cluster ShortNames: null TopLevelFeatureGates: - - NoRegistryClusterOperations + - NoRegistryClusterInstall Version: v1alpha1 machineconfignodes.machineconfiguration.openshift.io: diff --git a/machineconfiguration/v1alpha1/zz_generated.featuregated-crd-manifests/internalreleaseimages.machineconfiguration.openshift.io/NoRegistryClusterInstall.yaml b/machineconfiguration/v1alpha1/zz_generated.featuregated-crd-manifests/internalreleaseimages.machineconfiguration.openshift.io/NoRegistryClusterInstall.yaml new file mode 100644 index 00000000000..5d7b36db910 --- /dev/null +++ b/machineconfiguration/v1alpha1/zz_generated.featuregated-crd-manifests/internalreleaseimages.machineconfiguration.openshift.io/NoRegistryClusterInstall.yaml @@ -0,0 +1,225 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + api-approved.openshift.io: https://github.com/openshift/api/pull/2510 + api.openshift.io/filename-cvo-runlevel: "0000_80" + api.openshift.io/filename-operator: machine-config + api.openshift.io/filename-ordering: "01" + feature-gate.release.openshift.io/NoRegistryClusterInstall: "true" + labels: + openshift.io/operator-managed: "" + name: internalreleaseimages.machineconfiguration.openshift.io +spec: + group: machineconfiguration.openshift.io + names: + kind: InternalReleaseImage + listKind: InternalReleaseImageList + plural: internalreleaseimages + singular: internalreleaseimage + scope: Cluster + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: |- + InternalReleaseImage is used to keep track and manage a set + of release bundles (OCP and OLM operators images) that are stored + into the control planes nodes. + + 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. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: spec describes the configuration of this internal release + image. + properties: + releases: + description: |- + releases is a list of release bundle identifiers that the user wants to + add/remove to/from the control plane nodes. + Entries must be unique, keyed on the name field. + releases must contain at least one entry and must not exceed 16 entries. + items: + description: |- + InternalReleaseImageRef is used to provide a simple reference for a release + bundle. Currently it contains only the name field. + properties: + name: + description: |- + name indicates the desired release bundle identifier. This field is required and must be between 1 and 64 characters long. + The expected name format is ocp-release-bundle--. + maxLength: 64 + minLength: 1 + type: string + x-kubernetes-validations: + - message: must be ocp-release-bundle-- + and <= 64 chars + rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9_-]+$') + required: + - name + type: object + maxItems: 16 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + required: + - releases + type: object + status: + description: status describes the last observed state of this internal + release image. + properties: + releases: + description: |- + releases is a list of the release bundles currently owned and managed by the + cluster. + A release bundle content could be safely pulled only when its Conditions field + contains at least an Available entry set to "True" and Degraded to "False". + Entries must be unique, keyed on the name field. + releases must contain at least one entry and must not exceed 32 entries. + items: + properties: + conditions: + description: |- + conditions represent the observations of an internal release image current state. Valid types are: + Mounted, Installing, Available, Removing and Degraded. + + If Mounted is true, that means that a valid ISO has been discovered and mounted on one of the cluster nodes. + If Installing is true, that means that a new release bundle is currently being copied on one (or more) cluster nodes, and not yet completed. + If Available is true, it means that the release has been previously installed on all the cluster nodes, and it can be used. + If Removing is true, it means that a release deletion is in progress on one (or more) cluster nodes, and not yet completed. + If Degraded is true, that means something has gone wrong (possibly on one or more cluster nodes). + + In general, after installing a new release bundle, it is required to wait for the Conditions "Available" to become "True" (and all + the other conditions to be equal to "False") before being able to pull its content. + items: + description: Condition contains details for one aspect of + the current state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, + Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 5 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + image: + description: |- + image is an OCP release image referenced by digest. + The format of the image pull spec is: host[:port][/namespace]/name@sha256:, + where the digest must be 64 characters long, and consist only of lowercase hexadecimal characters, a-f and 0-9. + The length of the whole spec must be between 1 to 447 characters. + The field is optional, and it will be provided after a release will be successfully installed. + maxLength: 447 + minLength: 1 + type: string + x-kubernetes-validations: + - message: the OCI Image reference must end with a valid '@sha256:' + suffix, where '' is 64 characters long + rule: (self.split('@').size() == 2 && self.split('@')[1].matches('^sha256:[a-f0-9]{64}$')) + - message: the OCI Image name should follow the host[:port][/namespace]/name + format, resembling a valid URL without the scheme + rule: (self.split('@')[0].matches('^([a-zA-Z0-9-]+\\.)+[a-zA-Z0-9-]+(:[0-9]{2,5})?/([a-zA-Z0-9-_]{0,61}/)?[a-zA-Z0-9-_.]*?$')) + name: + description: |- + name indicates the desired release bundle identifier. This field is required and must be between 1 and 64 characters long. + The expected name format is ocp-release-bundle--. + maxLength: 64 + minLength: 1 + type: string + x-kubernetes-validations: + - message: must be ocp-release-bundle-- + and <= 64 chars + rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9_-]+$') + required: + - name + type: object + maxItems: 32 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + required: + - releases + type: object + required: + - metadata + - spec + type: object + x-kubernetes-validations: + - message: internalreleaseimage is a singleton, .metadata.name must be 'cluster' + rule: self.metadata.name == 'cluster' + served: true + storage: true + subresources: + status: {} diff --git a/machineconfiguration/v1alpha1/zz_generated.featuregated-crd-manifests/internalreleaseimages.machineconfiguration.openshift.io/NoRegistryClusterOperations.yaml b/machineconfiguration/v1alpha1/zz_generated.featuregated-crd-manifests/internalreleaseimages.machineconfiguration.openshift.io/NoRegistryClusterOperations.yaml deleted file mode 100644 index e1f90f35365..00000000000 --- a/machineconfiguration/v1alpha1/zz_generated.featuregated-crd-manifests/internalreleaseimages.machineconfiguration.openshift.io/NoRegistryClusterOperations.yaml +++ /dev/null @@ -1,165 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - api-approved.openshift.io: https://github.com/openshift/api/pull/2510 - api.openshift.io/filename-cvo-runlevel: "0000_80" - api.openshift.io/filename-operator: machine-config - api.openshift.io/filename-ordering: "01" - feature-gate.release.openshift.io/NoRegistryClusterOperations: "true" - labels: - openshift.io/operator-managed: "" - name: internalreleaseimages.machineconfiguration.openshift.io -spec: - group: machineconfiguration.openshift.io - names: - kind: InternalReleaseImage - listKind: InternalReleaseImageList - plural: internalreleaseimages - singular: internalreleaseimage - scope: Cluster - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: |- - InternalReleaseImage is used to keep track and manage a set - of release bundles (OCP and OLM operators images) that are stored - into the control planes nodes. - - 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. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: spec describes the configuration of this internal release - image. - properties: - releases: - description: |- - releases is a list of release bundle identifiers that the user wants to - add/remove to/from the control plane nodes. - This field can contain between 1 and 5 entries. - items: - description: |- - InternalReleaseImageRef is used to provide a simple reference for a release - bundle. Currently it contains only the name field. - properties: - name: - description: name indicates the desired release bundle identifier. - This field is required and must be between 1 and 64 characters - long. - maxLength: 64 - minLength: 1 - type: string - required: - - name - type: object - maxItems: 5 - minItems: 1 - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - required: - - releases - type: object - status: - description: status describes the last observed state of this internal - release image. - properties: - availableReleases: - description: |- - availableReleases is a list of the release bundles currently owned and managed by the - cluster, indicating that their images can be safely pulled by any cluster entity - requiring them. - This field can contain between 1 and 5 entries. - items: - description: |- - InternalReleaseImageDetailedRef is used to provide a more detailed reference for - a release bundle. - properties: - image: - description: |- - image is an OCP release image referenced by digest. - The format of the image pull spec is: host[:port][/namespace]/name@sha256:, - where the digest must be 64 characters long, and consist only of lowercase hexadecimal characters, a-f and 0-9. - The length of the whole spec must be between 1 to 447 characters. - maxLength: 447 - minLength: 1 - type: string - x-kubernetes-validations: - - message: the OCI Image reference must end with a valid '@sha256:' - suffix, where '' is 64 characters long - rule: (self.split('@').size() == 2 && self.split('@')[1].matches('^sha256:[a-f0-9]{64}$')) - - message: the OCI Image name should follow the host[:port][/namespace]/name - format, resembling a valid URL without the scheme - rule: (self.split('@')[0].matches('^([a-zA-Z0-9-]+\\.)+[a-zA-Z0-9-]+(:[0-9]{2,5})?/([a-zA-Z0-9-_]{0,61}/)?[a-zA-Z0-9-_.]*?$')) - name: - description: name indicates the desired release bundle identifier. - This field is required and must be between 1 and 64 characters - long. - maxLength: 64 - minLength: 1 - type: string - required: - - image - - name - type: object - maxItems: 5 - minItems: 1 - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - mountedReleases: - description: |- - mountedReleases is a list of release bundle identifiers currently detected - from the ISO attached to one of the control plane nodes. Any reported identifier can - be used to amend the `spec.Releases` field to add a new release bundle to the cluster. - An empty value indicates that no ISOs are currently being detected on any control plane - node. - Must not exceed 5 entries. - items: - description: |- - InternalReleaseImageRef is used to provide a simple reference for a release - bundle. Currently it contains only the name field. - properties: - name: - description: name indicates the desired release bundle identifier. - This field is required and must be between 1 and 64 characters - long. - maxLength: 64 - minLength: 1 - type: string - required: - - name - type: object - maxItems: 5 - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} diff --git a/machineconfiguration/v1alpha1/zz_generated.swagger_doc_generated.go b/machineconfiguration/v1alpha1/zz_generated.swagger_doc_generated.go index e11e9f4447c..3540fa00605 100644 --- a/machineconfiguration/v1alpha1/zz_generated.swagger_doc_generated.go +++ b/machineconfiguration/v1alpha1/zz_generated.swagger_doc_generated.go @@ -22,14 +22,14 @@ func (InternalReleaseImage) SwaggerDoc() map[string]string { return map_InternalReleaseImage } -var map_InternalReleaseImageDetailedRef = map[string]string{ - "": "InternalReleaseImageDetailedRef is used to provide a more detailed reference for a release bundle.", - "name": "name indicates the desired release bundle identifier. This field is required and must be between 1 and 64 characters long.", - "image": "image is an OCP release image referenced by digest. The format of the image pull spec is: host[:port][/namespace]/name@sha256:, where the digest must be 64 characters long, and consist only of lowercase hexadecimal characters, a-f and 0-9. The length of the whole spec must be between 1 to 447 characters.", +var map_InternalReleaseImageBundleStatus = map[string]string{ + "conditions": "conditions represent the observations of an internal release image current state. Valid types are: Mounted, Installing, Available, Removing and Degraded.\n\nIf Mounted is true, that means that a valid ISO has been discovered and mounted on one of the cluster nodes. If Installing is true, that means that a new release bundle is currently being copied on one (or more) cluster nodes, and not yet completed. If Available is true, it means that the release has been previously installed on all the cluster nodes, and it can be used. If Removing is true, it means that a release deletion is in progress on one (or more) cluster nodes, and not yet completed. If Degraded is true, that means something has gone wrong (possibly on one or more cluster nodes).\n\nIn general, after installing a new release bundle, it is required to wait for the Conditions \"Available\" to become \"True\" (and all the other conditions to be equal to \"False\") before being able to pull its content.", + "name": "name indicates the desired release bundle identifier. This field is required and must be between 1 and 64 characters long. The expected name format is ocp-release-bundle--.", + "image": "image is an OCP release image referenced by digest. The format of the image pull spec is: host[:port][/namespace]/name@sha256:, where the digest must be 64 characters long, and consist only of lowercase hexadecimal characters, a-f and 0-9. The length of the whole spec must be between 1 to 447 characters. The field is optional, and it will be provided after a release will be successfully installed.", } -func (InternalReleaseImageDetailedRef) SwaggerDoc() map[string]string { - return map_InternalReleaseImageDetailedRef +func (InternalReleaseImageBundleStatus) SwaggerDoc() map[string]string { + return map_InternalReleaseImageBundleStatus } var map_InternalReleaseImageList = map[string]string{ @@ -43,7 +43,7 @@ func (InternalReleaseImageList) SwaggerDoc() map[string]string { var map_InternalReleaseImageRef = map[string]string{ "": "InternalReleaseImageRef is used to provide a simple reference for a release bundle. Currently it contains only the name field.", - "name": "name indicates the desired release bundle identifier. This field is required and must be between 1 and 64 characters long.", + "name": "name indicates the desired release bundle identifier. This field is required and must be between 1 and 64 characters long. The expected name format is ocp-release-bundle--.", } func (InternalReleaseImageRef) SwaggerDoc() map[string]string { @@ -52,7 +52,7 @@ func (InternalReleaseImageRef) SwaggerDoc() map[string]string { var map_InternalReleaseImageSpec = map[string]string{ "": "InternalReleaseImageSpec defines the desired state of a InternalReleaseImage.", - "releases": "releases is a list of release bundle identifiers that the user wants to add/remove to/from the control plane nodes. This field can contain between 1 and 5 entries.", + "releases": "releases is a list of release bundle identifiers that the user wants to add/remove to/from the control plane nodes. Entries must be unique, keyed on the name field. releases must contain at least one entry and must not exceed 16 entries.", } func (InternalReleaseImageSpec) SwaggerDoc() map[string]string { @@ -60,9 +60,8 @@ func (InternalReleaseImageSpec) SwaggerDoc() map[string]string { } var map_InternalReleaseImageStatus = map[string]string{ - "": "InternalReleaseImageStatus describes the current state of a InternalReleaseImage.", - "mountedReleases": "mountedReleases is a list of release bundle identifiers currently detected from the ISO attached to one of the control plane nodes. Any reported identifier can be used to amend the `spec.Releases` field to add a new release bundle to the cluster. An empty value indicates that no ISOs are currently being detected on any control plane node. Must not exceed 5 entries.", - "availableReleases": "availableReleases is a list of the release bundles currently owned and managed by the cluster, indicating that their images can be safely pulled by any cluster entity requiring them. This field can contain between 1 and 5 entries.", + "": "InternalReleaseImageStatus describes the current state of a InternalReleaseImage.", + "releases": "releases is a list of the release bundles currently owned and managed by the cluster. A release bundle content could be safely pulled only when its Conditions field contains at least an Available entry set to \"True\" and Degraded to \"False\". Entries must be unique, keyed on the name field. releases must contain at least one entry and must not exceed 32 entries.", } func (InternalReleaseImageStatus) SwaggerDoc() map[string]string { diff --git a/openapi/generated_openapi/zz_generated.openapi.go b/openapi/generated_openapi/zz_generated.openapi.go index 737d704e652..c015d75b516 100644 --- a/openapi/generated_openapi/zz_generated.openapi.go +++ b/openapi/generated_openapi/zz_generated.openapi.go @@ -852,7 +852,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "github.com/openshift/api/machine/v1beta1.VSphereMachineProviderStatus": schema_openshift_api_machine_v1beta1_VSphereMachineProviderStatus(ref), "github.com/openshift/api/machine/v1beta1.Workspace": schema_openshift_api_machine_v1beta1_Workspace(ref), "github.com/openshift/api/machineconfiguration/v1alpha1.InternalReleaseImage": schema_openshift_api_machineconfiguration_v1alpha1_InternalReleaseImage(ref), - "github.com/openshift/api/machineconfiguration/v1alpha1.InternalReleaseImageDetailedRef": schema_openshift_api_machineconfiguration_v1alpha1_InternalReleaseImageDetailedRef(ref), + "github.com/openshift/api/machineconfiguration/v1alpha1.InternalReleaseImageBundleStatus": schema_openshift_api_machineconfiguration_v1alpha1_InternalReleaseImageBundleStatus(ref), "github.com/openshift/api/machineconfiguration/v1alpha1.InternalReleaseImageList": schema_openshift_api_machineconfiguration_v1alpha1_InternalReleaseImageList(ref), "github.com/openshift/api/machineconfiguration/v1alpha1.InternalReleaseImageRef": schema_openshift_api_machineconfiguration_v1alpha1_InternalReleaseImageRef(ref), "github.com/openshift/api/machineconfiguration/v1alpha1.InternalReleaseImageSpec": schema_openshift_api_machineconfiguration_v1alpha1_InternalReleaseImageSpec(ref), @@ -43406,11 +43406,12 @@ func schema_openshift_api_machineconfiguration_v1alpha1_InternalReleaseImage(ref "status": { SchemaProps: spec.SchemaProps{ Description: "status describes the last observed state of this internal release image.", + Default: map[string]interface{}{}, Ref: ref("github.com/openshift/api/machineconfiguration/v1alpha1.InternalReleaseImageStatus"), }, }, }, - Required: []string{"spec"}, + Required: []string{"metadata", "spec"}, }, }, Dependencies: []string{ @@ -43418,31 +43419,54 @@ func schema_openshift_api_machineconfiguration_v1alpha1_InternalReleaseImage(ref } } -func schema_openshift_api_machineconfiguration_v1alpha1_InternalReleaseImageDetailedRef(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_openshift_api_machineconfiguration_v1alpha1_InternalReleaseImageBundleStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "InternalReleaseImageDetailedRef is used to provide a more detailed reference for a release bundle.", - Type: []string{"object"}, + Type: []string{"object"}, Properties: map[string]spec.Schema{ + "conditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "type", + }, + "x-kubernetes-list-type": "map", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "conditions represent the observations of an internal release image current state. Valid types are: Mounted, Installing, Available, Removing and Degraded.\n\nIf Mounted is true, that means that a valid ISO has been discovered and mounted on one of the cluster nodes. If Installing is true, that means that a new release bundle is currently being copied on one (or more) cluster nodes, and not yet completed. If Available is true, it means that the release has been previously installed on all the cluster nodes, and it can be used. If Removing is true, it means that a release deletion is in progress on one (or more) cluster nodes, and not yet completed. If Degraded is true, that means something has gone wrong (possibly on one or more cluster nodes).\n\nIn general, after installing a new release bundle, it is required to wait for the Conditions \"Available\" to become \"True\" (and all the other conditions to be equal to \"False\") before being able to pull its content.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Condition"), + }, + }, + }, + }, + }, "name": { SchemaProps: spec.SchemaProps{ - Description: "name indicates the desired release bundle identifier. This field is required and must be between 1 and 64 characters long.", + Description: "name indicates the desired release bundle identifier. This field is required and must be between 1 and 64 characters long. The expected name format is ocp-release-bundle--.", Type: []string{"string"}, Format: "", }, }, "image": { SchemaProps: spec.SchemaProps{ - Description: "image is an OCP release image referenced by digest. The format of the image pull spec is: host[:port][/namespace]/name@sha256:, where the digest must be 64 characters long, and consist only of lowercase hexadecimal characters, a-f and 0-9. The length of the whole spec must be between 1 to 447 characters.", + Description: "image is an OCP release image referenced by digest. The format of the image pull spec is: host[:port][/namespace]/name@sha256:, where the digest must be 64 characters long, and consist only of lowercase hexadecimal characters, a-f and 0-9. The length of the whole spec must be between 1 to 447 characters. The field is optional, and it will be provided after a release will be successfully installed.", Type: []string{"string"}, Format: "", }, }, }, - Required: []string{"name", "image"}, + Required: []string{"name"}, }, }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Condition"}, } } @@ -43505,7 +43529,7 @@ func schema_openshift_api_machineconfiguration_v1alpha1_InternalReleaseImageRef( Properties: map[string]spec.Schema{ "name": { SchemaProps: spec.SchemaProps{ - Description: "name indicates the desired release bundle identifier. This field is required and must be between 1 and 64 characters long.", + Description: "name indicates the desired release bundle identifier. This field is required and must be between 1 and 64 characters long. The expected name format is ocp-release-bundle--.", Type: []string{"string"}, Format: "", }, @@ -43534,7 +43558,7 @@ func schema_openshift_api_machineconfiguration_v1alpha1_InternalReleaseImageSpec }, }, SchemaProps: spec.SchemaProps{ - Description: "releases is a list of release bundle identifiers that the user wants to add/remove to/from the control plane nodes. This field can contain between 1 and 5 entries.", + Description: "releases is a list of release bundle identifiers that the user wants to add/remove to/from the control plane nodes. Entries must be unique, keyed on the name field. releases must contain at least one entry and must not exceed 16 entries.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ @@ -43562,29 +43586,7 @@ func schema_openshift_api_machineconfiguration_v1alpha1_InternalReleaseImageStat Description: "InternalReleaseImageStatus describes the current state of a InternalReleaseImage.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "mountedReleases": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-map-keys": []interface{}{ - "name", - }, - "x-kubernetes-list-type": "map", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "mountedReleases is a list of release bundle identifiers currently detected from the ISO attached to one of the control plane nodes. Any reported identifier can be used to amend the `spec.Releases` field to add a new release bundle to the cluster. An empty value indicates that no ISOs are currently being detected on any control plane node. Must not exceed 5 entries.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("github.com/openshift/api/machineconfiguration/v1alpha1.InternalReleaseImageRef"), - }, - }, - }, - }, - }, - "availableReleases": { + "releases": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ "x-kubernetes-list-map-keys": []interface{}{ @@ -43594,23 +43596,24 @@ func schema_openshift_api_machineconfiguration_v1alpha1_InternalReleaseImageStat }, }, SchemaProps: spec.SchemaProps{ - Description: "availableReleases is a list of the release bundles currently owned and managed by the cluster, indicating that their images can be safely pulled by any cluster entity requiring them. This field can contain between 1 and 5 entries.", + Description: "releases is a list of the release bundles currently owned and managed by the cluster. A release bundle content could be safely pulled only when its Conditions field contains at least an Available entry set to \"True\" and Degraded to \"False\". Entries must be unique, keyed on the name field. releases must contain at least one entry and must not exceed 32 entries.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("github.com/openshift/api/machineconfiguration/v1alpha1.InternalReleaseImageDetailedRef"), + Ref: ref("github.com/openshift/api/machineconfiguration/v1alpha1.InternalReleaseImageBundleStatus"), }, }, }, }, }, }, + Required: []string{"releases"}, }, }, Dependencies: []string{ - "github.com/openshift/api/machineconfiguration/v1alpha1.InternalReleaseImageDetailedRef", "github.com/openshift/api/machineconfiguration/v1alpha1.InternalReleaseImageRef"}, + "github.com/openshift/api/machineconfiguration/v1alpha1.InternalReleaseImageBundleStatus"}, } } diff --git a/payload-manifests/crds/0000_80_machine-config_01_internalreleaseimages-CustomNoUpgrade.crd.yaml b/payload-manifests/crds/0000_80_machine-config_01_internalreleaseimages-CustomNoUpgrade.crd.yaml new file mode 100644 index 00000000000..ee921d43058 --- /dev/null +++ b/payload-manifests/crds/0000_80_machine-config_01_internalreleaseimages-CustomNoUpgrade.crd.yaml @@ -0,0 +1,225 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + api-approved.openshift.io: https://github.com/openshift/api/pull/2510 + api.openshift.io/merged-by-featuregates: "true" + include.release.openshift.io/ibm-cloud-managed: "true" + include.release.openshift.io/self-managed-high-availability: "true" + release.openshift.io/feature-set: CustomNoUpgrade + labels: + openshift.io/operator-managed: "" + name: internalreleaseimages.machineconfiguration.openshift.io +spec: + group: machineconfiguration.openshift.io + names: + kind: InternalReleaseImage + listKind: InternalReleaseImageList + plural: internalreleaseimages + singular: internalreleaseimage + scope: Cluster + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: |- + InternalReleaseImage is used to keep track and manage a set + of release bundles (OCP and OLM operators images) that are stored + into the control planes nodes. + + 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. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: spec describes the configuration of this internal release + image. + properties: + releases: + description: |- + releases is a list of release bundle identifiers that the user wants to + add/remove to/from the control plane nodes. + Entries must be unique, keyed on the name field. + releases must contain at least one entry and must not exceed 16 entries. + items: + description: |- + InternalReleaseImageRef is used to provide a simple reference for a release + bundle. Currently it contains only the name field. + properties: + name: + description: |- + name indicates the desired release bundle identifier. This field is required and must be between 1 and 64 characters long. + The expected name format is ocp-release-bundle--. + maxLength: 64 + minLength: 1 + type: string + x-kubernetes-validations: + - message: must be ocp-release-bundle-- + and <= 64 chars + rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9_-]+$') + required: + - name + type: object + maxItems: 16 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + required: + - releases + type: object + status: + description: status describes the last observed state of this internal + release image. + properties: + releases: + description: |- + releases is a list of the release bundles currently owned and managed by the + cluster. + A release bundle content could be safely pulled only when its Conditions field + contains at least an Available entry set to "True" and Degraded to "False". + Entries must be unique, keyed on the name field. + releases must contain at least one entry and must not exceed 32 entries. + items: + properties: + conditions: + description: |- + conditions represent the observations of an internal release image current state. Valid types are: + Mounted, Installing, Available, Removing and Degraded. + + If Mounted is true, that means that a valid ISO has been discovered and mounted on one of the cluster nodes. + If Installing is true, that means that a new release bundle is currently being copied on one (or more) cluster nodes, and not yet completed. + If Available is true, it means that the release has been previously installed on all the cluster nodes, and it can be used. + If Removing is true, it means that a release deletion is in progress on one (or more) cluster nodes, and not yet completed. + If Degraded is true, that means something has gone wrong (possibly on one or more cluster nodes). + + In general, after installing a new release bundle, it is required to wait for the Conditions "Available" to become "True" (and all + the other conditions to be equal to "False") before being able to pull its content. + items: + description: Condition contains details for one aspect of + the current state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, + Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 5 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + image: + description: |- + image is an OCP release image referenced by digest. + The format of the image pull spec is: host[:port][/namespace]/name@sha256:, + where the digest must be 64 characters long, and consist only of lowercase hexadecimal characters, a-f and 0-9. + The length of the whole spec must be between 1 to 447 characters. + The field is optional, and it will be provided after a release will be successfully installed. + maxLength: 447 + minLength: 1 + type: string + x-kubernetes-validations: + - message: the OCI Image reference must end with a valid '@sha256:' + suffix, where '' is 64 characters long + rule: (self.split('@').size() == 2 && self.split('@')[1].matches('^sha256:[a-f0-9]{64}$')) + - message: the OCI Image name should follow the host[:port][/namespace]/name + format, resembling a valid URL without the scheme + rule: (self.split('@')[0].matches('^([a-zA-Z0-9-]+\\.)+[a-zA-Z0-9-]+(:[0-9]{2,5})?/([a-zA-Z0-9-_]{0,61}/)?[a-zA-Z0-9-_.]*?$')) + name: + description: |- + name indicates the desired release bundle identifier. This field is required and must be between 1 and 64 characters long. + The expected name format is ocp-release-bundle--. + maxLength: 64 + minLength: 1 + type: string + x-kubernetes-validations: + - message: must be ocp-release-bundle-- + and <= 64 chars + rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9_-]+$') + required: + - name + type: object + maxItems: 32 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + required: + - releases + type: object + required: + - metadata + - spec + type: object + x-kubernetes-validations: + - message: internalreleaseimage is a singleton, .metadata.name must be 'cluster' + rule: self.metadata.name == 'cluster' + served: true + storage: true + subresources: + status: {} diff --git a/payload-manifests/crds/0000_80_machine-config_01_internalreleaseimages-DevPreviewNoUpgrade.crd.yaml b/payload-manifests/crds/0000_80_machine-config_01_internalreleaseimages-DevPreviewNoUpgrade.crd.yaml new file mode 100644 index 00000000000..a94eddbf95b --- /dev/null +++ b/payload-manifests/crds/0000_80_machine-config_01_internalreleaseimages-DevPreviewNoUpgrade.crd.yaml @@ -0,0 +1,224 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + api-approved.openshift.io: https://github.com/openshift/api/pull/2510 + api.openshift.io/merged-by-featuregates: "true" + include.release.openshift.io/self-managed-high-availability: "true" + release.openshift.io/feature-set: DevPreviewNoUpgrade + labels: + openshift.io/operator-managed: "" + name: internalreleaseimages.machineconfiguration.openshift.io +spec: + group: machineconfiguration.openshift.io + names: + kind: InternalReleaseImage + listKind: InternalReleaseImageList + plural: internalreleaseimages + singular: internalreleaseimage + scope: Cluster + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: |- + InternalReleaseImage is used to keep track and manage a set + of release bundles (OCP and OLM operators images) that are stored + into the control planes nodes. + + 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. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: spec describes the configuration of this internal release + image. + properties: + releases: + description: |- + releases is a list of release bundle identifiers that the user wants to + add/remove to/from the control plane nodes. + Entries must be unique, keyed on the name field. + releases must contain at least one entry and must not exceed 16 entries. + items: + description: |- + InternalReleaseImageRef is used to provide a simple reference for a release + bundle. Currently it contains only the name field. + properties: + name: + description: |- + name indicates the desired release bundle identifier. This field is required and must be between 1 and 64 characters long. + The expected name format is ocp-release-bundle--. + maxLength: 64 + minLength: 1 + type: string + x-kubernetes-validations: + - message: must be ocp-release-bundle-- + and <= 64 chars + rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9_-]+$') + required: + - name + type: object + maxItems: 16 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + required: + - releases + type: object + status: + description: status describes the last observed state of this internal + release image. + properties: + releases: + description: |- + releases is a list of the release bundles currently owned and managed by the + cluster. + A release bundle content could be safely pulled only when its Conditions field + contains at least an Available entry set to "True" and Degraded to "False". + Entries must be unique, keyed on the name field. + releases must contain at least one entry and must not exceed 32 entries. + items: + properties: + conditions: + description: |- + conditions represent the observations of an internal release image current state. Valid types are: + Mounted, Installing, Available, Removing and Degraded. + + If Mounted is true, that means that a valid ISO has been discovered and mounted on one of the cluster nodes. + If Installing is true, that means that a new release bundle is currently being copied on one (or more) cluster nodes, and not yet completed. + If Available is true, it means that the release has been previously installed on all the cluster nodes, and it can be used. + If Removing is true, it means that a release deletion is in progress on one (or more) cluster nodes, and not yet completed. + If Degraded is true, that means something has gone wrong (possibly on one or more cluster nodes). + + In general, after installing a new release bundle, it is required to wait for the Conditions "Available" to become "True" (and all + the other conditions to be equal to "False") before being able to pull its content. + items: + description: Condition contains details for one aspect of + the current state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, + Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 5 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + image: + description: |- + image is an OCP release image referenced by digest. + The format of the image pull spec is: host[:port][/namespace]/name@sha256:, + where the digest must be 64 characters long, and consist only of lowercase hexadecimal characters, a-f and 0-9. + The length of the whole spec must be between 1 to 447 characters. + The field is optional, and it will be provided after a release will be successfully installed. + maxLength: 447 + minLength: 1 + type: string + x-kubernetes-validations: + - message: the OCI Image reference must end with a valid '@sha256:' + suffix, where '' is 64 characters long + rule: (self.split('@').size() == 2 && self.split('@')[1].matches('^sha256:[a-f0-9]{64}$')) + - message: the OCI Image name should follow the host[:port][/namespace]/name + format, resembling a valid URL without the scheme + rule: (self.split('@')[0].matches('^([a-zA-Z0-9-]+\\.)+[a-zA-Z0-9-]+(:[0-9]{2,5})?/([a-zA-Z0-9-_]{0,61}/)?[a-zA-Z0-9-_.]*?$')) + name: + description: |- + name indicates the desired release bundle identifier. This field is required and must be between 1 and 64 characters long. + The expected name format is ocp-release-bundle--. + maxLength: 64 + minLength: 1 + type: string + x-kubernetes-validations: + - message: must be ocp-release-bundle-- + and <= 64 chars + rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9_-]+$') + required: + - name + type: object + maxItems: 32 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + required: + - releases + type: object + required: + - metadata + - spec + type: object + x-kubernetes-validations: + - message: internalreleaseimage is a singleton, .metadata.name must be 'cluster' + rule: self.metadata.name == 'cluster' + served: true + storage: true + subresources: + status: {} diff --git a/payload-manifests/crds/0000_80_machine-config_01_internalreleaseimages-TechPreviewNoUpgrade.crd.yaml b/payload-manifests/crds/0000_80_machine-config_01_internalreleaseimages-TechPreviewNoUpgrade.crd.yaml new file mode 100644 index 00000000000..be6de10a68d --- /dev/null +++ b/payload-manifests/crds/0000_80_machine-config_01_internalreleaseimages-TechPreviewNoUpgrade.crd.yaml @@ -0,0 +1,224 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + api-approved.openshift.io: https://github.com/openshift/api/pull/2510 + api.openshift.io/merged-by-featuregates: "true" + include.release.openshift.io/self-managed-high-availability: "true" + release.openshift.io/feature-set: TechPreviewNoUpgrade + labels: + openshift.io/operator-managed: "" + name: internalreleaseimages.machineconfiguration.openshift.io +spec: + group: machineconfiguration.openshift.io + names: + kind: InternalReleaseImage + listKind: InternalReleaseImageList + plural: internalreleaseimages + singular: internalreleaseimage + scope: Cluster + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: |- + InternalReleaseImage is used to keep track and manage a set + of release bundles (OCP and OLM operators images) that are stored + into the control planes nodes. + + 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. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: spec describes the configuration of this internal release + image. + properties: + releases: + description: |- + releases is a list of release bundle identifiers that the user wants to + add/remove to/from the control plane nodes. + Entries must be unique, keyed on the name field. + releases must contain at least one entry and must not exceed 16 entries. + items: + description: |- + InternalReleaseImageRef is used to provide a simple reference for a release + bundle. Currently it contains only the name field. + properties: + name: + description: |- + name indicates the desired release bundle identifier. This field is required and must be between 1 and 64 characters long. + The expected name format is ocp-release-bundle--. + maxLength: 64 + minLength: 1 + type: string + x-kubernetes-validations: + - message: must be ocp-release-bundle-- + and <= 64 chars + rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9_-]+$') + required: + - name + type: object + maxItems: 16 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + required: + - releases + type: object + status: + description: status describes the last observed state of this internal + release image. + properties: + releases: + description: |- + releases is a list of the release bundles currently owned and managed by the + cluster. + A release bundle content could be safely pulled only when its Conditions field + contains at least an Available entry set to "True" and Degraded to "False". + Entries must be unique, keyed on the name field. + releases must contain at least one entry and must not exceed 32 entries. + items: + properties: + conditions: + description: |- + conditions represent the observations of an internal release image current state. Valid types are: + Mounted, Installing, Available, Removing and Degraded. + + If Mounted is true, that means that a valid ISO has been discovered and mounted on one of the cluster nodes. + If Installing is true, that means that a new release bundle is currently being copied on one (or more) cluster nodes, and not yet completed. + If Available is true, it means that the release has been previously installed on all the cluster nodes, and it can be used. + If Removing is true, it means that a release deletion is in progress on one (or more) cluster nodes, and not yet completed. + If Degraded is true, that means something has gone wrong (possibly on one or more cluster nodes). + + In general, after installing a new release bundle, it is required to wait for the Conditions "Available" to become "True" (and all + the other conditions to be equal to "False") before being able to pull its content. + items: + description: Condition contains details for one aspect of + the current state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, + Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 5 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + image: + description: |- + image is an OCP release image referenced by digest. + The format of the image pull spec is: host[:port][/namespace]/name@sha256:, + where the digest must be 64 characters long, and consist only of lowercase hexadecimal characters, a-f and 0-9. + The length of the whole spec must be between 1 to 447 characters. + The field is optional, and it will be provided after a release will be successfully installed. + maxLength: 447 + minLength: 1 + type: string + x-kubernetes-validations: + - message: the OCI Image reference must end with a valid '@sha256:' + suffix, where '' is 64 characters long + rule: (self.split('@').size() == 2 && self.split('@')[1].matches('^sha256:[a-f0-9]{64}$')) + - message: the OCI Image name should follow the host[:port][/namespace]/name + format, resembling a valid URL without the scheme + rule: (self.split('@')[0].matches('^([a-zA-Z0-9-]+\\.)+[a-zA-Z0-9-]+(:[0-9]{2,5})?/([a-zA-Z0-9-_]{0,61}/)?[a-zA-Z0-9-_.]*?$')) + name: + description: |- + name indicates the desired release bundle identifier. This field is required and must be between 1 and 64 characters long. + The expected name format is ocp-release-bundle--. + maxLength: 64 + minLength: 1 + type: string + x-kubernetes-validations: + - message: must be ocp-release-bundle-- + and <= 64 chars + rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9_-]+$') + required: + - name + type: object + maxItems: 32 + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + required: + - releases + type: object + required: + - metadata + - spec + type: object + x-kubernetes-validations: + - message: internalreleaseimage is a singleton, .metadata.name must be 'cluster' + rule: self.metadata.name == 'cluster' + served: true + storage: true + subresources: + status: {} diff --git a/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-Hypershift-CustomNoUpgrade.crd.yaml b/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-Hypershift-CustomNoUpgrade.crd.yaml index c1956dde36c..990142911cc 100644 --- a/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-Hypershift-CustomNoUpgrade.crd.yaml +++ b/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-Hypershift-CustomNoUpgrade.crd.yaml @@ -361,9 +361,11 @@ spec: releases: description: |- releases is a list of the release bundles currently owned and managed by the - cluster, indicating that their images can be safely pulled by any cluster entity - requiring them. - This field can contain between 1 and 5 entries. + cluster. + A release bundle content could be safely pulled only when its Conditions field + contains at least an Available entry set to "True" and Degraded to "False". + Entries must be unique, keyed on the name field. + releases must contain at least one entry and must not exceed 32 entries. items: description: |- MachineConfigNodeStatusInternalReleaseImageRef is used to provide a more detailed reference for @@ -371,8 +373,14 @@ spec: properties: conditions: description: |- - conditions represent the observations of an internal release image current state. See InternalReleaseImageConditionType for the possible - type values. + conditions represent the observations of an internal release image current state. Valid types are: + Mounted, Installing, Available, Removing and Degraded. + + If Mounted is true, that means that a valid ISO has been mounted on the current node. + If Installing is true, that means that a new release bundle is currently being copied on the current node, and not yet completed. + If Available is true, it means that the release has been previously installed on the current node, and it can be used. + If Removing is true, it means that a release deletion is in progress on the current node, and not yet completed. + If Degraded is true, that means something has gone wrong in the current node. items: description: Condition contains details for one aspect of the current state of this API Resource. @@ -441,6 +449,7 @@ spec: The format of the image pull spec is: host[:port][/namespace]/name@sha256:, where the digest must be 64 characters long, and consist only of lowercase hexadecimal characters, a-f and 0-9. The length of the whole spec must be between 1 to 447 characters. + The field is optional, and it will be provided after a release will be successfully installed. maxLength: 447 minLength: 1 type: string @@ -453,17 +462,20 @@ spec: format, resembling a valid URL without the scheme rule: (self.split('@')[0].matches('^([a-zA-Z0-9-]+\\.)+[a-zA-Z0-9-]+(:[0-9]{2,5})?/([a-zA-Z0-9-_]{0,61}/)?[a-zA-Z0-9-_.]*?$')) name: - description: name indicates the desired release bundle identifier. - This field is required and must be between 1 and 64 characters - long. + description: |- + name indicates the desired release bundle identifier. This field is required and must be between 1 and 64 characters long. + The expected name format is ocp-release-bundle--. maxLength: 64 minLength: 1 type: string + x-kubernetes-validations: + - message: must be ocp-release-bundle-- + and <= 64 chars + rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9_-]+$') required: - - image - name type: object - maxItems: 5 + maxItems: 32 minItems: 1 type: array x-kubernetes-list-map-keys: diff --git a/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-CustomNoUpgrade.crd.yaml b/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-CustomNoUpgrade.crd.yaml index 727733b84ea..cdb99247c8a 100644 --- a/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-CustomNoUpgrade.crd.yaml +++ b/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-CustomNoUpgrade.crd.yaml @@ -361,9 +361,11 @@ spec: releases: description: |- releases is a list of the release bundles currently owned and managed by the - cluster, indicating that their images can be safely pulled by any cluster entity - requiring them. - This field can contain between 1 and 5 entries. + cluster. + A release bundle content could be safely pulled only when its Conditions field + contains at least an Available entry set to "True" and Degraded to "False". + Entries must be unique, keyed on the name field. + releases must contain at least one entry and must not exceed 32 entries. items: description: |- MachineConfigNodeStatusInternalReleaseImageRef is used to provide a more detailed reference for @@ -371,8 +373,14 @@ spec: properties: conditions: description: |- - conditions represent the observations of an internal release image current state. See InternalReleaseImageConditionType for the possible - type values. + conditions represent the observations of an internal release image current state. Valid types are: + Mounted, Installing, Available, Removing and Degraded. + + If Mounted is true, that means that a valid ISO has been mounted on the current node. + If Installing is true, that means that a new release bundle is currently being copied on the current node, and not yet completed. + If Available is true, it means that the release has been previously installed on the current node, and it can be used. + If Removing is true, it means that a release deletion is in progress on the current node, and not yet completed. + If Degraded is true, that means something has gone wrong in the current node. items: description: Condition contains details for one aspect of the current state of this API Resource. @@ -441,6 +449,7 @@ spec: The format of the image pull spec is: host[:port][/namespace]/name@sha256:, where the digest must be 64 characters long, and consist only of lowercase hexadecimal characters, a-f and 0-9. The length of the whole spec must be between 1 to 447 characters. + The field is optional, and it will be provided after a release will be successfully installed. maxLength: 447 minLength: 1 type: string @@ -453,17 +462,20 @@ spec: format, resembling a valid URL without the scheme rule: (self.split('@')[0].matches('^([a-zA-Z0-9-]+\\.)+[a-zA-Z0-9-]+(:[0-9]{2,5})?/([a-zA-Z0-9-_]{0,61}/)?[a-zA-Z0-9-_.]*?$')) name: - description: name indicates the desired release bundle identifier. - This field is required and must be between 1 and 64 characters - long. + description: |- + name indicates the desired release bundle identifier. This field is required and must be between 1 and 64 characters long. + The expected name format is ocp-release-bundle--. maxLength: 64 minLength: 1 type: string + x-kubernetes-validations: + - message: must be ocp-release-bundle-- + and <= 64 chars + rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9_-]+$') required: - - image - name type: object - maxItems: 5 + maxItems: 32 minItems: 1 type: array x-kubernetes-list-map-keys: diff --git a/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-DevPreviewNoUpgrade.crd.yaml b/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-DevPreviewNoUpgrade.crd.yaml index 0b8e0d0ee4c..b4f6bd7d4c8 100644 --- a/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-DevPreviewNoUpgrade.crd.yaml +++ b/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-DevPreviewNoUpgrade.crd.yaml @@ -361,9 +361,11 @@ spec: releases: description: |- releases is a list of the release bundles currently owned and managed by the - cluster, indicating that their images can be safely pulled by any cluster entity - requiring them. - This field can contain between 1 and 5 entries. + cluster. + A release bundle content could be safely pulled only when its Conditions field + contains at least an Available entry set to "True" and Degraded to "False". + Entries must be unique, keyed on the name field. + releases must contain at least one entry and must not exceed 32 entries. items: description: |- MachineConfigNodeStatusInternalReleaseImageRef is used to provide a more detailed reference for @@ -371,8 +373,14 @@ spec: properties: conditions: description: |- - conditions represent the observations of an internal release image current state. See InternalReleaseImageConditionType for the possible - type values. + conditions represent the observations of an internal release image current state. Valid types are: + Mounted, Installing, Available, Removing and Degraded. + + If Mounted is true, that means that a valid ISO has been mounted on the current node. + If Installing is true, that means that a new release bundle is currently being copied on the current node, and not yet completed. + If Available is true, it means that the release has been previously installed on the current node, and it can be used. + If Removing is true, it means that a release deletion is in progress on the current node, and not yet completed. + If Degraded is true, that means something has gone wrong in the current node. items: description: Condition contains details for one aspect of the current state of this API Resource. @@ -441,6 +449,7 @@ spec: The format of the image pull spec is: host[:port][/namespace]/name@sha256:, where the digest must be 64 characters long, and consist only of lowercase hexadecimal characters, a-f and 0-9. The length of the whole spec must be between 1 to 447 characters. + The field is optional, and it will be provided after a release will be successfully installed. maxLength: 447 minLength: 1 type: string @@ -453,17 +462,20 @@ spec: format, resembling a valid URL without the scheme rule: (self.split('@')[0].matches('^([a-zA-Z0-9-]+\\.)+[a-zA-Z0-9-]+(:[0-9]{2,5})?/([a-zA-Z0-9-_]{0,61}/)?[a-zA-Z0-9-_.]*?$')) name: - description: name indicates the desired release bundle identifier. - This field is required and must be between 1 and 64 characters - long. + description: |- + name indicates the desired release bundle identifier. This field is required and must be between 1 and 64 characters long. + The expected name format is ocp-release-bundle--. maxLength: 64 minLength: 1 type: string + x-kubernetes-validations: + - message: must be ocp-release-bundle-- + and <= 64 chars + rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9_-]+$') required: - - image - name type: object - maxItems: 5 + maxItems: 32 minItems: 1 type: array x-kubernetes-list-map-keys: diff --git a/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-TechPreviewNoUpgrade.crd.yaml b/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-TechPreviewNoUpgrade.crd.yaml index 34b48f9006e..8c3db81dd3b 100644 --- a/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-TechPreviewNoUpgrade.crd.yaml +++ b/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-TechPreviewNoUpgrade.crd.yaml @@ -361,9 +361,11 @@ spec: releases: description: |- releases is a list of the release bundles currently owned and managed by the - cluster, indicating that their images can be safely pulled by any cluster entity - requiring them. - This field can contain between 1 and 5 entries. + cluster. + A release bundle content could be safely pulled only when its Conditions field + contains at least an Available entry set to "True" and Degraded to "False". + Entries must be unique, keyed on the name field. + releases must contain at least one entry and must not exceed 32 entries. items: description: |- MachineConfigNodeStatusInternalReleaseImageRef is used to provide a more detailed reference for @@ -371,8 +373,14 @@ spec: properties: conditions: description: |- - conditions represent the observations of an internal release image current state. See InternalReleaseImageConditionType for the possible - type values. + conditions represent the observations of an internal release image current state. Valid types are: + Mounted, Installing, Available, Removing and Degraded. + + If Mounted is true, that means that a valid ISO has been mounted on the current node. + If Installing is true, that means that a new release bundle is currently being copied on the current node, and not yet completed. + If Available is true, it means that the release has been previously installed on the current node, and it can be used. + If Removing is true, it means that a release deletion is in progress on the current node, and not yet completed. + If Degraded is true, that means something has gone wrong in the current node. items: description: Condition contains details for one aspect of the current state of this API Resource. @@ -441,6 +449,7 @@ spec: The format of the image pull spec is: host[:port][/namespace]/name@sha256:, where the digest must be 64 characters long, and consist only of lowercase hexadecimal characters, a-f and 0-9. The length of the whole spec must be between 1 to 447 characters. + The field is optional, and it will be provided after a release will be successfully installed. maxLength: 447 minLength: 1 type: string @@ -453,17 +462,20 @@ spec: format, resembling a valid URL without the scheme rule: (self.split('@')[0].matches('^([a-zA-Z0-9-]+\\.)+[a-zA-Z0-9-]+(:[0-9]{2,5})?/([a-zA-Z0-9-_]{0,61}/)?[a-zA-Z0-9-_.]*?$')) name: - description: name indicates the desired release bundle identifier. - This field is required and must be between 1 and 64 characters - long. + description: |- + name indicates the desired release bundle identifier. This field is required and must be between 1 and 64 characters long. + The expected name format is ocp-release-bundle--. maxLength: 64 minLength: 1 type: string + x-kubernetes-validations: + - message: must be ocp-release-bundle-- + and <= 64 chars + rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9_-]+$') required: - - image - name type: object - maxItems: 5 + maxItems: 32 minItems: 1 type: array x-kubernetes-list-map-keys: From 7a0d94640235c62d379cc1f5f3201bc82d643c40 Mon Sep 17 00:00:00 2001 From: Andrea Fasano Date: Mon, 24 Nov 2025 04:14:22 -0500 Subject: [PATCH 3/3] fix --- .../v1/types_machineconfignode.go | 2 +- ...gnodes-Hypershift-CustomNoUpgrade.crd.yaml | 2 +- ...des-SelfManagedHA-CustomNoUpgrade.crd.yaml | 2 +- ...SelfManagedHA-DevPreviewNoUpgrade.crd.yaml | 2 +- ...elfManagedHA-TechPreviewNoUpgrade.crd.yaml | 2 +- .../NoRegistryClusterInstall.yaml | 2 +- .../NoRegistryClusterInstall.yaml | 25 +++++++++ .../v1alpha1/types_internalreleaseimage.go | 4 +- ...rnalreleaseimages-CustomNoUpgrade.crd.yaml | 4 +- ...releaseimages-DevPreviewNoUpgrade.crd.yaml | 4 +- ...eleaseimages-TechPreviewNoUpgrade.crd.yaml | 4 +- .../NoRegistryClusterInstall.yaml | 4 +- openapi/openapi.json | 54 +++++++++++-------- ...rnalreleaseimages-CustomNoUpgrade.crd.yaml | 4 +- ...releaseimages-DevPreviewNoUpgrade.crd.yaml | 4 +- ...eleaseimages-TechPreviewNoUpgrade.crd.yaml | 4 +- ...gnodes-Hypershift-CustomNoUpgrade.crd.yaml | 2 +- ...des-SelfManagedHA-CustomNoUpgrade.crd.yaml | 2 +- ...SelfManagedHA-DevPreviewNoUpgrade.crd.yaml | 2 +- ...elfManagedHA-TechPreviewNoUpgrade.crd.yaml | 2 +- 20 files changed, 82 insertions(+), 49 deletions(-) diff --git a/machineconfiguration/v1/types_machineconfignode.go b/machineconfiguration/v1/types_machineconfignode.go index 549e174eabb..a51620fc5a5 100644 --- a/machineconfiguration/v1/types_machineconfignode.go +++ b/machineconfiguration/v1/types_machineconfignode.go @@ -205,7 +205,7 @@ type MachineConfigNodeStatusInternalReleaseImageRef struct { // The expected name format is ocp-release-bundle--. // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=64 - // +kubebuilder:validation:XValidation:rule=`self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9_-]+$')`,message="must be ocp-release-bundle-- and <= 64 chars" + // +kubebuilder:validation:XValidation:rule=`self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9._-]+$')`,message="must be ocp-release-bundle-- and <= 64 chars" // +required Name string `json:"name,omitempty"` // image is an OCP release image referenced by digest. diff --git a/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-Hypershift-CustomNoUpgrade.crd.yaml b/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-Hypershift-CustomNoUpgrade.crd.yaml index 990142911cc..9f06d0d9c20 100644 --- a/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-Hypershift-CustomNoUpgrade.crd.yaml +++ b/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-Hypershift-CustomNoUpgrade.crd.yaml @@ -471,7 +471,7 @@ spec: x-kubernetes-validations: - message: must be ocp-release-bundle-- and <= 64 chars - rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9_-]+$') + rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9._-]+$') required: - name type: object diff --git a/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-CustomNoUpgrade.crd.yaml b/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-CustomNoUpgrade.crd.yaml index cdb99247c8a..4d92526eb24 100644 --- a/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-CustomNoUpgrade.crd.yaml +++ b/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-CustomNoUpgrade.crd.yaml @@ -471,7 +471,7 @@ spec: x-kubernetes-validations: - message: must be ocp-release-bundle-- and <= 64 chars - rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9_-]+$') + rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9._-]+$') required: - name type: object diff --git a/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-DevPreviewNoUpgrade.crd.yaml b/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-DevPreviewNoUpgrade.crd.yaml index b4f6bd7d4c8..1d9dd0d9948 100644 --- a/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-DevPreviewNoUpgrade.crd.yaml +++ b/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-DevPreviewNoUpgrade.crd.yaml @@ -471,7 +471,7 @@ spec: x-kubernetes-validations: - message: must be ocp-release-bundle-- and <= 64 chars - rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9_-]+$') + rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9._-]+$') required: - name type: object diff --git a/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-TechPreviewNoUpgrade.crd.yaml b/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-TechPreviewNoUpgrade.crd.yaml index 8c3db81dd3b..620b175078f 100644 --- a/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-TechPreviewNoUpgrade.crd.yaml +++ b/machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-TechPreviewNoUpgrade.crd.yaml @@ -471,7 +471,7 @@ spec: x-kubernetes-validations: - message: must be ocp-release-bundle-- and <= 64 chars - rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9_-]+$') + rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9._-]+$') required: - name type: object diff --git a/machineconfiguration/v1/zz_generated.featuregated-crd-manifests/machineconfignodes.machineconfiguration.openshift.io/NoRegistryClusterInstall.yaml b/machineconfiguration/v1/zz_generated.featuregated-crd-manifests/machineconfignodes.machineconfiguration.openshift.io/NoRegistryClusterInstall.yaml index 4775b5a9412..f647f34c232 100644 --- a/machineconfiguration/v1/zz_generated.featuregated-crd-manifests/machineconfignodes.machineconfiguration.openshift.io/NoRegistryClusterInstall.yaml +++ b/machineconfiguration/v1/zz_generated.featuregated-crd-manifests/machineconfignodes.machineconfiguration.openshift.io/NoRegistryClusterInstall.yaml @@ -402,7 +402,7 @@ spec: x-kubernetes-validations: - message: must be ocp-release-bundle-- and <= 64 chars - rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9_-]+$') + rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9._-]+$') required: - name type: object diff --git a/machineconfiguration/v1alpha1/tests/internalreleaseimages.machineconfiguration.openshift.io/NoRegistryClusterInstall.yaml b/machineconfiguration/v1alpha1/tests/internalreleaseimages.machineconfiguration.openshift.io/NoRegistryClusterInstall.yaml index 43ff9be2552..e96ddb644b5 100644 --- a/machineconfiguration/v1alpha1/tests/internalreleaseimages.machineconfiguration.openshift.io/NoRegistryClusterInstall.yaml +++ b/machineconfiguration/v1alpha1/tests/internalreleaseimages.machineconfiguration.openshift.io/NoRegistryClusterInstall.yaml @@ -21,6 +21,31 @@ tests: spec: releases: - name: ocp-release-bundle-4.18.0-x86_64 + - name: Valid release names + initial: | + apiVersion: machineconfiguration.openshift.io/v1alpha1 + kind: InternalReleaseImage + metadata: + name: cluster + spec: + releases: + - name: ocp-release-bundle-4.21.0-ec.3-x86_64 + - name: ocp-release-bundle-4.20.5-x86_64 + - name: ocp-release-bundle-4.14.0-0.nightly-2025-11-23-025204 + - name: ocp-release-bundle-4.21.0-ec.2-s390x + - name: ocp-release-bundle-4.15.0-0.ci-2025-11-22-162639 + expected: | + apiVersion: machineconfiguration.openshift.io/v1alpha1 + kind: InternalReleaseImage + metadata: + name: cluster + spec: + releases: + - name: ocp-release-bundle-4.21.0-ec.3-x86_64 + - name: ocp-release-bundle-4.20.5-x86_64 + - name: ocp-release-bundle-4.14.0-0.nightly-2025-11-23-025204 + - name: ocp-release-bundle-4.21.0-ec.2-s390x + - name: ocp-release-bundle-4.15.0-0.ci-2025-11-22-162639 - name: Invalid undefined releases initial: | apiVersion: machineconfiguration.openshift.io/v1alpha1 diff --git a/machineconfiguration/v1alpha1/types_internalreleaseimage.go b/machineconfiguration/v1alpha1/types_internalreleaseimage.go index e0994b14961..cf7641e9a93 100644 --- a/machineconfiguration/v1alpha1/types_internalreleaseimage.go +++ b/machineconfiguration/v1alpha1/types_internalreleaseimage.go @@ -61,7 +61,7 @@ type InternalReleaseImageRef struct { // +required // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=64 - // +kubebuilder:validation:XValidation:rule=`self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9_-]+$')`,message="must be ocp-release-bundle-- and <= 64 chars" + // +kubebuilder:validation:XValidation:rule=`self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9._-]+$')`,message="must be ocp-release-bundle-- and <= 64 chars" Name string `json:"name,omitempty"` } @@ -104,7 +104,7 @@ type InternalReleaseImageBundleStatus struct { // The expected name format is ocp-release-bundle--. // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=64 - // +kubebuilder:validation:XValidation:rule=`self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9_-]+$')`,message="must be ocp-release-bundle-- and <= 64 chars" + // +kubebuilder:validation:XValidation:rule=`self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9._-]+$')`,message="must be ocp-release-bundle-- and <= 64 chars" // +required Name string `json:"name,omitempty"` // image is an OCP release image referenced by digest. diff --git a/machineconfiguration/v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_internalreleaseimages-CustomNoUpgrade.crd.yaml b/machineconfiguration/v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_internalreleaseimages-CustomNoUpgrade.crd.yaml index ee921d43058..64a10953ac0 100644 --- a/machineconfiguration/v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_internalreleaseimages-CustomNoUpgrade.crd.yaml +++ b/machineconfiguration/v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_internalreleaseimages-CustomNoUpgrade.crd.yaml @@ -71,7 +71,7 @@ spec: x-kubernetes-validations: - message: must be ocp-release-bundle-- and <= 64 chars - rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9_-]+$') + rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9._-]+$') required: - name type: object @@ -199,7 +199,7 @@ spec: x-kubernetes-validations: - message: must be ocp-release-bundle-- and <= 64 chars - rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9_-]+$') + rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9._-]+$') required: - name type: object diff --git a/machineconfiguration/v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_internalreleaseimages-DevPreviewNoUpgrade.crd.yaml b/machineconfiguration/v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_internalreleaseimages-DevPreviewNoUpgrade.crd.yaml index a94eddbf95b..769aeec8813 100644 --- a/machineconfiguration/v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_internalreleaseimages-DevPreviewNoUpgrade.crd.yaml +++ b/machineconfiguration/v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_internalreleaseimages-DevPreviewNoUpgrade.crd.yaml @@ -70,7 +70,7 @@ spec: x-kubernetes-validations: - message: must be ocp-release-bundle-- and <= 64 chars - rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9_-]+$') + rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9._-]+$') required: - name type: object @@ -198,7 +198,7 @@ spec: x-kubernetes-validations: - message: must be ocp-release-bundle-- and <= 64 chars - rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9_-]+$') + rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9._-]+$') required: - name type: object diff --git a/machineconfiguration/v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_internalreleaseimages-TechPreviewNoUpgrade.crd.yaml b/machineconfiguration/v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_internalreleaseimages-TechPreviewNoUpgrade.crd.yaml index be6de10a68d..4c5be150ac6 100644 --- a/machineconfiguration/v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_internalreleaseimages-TechPreviewNoUpgrade.crd.yaml +++ b/machineconfiguration/v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_internalreleaseimages-TechPreviewNoUpgrade.crd.yaml @@ -70,7 +70,7 @@ spec: x-kubernetes-validations: - message: must be ocp-release-bundle-- and <= 64 chars - rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9_-]+$') + rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9._-]+$') required: - name type: object @@ -198,7 +198,7 @@ spec: x-kubernetes-validations: - message: must be ocp-release-bundle-- and <= 64 chars - rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9_-]+$') + rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9._-]+$') required: - name type: object diff --git a/machineconfiguration/v1alpha1/zz_generated.featuregated-crd-manifests/internalreleaseimages.machineconfiguration.openshift.io/NoRegistryClusterInstall.yaml b/machineconfiguration/v1alpha1/zz_generated.featuregated-crd-manifests/internalreleaseimages.machineconfiguration.openshift.io/NoRegistryClusterInstall.yaml index 5d7b36db910..f0d23b9af98 100644 --- a/machineconfiguration/v1alpha1/zz_generated.featuregated-crd-manifests/internalreleaseimages.machineconfiguration.openshift.io/NoRegistryClusterInstall.yaml +++ b/machineconfiguration/v1alpha1/zz_generated.featuregated-crd-manifests/internalreleaseimages.machineconfiguration.openshift.io/NoRegistryClusterInstall.yaml @@ -71,7 +71,7 @@ spec: x-kubernetes-validations: - message: must be ocp-release-bundle-- and <= 64 chars - rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9_-]+$') + rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9._-]+$') required: - name type: object @@ -199,7 +199,7 @@ spec: x-kubernetes-validations: - message: must be ocp-release-bundle-- and <= 64 chars - rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9_-]+$') + rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9._-]+$') required: - name type: object diff --git a/openapi/openapi.json b/openapi/openapi.json index 7f0b769e679..33f6400c003 100644 --- a/openapi/openapi.json +++ b/openapi/openapi.json @@ -25042,6 +25042,7 @@ "description": "InternalReleaseImage is used to keep track and manage a set of release bundles (OCP and OLM operators images) that are stored into the control planes nodes.\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", "spec" ], "properties": { @@ -25065,24 +25066,35 @@ }, "status": { "description": "status describes the last observed state of this internal release image.", + "default": {}, "$ref": "#/definitions/com.github.openshift.api.machineconfiguration.v1alpha1.InternalReleaseImageStatus" } } }, - "com.github.openshift.api.machineconfiguration.v1alpha1.InternalReleaseImageDetailedRef": { - "description": "InternalReleaseImageDetailedRef is used to provide a more detailed reference for a release bundle.", + "com.github.openshift.api.machineconfiguration.v1alpha1.InternalReleaseImageBundleStatus": { "type": "object", "required": [ - "name", - "image" + "name" ], "properties": { + "conditions": { + "description": "conditions represent the observations of an internal release image current state. Valid types are: Mounted, Installing, Available, Removing and Degraded.\n\nIf Mounted is true, that means that a valid ISO has been discovered and mounted on one of the cluster nodes. If Installing is true, that means that a new release bundle is currently being copied on one (or more) cluster nodes, and not yet completed. If Available is true, it means that the release has been previously installed on all the cluster nodes, and it can be used. If Removing is true, it means that a release deletion is in progress on one (or more) cluster nodes, and not yet completed. If Degraded is true, that means something has gone wrong (possibly on one or more cluster nodes).\n\nIn general, after installing a new release bundle, it is required to wait for the Conditions \"Available\" to become \"True\" (and all the other conditions to be equal to \"False\") before being able to pull its content.", + "type": "array", + "items": { + "default": {}, + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Condition" + }, + "x-kubernetes-list-map-keys": [ + "type" + ], + "x-kubernetes-list-type": "map" + }, "image": { - "description": "image is an OCP release image referenced by digest. The format of the image pull spec is: host[:port][/namespace]/name@sha256:, where the digest must be 64 characters long, and consist only of lowercase hexadecimal characters, a-f and 0-9. The length of the whole spec must be between 1 to 447 characters.", + "description": "image is an OCP release image referenced by digest. The format of the image pull spec is: host[:port][/namespace]/name@sha256:, where the digest must be 64 characters long, and consist only of lowercase hexadecimal characters, a-f and 0-9. The length of the whole spec must be between 1 to 447 characters. The field is optional, and it will be provided after a release will be successfully installed.", "type": "string" }, "name": { - "description": "name indicates the desired release bundle identifier. This field is required and must be between 1 and 64 characters long.", + "description": "name indicates the desired release bundle identifier. This field is required and must be between 1 and 64 characters long. The expected name format is ocp-release-bundle--.", "type": "string" } } @@ -25125,7 +25137,7 @@ ], "properties": { "name": { - "description": "name indicates the desired release bundle identifier. This field is required and must be between 1 and 64 characters long.", + "description": "name indicates the desired release bundle identifier. This field is required and must be between 1 and 64 characters long. The expected name format is ocp-release-bundle--.", "type": "string" } } @@ -25138,7 +25150,7 @@ ], "properties": { "releases": { - "description": "releases is a list of release bundle identifiers that the user wants to add/remove to/from the control plane nodes. This field can contain between 1 and 5 entries.", + "description": "releases is a list of release bundle identifiers that the user wants to add/remove to/from the control plane nodes. Entries must be unique, keyed on the name field. releases must contain at least one entry and must not exceed 16 entries.", "type": "array", "items": { "default": {}, @@ -25154,25 +25166,16 @@ "com.github.openshift.api.machineconfiguration.v1alpha1.InternalReleaseImageStatus": { "description": "InternalReleaseImageStatus describes the current state of a InternalReleaseImage.", "type": "object", + "required": [ + "releases" + ], "properties": { - "availableReleases": { - "description": "availableReleases is a list of the release bundles currently owned and managed by the cluster, indicating that their images can be safely pulled by any cluster entity requiring them. This field can contain between 1 and 5 entries.", - "type": "array", - "items": { - "default": {}, - "$ref": "#/definitions/com.github.openshift.api.machineconfiguration.v1alpha1.InternalReleaseImageDetailedRef" - }, - "x-kubernetes-list-map-keys": [ - "name" - ], - "x-kubernetes-list-type": "map" - }, - "mountedReleases": { - "description": "mountedReleases is a list of release bundle identifiers currently detected from the ISO attached to one of the control plane nodes. Any reported identifier can be used to amend the `spec.Releases` field to add a new release bundle to the cluster. An empty value indicates that no ISOs are currently being detected on any control plane node. Must not exceed 5 entries.", + "releases": { + "description": "releases is a list of the release bundles currently owned and managed by the cluster. A release bundle content could be safely pulled only when its Conditions field contains at least an Available entry set to \"True\" and Degraded to \"False\". Entries must be unique, keyed on the name field. releases must contain at least one entry and must not exceed 32 entries.", "type": "array", "items": { "default": {}, - "$ref": "#/definitions/com.github.openshift.api.machineconfiguration.v1alpha1.InternalReleaseImageRef" + "$ref": "#/definitions/com.github.openshift.api.machineconfiguration.v1alpha1.InternalReleaseImageBundleStatus" }, "x-kubernetes-list-map-keys": [ "name" @@ -30885,6 +30888,11 @@ "default": {}, "$ref": "#/definitions/com.github.openshift.api.operator.v1.ClientTLS" }, + "closedClientConnectionPolicy": { + "description": "closedClientConnectionPolicy controls how the IngressController behaves when the client closes the TCP connection while the TLS handshake or HTTP request is in progress. This option maps directly to HAProxy’s \"abortonclose\" option.\n\nValid values are: \"Abort\" and \"Continue\". The default value is \"Continue\".\n\nWhen set to \"Abort\", the router will stop processing the TLS handshake if it is in progress, and it will not send an HTTP request to the backend server if the request has not yet been sent when the client closes the connection.\n\nWhen set to \"Continue\", the router will complete the TLS handshake if it is in progress, or send an HTTP request to the backend server and wait for the backend server's response, regardless of whether the client has closed the connection.\n\nSetting \"Abort\" can help free CPU resources otherwise spent on TLS computation for connections the client has already closed, and can reduce request queue size, thereby reducing the load on saturated backend servers.\n\nImportant Considerations:\n\n - The default policy (\"Continue\") is HTTP-compliant, and requests\n for aborted client connections will still be served.\n Use the \"Continue\" policy to allow a client to send a request\n and then immediately close its side of the connection while\n still receiving a response on the half-closed connection.\n\n - When clients use keep-alive connections, the most common case for premature\n closure is when the user wants to cancel the transfer or when a timeout\n occurs. In that case, the \"Abort\" policy may be used to reduce resource consumption.\n\n - Using RSA keys larger than 2048 bits can significantly slow down\n TLS computations. Consider using the \"Abort\" policy to reduce CPU usage.", + "type": "string", + "default": "Continue" + }, "defaultCertificate": { "description": "defaultCertificate is a reference to a secret containing the default certificate served by the ingress controller. When Routes don't specify their own certificate, defaultCertificate is used.\n\nThe secret must contain the following keys and data:\n\n tls.crt: certificate file contents\n tls.key: key file contents\n\nIf unset, a wildcard certificate is automatically generated and used. The certificate is valid for the ingress controller domain (and subdomains) and the generated certificate's CA will be automatically integrated with the cluster's trust store.\n\nIf a wildcard certificate is used and shared by multiple HTTP/2 enabled routes (which implies ALPN) then clients (i.e., notably browsers) are at liberty to reuse open connections. This means a client can reuse a connection to another route and that is likely to fail. This behaviour is generally known as connection coalescing.\n\nThe in-use certificate (whether generated or user-specified) will be automatically integrated with OpenShift's built-in OAuth server.", "$ref": "#/definitions/io.k8s.api.core.v1.LocalObjectReference" diff --git a/payload-manifests/crds/0000_80_machine-config_01_internalreleaseimages-CustomNoUpgrade.crd.yaml b/payload-manifests/crds/0000_80_machine-config_01_internalreleaseimages-CustomNoUpgrade.crd.yaml index ee921d43058..64a10953ac0 100644 --- a/payload-manifests/crds/0000_80_machine-config_01_internalreleaseimages-CustomNoUpgrade.crd.yaml +++ b/payload-manifests/crds/0000_80_machine-config_01_internalreleaseimages-CustomNoUpgrade.crd.yaml @@ -71,7 +71,7 @@ spec: x-kubernetes-validations: - message: must be ocp-release-bundle-- and <= 64 chars - rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9_-]+$') + rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9._-]+$') required: - name type: object @@ -199,7 +199,7 @@ spec: x-kubernetes-validations: - message: must be ocp-release-bundle-- and <= 64 chars - rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9_-]+$') + rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9._-]+$') required: - name type: object diff --git a/payload-manifests/crds/0000_80_machine-config_01_internalreleaseimages-DevPreviewNoUpgrade.crd.yaml b/payload-manifests/crds/0000_80_machine-config_01_internalreleaseimages-DevPreviewNoUpgrade.crd.yaml index a94eddbf95b..769aeec8813 100644 --- a/payload-manifests/crds/0000_80_machine-config_01_internalreleaseimages-DevPreviewNoUpgrade.crd.yaml +++ b/payload-manifests/crds/0000_80_machine-config_01_internalreleaseimages-DevPreviewNoUpgrade.crd.yaml @@ -70,7 +70,7 @@ spec: x-kubernetes-validations: - message: must be ocp-release-bundle-- and <= 64 chars - rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9_-]+$') + rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9._-]+$') required: - name type: object @@ -198,7 +198,7 @@ spec: x-kubernetes-validations: - message: must be ocp-release-bundle-- and <= 64 chars - rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9_-]+$') + rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9._-]+$') required: - name type: object diff --git a/payload-manifests/crds/0000_80_machine-config_01_internalreleaseimages-TechPreviewNoUpgrade.crd.yaml b/payload-manifests/crds/0000_80_machine-config_01_internalreleaseimages-TechPreviewNoUpgrade.crd.yaml index be6de10a68d..4c5be150ac6 100644 --- a/payload-manifests/crds/0000_80_machine-config_01_internalreleaseimages-TechPreviewNoUpgrade.crd.yaml +++ b/payload-manifests/crds/0000_80_machine-config_01_internalreleaseimages-TechPreviewNoUpgrade.crd.yaml @@ -70,7 +70,7 @@ spec: x-kubernetes-validations: - message: must be ocp-release-bundle-- and <= 64 chars - rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9_-]+$') + rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9._-]+$') required: - name type: object @@ -198,7 +198,7 @@ spec: x-kubernetes-validations: - message: must be ocp-release-bundle-- and <= 64 chars - rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9_-]+$') + rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9._-]+$') required: - name type: object diff --git a/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-Hypershift-CustomNoUpgrade.crd.yaml b/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-Hypershift-CustomNoUpgrade.crd.yaml index 990142911cc..9f06d0d9c20 100644 --- a/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-Hypershift-CustomNoUpgrade.crd.yaml +++ b/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-Hypershift-CustomNoUpgrade.crd.yaml @@ -471,7 +471,7 @@ spec: x-kubernetes-validations: - message: must be ocp-release-bundle-- and <= 64 chars - rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9_-]+$') + rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9._-]+$') required: - name type: object diff --git a/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-CustomNoUpgrade.crd.yaml b/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-CustomNoUpgrade.crd.yaml index cdb99247c8a..4d92526eb24 100644 --- a/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-CustomNoUpgrade.crd.yaml +++ b/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-CustomNoUpgrade.crd.yaml @@ -471,7 +471,7 @@ spec: x-kubernetes-validations: - message: must be ocp-release-bundle-- and <= 64 chars - rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9_-]+$') + rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9._-]+$') required: - name type: object diff --git a/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-DevPreviewNoUpgrade.crd.yaml b/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-DevPreviewNoUpgrade.crd.yaml index b4f6bd7d4c8..1d9dd0d9948 100644 --- a/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-DevPreviewNoUpgrade.crd.yaml +++ b/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-DevPreviewNoUpgrade.crd.yaml @@ -471,7 +471,7 @@ spec: x-kubernetes-validations: - message: must be ocp-release-bundle-- and <= 64 chars - rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9_-]+$') + rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9._-]+$') required: - name type: object diff --git a/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-TechPreviewNoUpgrade.crd.yaml b/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-TechPreviewNoUpgrade.crd.yaml index 8c3db81dd3b..620b175078f 100644 --- a/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-TechPreviewNoUpgrade.crd.yaml +++ b/payload-manifests/crds/0000_80_machine-config_01_machineconfignodes-SelfManagedHA-TechPreviewNoUpgrade.crd.yaml @@ -471,7 +471,7 @@ spec: x-kubernetes-validations: - message: must be ocp-release-bundle-- and <= 64 chars - rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9_-]+$') + rule: self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9._-]+$') required: - name type: object