Enhance VersionsCatalogue schema
Modifies the schema for the VersionsCatalogue CRD to allow images to also be declared using the Helm-style format of 'repository' and 'tag' (or 'sha', 'digest', or 'hash'). Closes: #511 Change-Id: I9b22bb9c3ed814bf0d2b6f7dc1e540d9370eae7c
This commit is contained in:
parent
3d26a7fec3
commit
c62330999a
@ -21,33 +21,58 @@ spec:
|
||||
type: object
|
||||
properties:
|
||||
helm_repositories:
|
||||
description: 'helm_repositories defines Helm repositories required by
|
||||
HelmReleases.'
|
||||
type: object
|
||||
additionalProperties:
|
||||
description: 'The name of each key defined at this level should identify
|
||||
a Helm repository. Each helm_repository object is required to have a
|
||||
"url" key that specifies the location of the repository.'
|
||||
type: object
|
||||
required: [url]
|
||||
properties:
|
||||
url:
|
||||
type: string
|
||||
charts:
|
||||
description: 'charts defines collections of Helm charts. The name of each
|
||||
key in this section should identify a specific chart, and each chart
|
||||
object must have "chart" and "version" properties defined.'
|
||||
type: object
|
||||
additionalProperties:
|
||||
type: object
|
||||
required: [chart, version]
|
||||
properties:
|
||||
chart:
|
||||
type: string
|
||||
version:
|
||||
type: string
|
||||
files:
|
||||
description: 'files defines collections of files required by airshipctl
|
||||
functions.'
|
||||
type: object
|
||||
additionalProperties: # file group
|
||||
additionalProperties:
|
||||
description: 'The name of each key defined here should refer to the airshipctl
|
||||
function in which the file will be used.'
|
||||
type: object
|
||||
additionalProperties: # file
|
||||
additionalProperties:
|
||||
description: 'The name of each key defined at this level should identify a
|
||||
single file. Each file object is required to have a "url" property defined,
|
||||
and may also define a "checksum" property.'
|
||||
type: object
|
||||
required: [url]
|
||||
properties:
|
||||
url:
|
||||
type: string
|
||||
checksum:
|
||||
type: string
|
||||
capi_images:
|
||||
description: 'capi_images defines collections of images used by cluster API.
|
||||
The name of each key in this section should correspond to the airshipctl
|
||||
function in which the images will be used, such as "capm3". Each capi_image
|
||||
object must have a "manager" and "auth_proxy" object, each of which must have
|
||||
"repository" and "tag" properties defined. capi_images may also include an
|
||||
optional "ipam-manager" object, which must also have "repository" and "tag"
|
||||
properties defined.'
|
||||
type: object
|
||||
additionalProperties:
|
||||
type: object
|
||||
@ -55,6 +80,7 @@ spec:
|
||||
properties:
|
||||
manager:
|
||||
type: object
|
||||
required: [repository, tag]
|
||||
properties:
|
||||
repository:
|
||||
type: string
|
||||
@ -62,6 +88,7 @@ spec:
|
||||
type: string
|
||||
auth_proxy:
|
||||
type: object
|
||||
required: [repository, tag]
|
||||
properties:
|
||||
repository:
|
||||
type: string
|
||||
@ -69,26 +96,77 @@ spec:
|
||||
type: string
|
||||
ipam-manager:
|
||||
type: object
|
||||
required: [repository, tag]
|
||||
properties:
|
||||
repository:
|
||||
type: string
|
||||
tag:
|
||||
type: string
|
||||
images:
|
||||
description: 'images defines collections of images that are declared as complete
|
||||
URLs rather than as a collection of discrete parts, such as "repository" and
|
||||
"tag" or "sha". This section of the catalogue is organized by
|
||||
airshipctl function -> Deployments in function -> images in Deployment.'
|
||||
type: object
|
||||
additionalProperties: # image groups
|
||||
additionalProperties:
|
||||
description: 'The name of each key defined here should refer to the airshipctl
|
||||
function to which the collection of images belongs, such as "baremetal-operator".'
|
||||
type: object
|
||||
additionalProperties: # Deployments in image group
|
||||
additionalProperties:
|
||||
description: 'The name of each key defined here should refer to the Kubernetes
|
||||
resource document into which an image will be substituted, such as a Deployment
|
||||
or DaemonSet.'
|
||||
type: object
|
||||
additionalProperties: # images in Deployment
|
||||
type: object
|
||||
properties:
|
||||
image:
|
||||
type: string
|
||||
# TODO(mfuller): add fields for 'tag' and 'hash' which
|
||||
# will require a function in the replacement transformer
|
||||
# to properly concatenate the complete image string, i.e.
|
||||
# image/name:tag and image/name@sha256:hash
|
||||
additionalProperties:
|
||||
description: 'The name of each key defined at this level should identify a single
|
||||
image. Each image object is required to have an "image" property which specifies
|
||||
the full URL for the image (i.e. repository/image:tag) as a single string.'
|
||||
type: object
|
||||
required: [image]
|
||||
properties:
|
||||
image:
|
||||
type: string
|
||||
image_components:
|
||||
description: 'image_components defines images that are declared using the Helm-style
|
||||
format that breaks image URLs into discrete parts, such as "repository" and "tag".
|
||||
Images in this section of the catalogue are grouped by airshipctl function ->
|
||||
images in function.'
|
||||
type: object
|
||||
additionalProperties:
|
||||
description: 'The name of each key defined at this level should refer to the
|
||||
airshipctl function to which a collection of images belongs, such as
|
||||
"baremetal-operator".'
|
||||
type: object
|
||||
additionalProperties:
|
||||
description: 'The name of each key defined at this level should identify a single
|
||||
image. Each image object must have a "repository" property, and must have a
|
||||
property named "tag", "hash", "sha", or "digest".'
|
||||
type: object
|
||||
required: [repository]
|
||||
oneOf:
|
||||
- required: ["tag"]
|
||||
- required: ["hash"]
|
||||
- required: ["sha"]
|
||||
- required: ["digest"]
|
||||
properties:
|
||||
repository:
|
||||
type: string
|
||||
tag:
|
||||
type: string
|
||||
hash:
|
||||
type: string
|
||||
sha:
|
||||
type: string
|
||||
digest:
|
||||
type: string
|
||||
name:
|
||||
description: 'Name is an optional property that is used to specify the name of
|
||||
an image. Typically, this format is only needed for charts such as dex-aio,
|
||||
which uses "repo", "name", and "tag" properties to declare images, rather
|
||||
than the more commonly used "repository" and "tag". In such cases, "repository"
|
||||
should contain only the name of the repository (e.g. "quay.io") and the "name"
|
||||
property should contain the image name (e.g. "metal3-io/ironic").'
|
||||
type: string
|
||||
kubernetes:
|
||||
description: 'Allows for the specification of the kubernetes version being used.'
|
||||
type: string
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user