From 9e0a9459c92fc3b0dfec76b39fa989785872c9a2 Mon Sep 17 00:00:00 2001 From: RishabhSaini Date: Tue, 1 Apr 2025 10:24:19 -0400 Subject: [PATCH] Generate v1 crds for PIS --- hack/update-payload-crds.sh | 9 +- ...1_pinnedimagesets-CustomNoUpgrade.crd.yaml | 88 +++---------------- ...nnedimagesets-DevPreviewNoUpgrade.crd.yaml | 88 +++---------------- ...nedimagesets-TechPreviewNoUpgrade.crd.yaml | 88 +++---------------- 4 files changed, 34 insertions(+), 239 deletions(-) diff --git a/hack/update-payload-crds.sh b/hack/update-payload-crds.sh index 168c0fec547..0f9d8496d26 100755 --- a/hack/update-payload-crds.sh +++ b/hack/update-payload-crds.sh @@ -22,15 +22,8 @@ crd_globs="\ operator/v1/zz_generated.crd-manifests/0000_25_kube-controller-manager_01_kubecontrollermanagers*.crd.yaml 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/0000_80_machine-config_01_containerruntimeconfigs*.crd.yaml - machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_controllerconfigs*.crd.yaml - machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_kubeletconfigs*.crd.yaml - machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfigpools*.crd.yaml - machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfigs*.crd.yaml - machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineosbuilds*.crd.yaml - machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineosconfigs*.crd.yaml + machineconfiguration/v1/zz_generated.crd-manifests/*.crd.yaml machineconfiguration/v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfignodes*.crd.yaml - machineconfiguration/v1alpha1/zz_generated.crd-manifests/0000_80_machine-config_01_pinnedimagesets*.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_clusterimagepolicies*.crd.yaml config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_imagepolicies*.crd.yaml diff --git a/payload-manifests/crds/0000_80_machine-config_01_pinnedimagesets-CustomNoUpgrade.crd.yaml b/payload-manifests/crds/0000_80_machine-config_01_pinnedimagesets-CustomNoUpgrade.crd.yaml index 1d18ba185f0..5aebd9b228d 100644 --- a/payload-manifests/crds/0000_80_machine-config_01_pinnedimagesets-CustomNoUpgrade.crd.yaml +++ b/payload-manifests/crds/0000_80_machine-config_01_pinnedimagesets-CustomNoUpgrade.crd.yaml @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - api-approved.openshift.io: https://github.com/openshift/api/pull/1713 + api-approved.openshift.io: https://github.com/openshift/api/pull/2198 api.openshift.io/merged-by-featuregates: "true" include.release.openshift.io/ibm-cloud-managed: "true" include.release.openshift.io/self-managed-high-availability: "true" @@ -19,14 +19,14 @@ spec: singular: pinnedimageset scope: Cluster versions: - - name: v1alpha1 + - name: v1 schema: openAPIV3Schema: description: |- PinnedImageSet describes a set of images that should be pinned by CRI-O and pulled to the nodes which are members of the declared MachineConfigPools. - 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. + Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). properties: apiVersion: description: |- @@ -62,25 +62,27 @@ spec: ... ] - These image references should all be by digest, tags aren't allowed. + Image references must be by digest. + A maximum of 500 images may be specified. items: + description: PinnedImageRef represents a reference to an OCI image properties: name: description: |- name is an OCI Image referenced by digest. - - The format of the image ref is: - host[:port][/namespace]/name@sha256: + 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}$') + 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-_.]*?$') + 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: - name type: object @@ -93,76 +95,8 @@ spec: required: - pinnedImages type: object - status: - description: status describes the last observed state of this pinned image - set. - properties: - conditions: - description: conditions represent the observations of a pinned image - set's current state. - 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 - type: array - x-kubernetes-list-map-keys: - - type - x-kubernetes-list-type: map - type: object required: - spec type: object served: true storage: true - subresources: - status: {} diff --git a/payload-manifests/crds/0000_80_machine-config_01_pinnedimagesets-DevPreviewNoUpgrade.crd.yaml b/payload-manifests/crds/0000_80_machine-config_01_pinnedimagesets-DevPreviewNoUpgrade.crd.yaml index 2beccbb27fe..18775703be5 100644 --- a/payload-manifests/crds/0000_80_machine-config_01_pinnedimagesets-DevPreviewNoUpgrade.crd.yaml +++ b/payload-manifests/crds/0000_80_machine-config_01_pinnedimagesets-DevPreviewNoUpgrade.crd.yaml @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - api-approved.openshift.io: https://github.com/openshift/api/pull/1713 + api-approved.openshift.io: https://github.com/openshift/api/pull/2198 api.openshift.io/merged-by-featuregates: "true" include.release.openshift.io/ibm-cloud-managed: "true" include.release.openshift.io/self-managed-high-availability: "true" @@ -19,14 +19,14 @@ spec: singular: pinnedimageset scope: Cluster versions: - - name: v1alpha1 + - name: v1 schema: openAPIV3Schema: description: |- PinnedImageSet describes a set of images that should be pinned by CRI-O and pulled to the nodes which are members of the declared MachineConfigPools. - 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. + Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). properties: apiVersion: description: |- @@ -62,25 +62,27 @@ spec: ... ] - These image references should all be by digest, tags aren't allowed. + Image references must be by digest. + A maximum of 500 images may be specified. items: + description: PinnedImageRef represents a reference to an OCI image properties: name: description: |- name is an OCI Image referenced by digest. - - The format of the image ref is: - host[:port][/namespace]/name@sha256: + 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}$') + 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-_.]*?$') + 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: - name type: object @@ -93,76 +95,8 @@ spec: required: - pinnedImages type: object - status: - description: status describes the last observed state of this pinned image - set. - properties: - conditions: - description: conditions represent the observations of a pinned image - set's current state. - 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 - type: array - x-kubernetes-list-map-keys: - - type - x-kubernetes-list-type: map - type: object required: - spec type: object served: true storage: true - subresources: - status: {} diff --git a/payload-manifests/crds/0000_80_machine-config_01_pinnedimagesets-TechPreviewNoUpgrade.crd.yaml b/payload-manifests/crds/0000_80_machine-config_01_pinnedimagesets-TechPreviewNoUpgrade.crd.yaml index 6463640005c..f0bf8d539a2 100644 --- a/payload-manifests/crds/0000_80_machine-config_01_pinnedimagesets-TechPreviewNoUpgrade.crd.yaml +++ b/payload-manifests/crds/0000_80_machine-config_01_pinnedimagesets-TechPreviewNoUpgrade.crd.yaml @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - api-approved.openshift.io: https://github.com/openshift/api/pull/1713 + api-approved.openshift.io: https://github.com/openshift/api/pull/2198 api.openshift.io/merged-by-featuregates: "true" include.release.openshift.io/ibm-cloud-managed: "true" include.release.openshift.io/self-managed-high-availability: "true" @@ -19,14 +19,14 @@ spec: singular: pinnedimageset scope: Cluster versions: - - name: v1alpha1 + - name: v1 schema: openAPIV3Schema: description: |- PinnedImageSet describes a set of images that should be pinned by CRI-O and pulled to the nodes which are members of the declared MachineConfigPools. - 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. + Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). properties: apiVersion: description: |- @@ -62,25 +62,27 @@ spec: ... ] - These image references should all be by digest, tags aren't allowed. + Image references must be by digest. + A maximum of 500 images may be specified. items: + description: PinnedImageRef represents a reference to an OCI image properties: name: description: |- name is an OCI Image referenced by digest. - - The format of the image ref is: - host[:port][/namespace]/name@sha256: + 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}$') + 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-_.]*?$') + 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: - name type: object @@ -93,76 +95,8 @@ spec: required: - pinnedImages type: object - status: - description: status describes the last observed state of this pinned image - set. - properties: - conditions: - description: conditions represent the observations of a pinned image - set's current state. - 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 - type: array - x-kubernetes-list-map-keys: - - type - x-kubernetes-list-type: map - type: object required: - spec type: object served: true storage: true - subresources: - status: {}