|
| 1 | +apiVersion: apiextensions.k8s.io/v1 |
| 2 | +kind: CustomResourceDefinition |
| 3 | +metadata: |
| 4 | + annotations: |
| 5 | + api-approved.openshift.io: https://github.com/openshift/api/pull/2555 |
| 6 | + api.openshift.io/merged-by-featuregates: "true" |
| 7 | + include.release.openshift.io/ibm-cloud-managed: "true" |
| 8 | + include.release.openshift.io/self-managed-high-availability: "true" |
| 9 | + release.openshift.io/feature-set: DevPreviewNoUpgrade |
| 10 | + labels: |
| 11 | + openshift.io/operator-managed: "" |
| 12 | + name: osimagestreams.machineconfiguration.openshift.io |
| 13 | +spec: |
| 14 | + group: machineconfiguration.openshift.io |
| 15 | + names: |
| 16 | + kind: OSImageStream |
| 17 | + listKind: OSImageStreamList |
| 18 | + plural: osimagestreams |
| 19 | + singular: osimagestream |
| 20 | + scope: Cluster |
| 21 | + versions: |
| 22 | + - name: v1alpha1 |
| 23 | + schema: |
| 24 | + openAPIV3Schema: |
| 25 | + description: |- |
| 26 | + OSImageStream describes a set of streams and associated images available |
| 27 | + for the MachineConfigPools to be used as base OS images. |
| 28 | +
|
| 29 | + The resource is a singleton named "cluster". |
| 30 | +
|
| 31 | + 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. |
| 32 | + properties: |
| 33 | + apiVersion: |
| 34 | + description: |- |
| 35 | + APIVersion defines the versioned schema of this representation of an object. |
| 36 | + Servers should convert recognized schemas to the latest internal value, and |
| 37 | + may reject unrecognized values. |
| 38 | + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources |
| 39 | + type: string |
| 40 | + kind: |
| 41 | + description: |- |
| 42 | + Kind is a string value representing the REST resource this object represents. |
| 43 | + Servers may infer this from the endpoint the client submits requests to. |
| 44 | + Cannot be updated. |
| 45 | + In CamelCase. |
| 46 | + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds |
| 47 | + type: string |
| 48 | + metadata: |
| 49 | + type: object |
| 50 | + spec: |
| 51 | + description: spec contains the desired OSImageStream config configuration. |
| 52 | + type: object |
| 53 | + status: |
| 54 | + description: |- |
| 55 | + status describes the last observed state of this OSImageStream. |
| 56 | + Populated by the MachineConfigOperator after reading release metadata. |
| 57 | + When not present, the controller has not yet reconciled this resource. |
| 58 | + properties: |
| 59 | + availableStreams: |
| 60 | + description: |- |
| 61 | + availableStreams is a list of the available OS Image Streams that can be |
| 62 | + used as the base image for MachineConfigPools. |
| 63 | + availableStreams is required, must have at least one item, must not exceed |
| 64 | + 100 items, and must have unique entries keyed on the name field. |
| 65 | + items: |
| 66 | + properties: |
| 67 | + name: |
| 68 | + description: |- |
| 69 | + name is the required identifier of the stream. |
| 70 | +
|
| 71 | + name is determined by the operator based on the OCI label of the |
| 72 | + discovered OS or Extension Image. |
| 73 | +
|
| 74 | + Must be a valid RFC 1123 subdomain between 1 and 253 characters in length, |
| 75 | + consisting of lowercase alphanumeric characters, hyphens ('-'), and periods ('.'). |
| 76 | + maxLength: 253 |
| 77 | + minLength: 1 |
| 78 | + type: string |
| 79 | + x-kubernetes-validations: |
| 80 | + - message: a RFC 1123 subdomain must consist of lower case alphanumeric |
| 81 | + characters, '-' or '.', and must start and end with an alphanumeric |
| 82 | + character. |
| 83 | + rule: '!format.dns1123Subdomain().validate(self).hasValue()' |
| 84 | + osExtensionsImage: |
| 85 | + description: |- |
| 86 | + osExtensionsImage is a required OS Extensions Image referenced by digest. |
| 87 | +
|
| 88 | + osExtensionsImage bundles the extra repositories used to enable extensions, augmenting |
| 89 | + the base operating system without modifying the underlying immutable osImage. |
| 90 | +
|
| 91 | + The format of the image pull spec is: host[:port][/namespace]/name@sha256:<digest>, |
| 92 | + where the digest must be 64 characters long, and consist only of lowercase hexadecimal characters, a-f and 0-9. |
| 93 | + The length of the whole spec must be between 1 to 447 characters. |
| 94 | + maxLength: 447 |
| 95 | + minLength: 1 |
| 96 | + type: string |
| 97 | + x-kubernetes-validations: |
| 98 | + - message: the OCI Image reference must end with a valid '@sha256:<digest>' |
| 99 | + suffix, where '<digest>' is 64 characters long |
| 100 | + rule: (self.split('@').size() == 2 && self.split('@')[1].matches('^sha256:[a-f0-9]{64}$')) |
| 101 | + - message: the OCI Image name should follow the host[:port][/namespace]/name |
| 102 | + format, resembling a valid URL without the scheme |
| 103 | + 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-_.]*?$')) |
| 104 | + osImage: |
| 105 | + description: |- |
| 106 | + osImage is a required OS Image referenced by digest. |
| 107 | +
|
| 108 | + osImage contains the immutable, fundamental operating system components, including the kernel |
| 109 | + and base utilities, that define the core environment for the node's host operating system. |
| 110 | +
|
| 111 | + The format of the image pull spec is: host[:port][/namespace]/name@sha256:<digest>, |
| 112 | + where the digest must be 64 characters long, and consist only of lowercase hexadecimal characters, a-f and 0-9. |
| 113 | + The length of the whole spec must be between 1 to 447 characters. |
| 114 | + maxLength: 447 |
| 115 | + minLength: 1 |
| 116 | + type: string |
| 117 | + x-kubernetes-validations: |
| 118 | + - message: the OCI Image reference must end with a valid '@sha256:<digest>' |
| 119 | + suffix, where '<digest>' is 64 characters long |
| 120 | + rule: (self.split('@').size() == 2 && self.split('@')[1].matches('^sha256:[a-f0-9]{64}$')) |
| 121 | + - message: the OCI Image name should follow the host[:port][/namespace]/name |
| 122 | + format, resembling a valid URL without the scheme |
| 123 | + 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-_.]*?$')) |
| 124 | + required: |
| 125 | + - name |
| 126 | + - osExtensionsImage |
| 127 | + - osImage |
| 128 | + type: object |
| 129 | + maxItems: 100 |
| 130 | + minItems: 1 |
| 131 | + type: array |
| 132 | + x-kubernetes-list-map-keys: |
| 133 | + - name |
| 134 | + x-kubernetes-list-type: map |
| 135 | + defaultStream: |
| 136 | + description: |- |
| 137 | + defaultStream is the name of the stream that should be used as the default |
| 138 | + when no specific stream is requested by a MachineConfigPool. |
| 139 | +
|
| 140 | + It must be a valid RFC 1123 subdomain between 1 and 253 characters in length, |
| 141 | + consisting of lowercase alphanumeric characters, hyphens ('-'), and periods ('.'), |
| 142 | + and must reference the name of one of the streams in availableStreams. |
| 143 | + maxLength: 253 |
| 144 | + minLength: 1 |
| 145 | + type: string |
| 146 | + x-kubernetes-validations: |
| 147 | + - message: a RFC 1123 subdomain must consist of lower case alphanumeric |
| 148 | + characters, '-' or '.', and must start and end with an alphanumeric |
| 149 | + character. |
| 150 | + rule: '!format.dns1123Subdomain().validate(self).hasValue()' |
| 151 | + required: |
| 152 | + - availableStreams |
| 153 | + - defaultStream |
| 154 | + type: object |
| 155 | + x-kubernetes-validations: |
| 156 | + - message: defaultStream must reference a stream name from availableStreams |
| 157 | + rule: self.defaultStream in self.availableStreams.map(s, s.name) |
| 158 | + required: |
| 159 | + - spec |
| 160 | + type: object |
| 161 | + x-kubernetes-validations: |
| 162 | + - message: osimagestream is a singleton, .metadata.name must be 'cluster' |
| 163 | + rule: self.metadata.name == 'cluster' |
| 164 | + served: true |
| 165 | + storage: true |
| 166 | + subresources: |
| 167 | + status: {} |
0 commit comments