Generate Catalogues schema using kubebuilder

* Generate VersionsCatalogue and NetworkCatalogue schemas using kubebuilder
* Schema for CRDs can be generated with this command
    => make manifests

Change-Id: I61695d523ee0c08739f15a47b2cf8653d925b108
Closes: #532
This commit is contained in:
siraj.yasin 2021-05-06 04:43:34 +00:00
parent ab7bbfce89
commit 935b26af52
11 changed files with 1507 additions and 337 deletions

View File

@ -12,6 +12,9 @@ else
GOBIN = $(shell go env GOBIN 2> /dev/null)
endif
# Produce CRDs that work back to Kubernetes 1.16
CRD_OPTIONS ?= crd:crdVersions=v1
BINDIR := bin
EXECUTABLE_CLI := airshipctl
TOOLBINDIR := tools/bin
@ -293,3 +296,7 @@ CONTROLLER_GEN=$(GOBIN)/controller-gen
else
CONTROLLER_GEN=$(shell which controller-gen)
endif
# Generate manifests e.g. CRD, RBAC etc.
manifests: controller-gen
$(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=manifests/function/airshipctl-schemas

2
go.sum
View File

@ -745,6 +745,7 @@ golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvx
golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac h1:8R1esu+8QioDxo4E4mX6bFztO+dMTM49DNAaWfO5OeY=
golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=
@ -881,6 +882,7 @@ golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtn
golang.org/x/tools v0.0.0-20190920225731-5eefd052ad72/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20190930201159-7c411dea38b0/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191010075000-0337d82405ff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e h1:aZzprAO9/8oim3qStq3wc1Xuxx4QmAGriC4VU4ojemQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=

View File

@ -0,0 +1,185 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.2.5
creationTimestamp: null
name: networkcatalogues.airshipit.org
spec:
group: airshipit.org
names:
kind: NetworkCatalogue
listKind: NetworkCatalogueList
plural: networkcatalogues
singular: networkcatalogue
scope: Namespaced
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
description: NetworkCatalogue is the Schema for the network catalogs API
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: NetworkCatalogueSpec defines the default networking catalogs
hosted in airshipctl
properties:
commonHostNetworking:
description: HostNetworkingSpec defines the properties for host neworking
like Links, Networks and Services
properties:
links:
items:
description: Link defines the properties of the network link
properties:
bond_links:
items:
type: string
type: array
bond_miimon:
type: integer
bond_mode:
type: string
id:
type: string
mtu:
type: string
name:
type: string
type:
type: string
vlan_id:
type: integer
vlan_link:
type: string
vlan_mac_address:
type: string
type: object
type: array
networks:
items:
description: Network defines the network attributes like ID,
Type, Link, Netmask and Routes
properties:
id:
type: string
link:
type: string
netmask:
description: IPFormat Regex to support both IPV4 and IPV6
format
pattern: ((^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))$)|(^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$))
type: string
routes:
items:
description: Route defines the spec for network route
properties:
gateway:
description: IPFormat Regex to support both IPV4 and
IPV6 format
pattern: ((^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))$)|(^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$))
type: string
netmask:
description: IPFormat Regex to support both IPV4 and
IPV6 format
pattern: ((^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))$)|(^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$))
type: string
network:
description: IPFormat Regex to support both IPV4 and
IPV6 format
pattern: ((^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))$)|(^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$))
type: string
type: object
type: array
type:
type: string
type: object
type: array
services:
items:
description: Service defines the spec for service
properties:
address:
description: IPFormat Regex to support both IPV4 and IPV6
format
pattern: ((^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))$)|(^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$))
type: string
type:
type: string
type: object
type: array
type: object
ironic:
description: IronicSpec defines the spec for Ironic
properties:
deployKernelUrl:
type: string
deployRamdiskUrl:
type: string
dhcpRange:
type: string
httpPort:
type: string
ironicAutomatedClean:
type: string
ironicEndpoint:
type: string
ironicFastTrack:
type: string
ironicInspectorEndpoint:
type: string
provisioningInterface:
type: string
provisioningIp:
description: IPFormat Regex to support both IPV4 and IPV6 format
pattern: ((^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))$)|(^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$))
type: string
type: object
kubernetes:
description: KubernetesSpec defines the spec for kubernetes
properties:
apiserverCertSANs:
type: string
controlPlaneEndpoint:
description: EndPointSpec defines the properties of end points
like IP and port
properties:
host:
description: IPFormat Regex to support both IPV4 and IPV6
format
pattern: ((^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))$)|(^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$))
type: string
port:
maximum: 65535
type: integer
type: object
podCidr:
format: cidr
type: string
serviceCidr:
format: cidr
type: string
type: object
type: object
type: object
served: true
storage: true
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@ -0,0 +1,230 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.2.5
creationTimestamp: null
name: versionscatalogues.airshipit.org
spec:
group: airshipit.org
names:
kind: VersionsCatalogue
listKind: VersionsCatalogueList
plural: versionscatalogues
singular: versionscatalogue
scope: Namespaced
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
description: VersionsCatalogue is the Schema for the versions catalogs API
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: VersionsCatalogueSpec defines the default versions catalog
for functions hosted in the airshipctl project
properties:
capi_images:
additionalProperties:
description: CAPIImageProperties defines the spec for CAPI images
properties:
auth_proxy:
description: ImageURLSpec defines the properties of Image URL
like repository and tag
properties:
repository:
type: string
tag:
type: string
required:
- repository
- tag
type: object
ipam-manager:
description: ImageURLSpec defines the properties of Image URL
like repository and tag
properties:
repository:
type: string
tag:
type: string
required:
- repository
- tag
type: object
manager:
description: ImageURLSpec defines the properties of Image URL
like repository and tag
properties:
repository:
type: string
tag:
type: string
required:
- repository
- tag
type: object
required:
- auth_proxy
- manager
type: object
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
charts:
additionalProperties:
description: ChartProperties defines the properties of the chart
like Chart and vesrion
properties:
chart:
type: string
version:
type: string
required:
- chart
- version
type: object
description: charts defines collections of Helm charts. i 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
files:
additionalProperties:
additionalProperties:
description: FileProperties 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.
properties:
checksum:
type: string
url:
type: string
required:
- url
type: object
description: AirshipctlFunctionFileMap 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
description: files defines collections of files required by airshipctl
functions.
type: object
helm_repositories:
additionalProperties:
description: RepoProperties 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.
properties:
url:
type: string
required:
- url
type: object
description: helm_repositories defines Helm repositories required
by HelmReleases.
type: object
image_components:
additionalProperties:
additionalProperties:
description: ImageRepositorySpec defines the spec for a repository
that includes repository URL, Name and one of Hash/Tag/SHA/Digest.
properties:
digest:
type: string
hash:
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
repository:
type: string
sha:
type: string
tag:
type: string
required:
- repository
type: object
description: AirshipctlFunctionImageComponentMap 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
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 catalog
are grouped by airshipctl function -> images in function.
type: object
images:
additionalProperties:
additionalProperties:
additionalProperties:
description: ImageURL defines the URL for an image
properties:
image:
type: string
required:
- image
type: object
description: KubernetesResourceMap 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
description: AirshipctlFunctionImageRepoMap 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
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 catalog
is organized by airshipctl function -> Deployments in function ->
images in Deployment.
type: object
kubernetes:
description: Allows for the specification of the kubernetes version
being used.
type: string
required:
- capi_images
- images
type: object
type: object
served: true
storage: true
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@ -1,3 +1,3 @@
resources:
- versions-catalogue.yaml
- network-catalogue.yaml
- airshipit.org_versionscatalogues.yaml
- airshipit.org_networkcatalogues.yaml

View File

@ -1,151 +0,0 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: networkcatalogues.airshipit.org
spec:
group: airshipit.org
names:
kind: NetworkCatalogue
plural: networkcatalogues
singular: networkcatalogue
scope: Namespaced
versions:
- name: v1alpha1
served: true
storage: true
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
properties:
commonHostNetworking:
type: object
properties:
links:
type: array
items:
type: object
properties:
id:
type: string
name:
type: string
type:
type: string
mtu:
x-kubernetes-int-or-string: true
bond_links:
type: array
items:
type: string
bond_mode:
type: string
bond_xmit_hash_policy:
type: string
bond_miimon:
type: integer
vlan_link:
type: string
vlan_id:
type: integer
vlan_mac_address:
type: string
networks:
type: array
items:
type: object
properties:
id:
type: string
type:
type: string
link:
type: string
netmask:
type: string
oneOf:
- format: ipv4
- format: ipv6
routes:
type: array
items:
type: object
properties:
network:
type: string
oneOf:
- format: ipv4
- format: ipv6
netmask:
type: string
oneOf:
- format: ipv4
- format: ipv6
gateway:
type: string
oneOf:
- format: ipv4
- format: ipv6
services:
type: array
items:
type: object
properties:
address:
type: string
oneOf:
- format: ipv4
- format: ipv6
type:
type: string
kubernetes:
type: object
properties:
serviceCidr:
type: string
format: cidr
podCidr:
type: string
format: cidr
controlPlaneEndpoint:
type: object
properties:
host:
type: string
oneOf:
- format: ipv4
- format: ipv6
port:
type: integer
maximum: 65535
apiserverCertSANs:
type: string
ironic:
type: object
properties:
provisioningInterface:
type: string
provisioningIp:
type: string
oneOf:
- format: ipv4
- format: ipv6
dhcpRange:
# TODO(mfuller): should this be enforced with a pattern?
type: string
ironicAutomatedClean:
type: string
httpPort:
type: string
ironicFastTrack:
type: string
deployKernelUrl:
type: string
deployRamdiskUrl:
type: string
ironicEndpoint:
type: string
ironicInspectorEndpoint:
type: string

View File

@ -1,172 +0,0 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: versionscatalogues.airshipit.org
spec:
group: airshipit.org
names:
kind: VersionsCatalogue
plural: versionscatalogues
singular: versionscatalogue
scope: Namespaced
versions:
- name: v1alpha1
served: true
storage: true
schema:
openAPIV3Schema:
type: object
properties:
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:
description: 'The name of each key defined here should refer to the airshipctl
function in which the file will be used.'
type: object
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
required: [manager, auth_proxy]
properties:
manager:
type: object
required: [repository, tag]
properties:
repository:
type: string
tag:
type: string
auth_proxy:
type: object
required: [repository, tag]
properties:
repository:
type: string
tag:
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:
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:
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:
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

View File

@ -15,8 +15,8 @@ planConfigs:
- Clusterctl
- VariableCatalogue
crdList:
- function/airshipctl-schemas/versions-catalogue.yaml
- function/airshipctl-schemas/network-catalogue.yaml
- function/airshipctl-schemas/airshipit.org_versionscatalogues.yaml
- function/airshipctl-schemas/airshipit.org_networkcatalogues.yaml
phaseName: AIRSHIPCTL_CURRENT_PHASE
phaseConfigs:
initinfra-ephemeral:
@ -24,8 +24,8 @@ phaseConfigs:
- Clusterctl
- VariableCatalogue
crdList:
- function/airshipctl-schemas/versions-catalogue.yaml
- function/airshipctl-schemas/network-catalogue.yaml
- function/airshipctl-schemas/airshipit.org_versionscatalogues.yaml
- function/airshipctl-schemas/airshipit.org_networkcatalogues.yaml
clusterctl-init-ephemeral:
crdList:
- function/cert-manager/v1.1.0/upstream/cert-manager.yaml
@ -33,8 +33,8 @@ phaseConfigs:
kindsToSkip:
- VariableCatalogue
crdList:
- function/airshipctl-schemas/network-catalogue.yaml
- function/airshipctl-schemas/versions-catalogue.yaml
- function/airshipctl-schemas/airshipit.org_versionscatalogues.yaml
- function/airshipctl-schemas/airshipit.org_networkcatalogues.yaml
- function/capi/v0.3.7/crd/bases/cluster.x-k8s.io_clusters.yaml
- function/cacpk/v0.3.7/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml
- function/capm3/v0.4.0/crd/bases/infrastructure.cluster.x-k8s.io_metal3clusters.yaml
@ -48,8 +48,8 @@ phaseConfigs:
- Clusterctl
- VariableCatalogue
crdList:
- function/airshipctl-schemas/network-catalogue.yaml
- function/airshipctl-schemas/versions-catalogue.yaml
- function/airshipctl-schemas/airshipit.org_networkcatalogues.yaml
- function/airshipctl-schemas/airshipit.org_versionscatalogues.yaml
workers-target:
crdList:
- global/crd/baremetal-operator/metal3.io_baremetalhosts_crd.yaml
@ -57,8 +57,8 @@ phaseConfigs:
kindsToSkip:
- VariableCatalogue
crdList:
- function/airshipctl-schemas/network-catalogue.yaml
- function/airshipctl-schemas/versions-catalogue.yaml
- function/airshipctl-schemas/airshipit.org_networkcatalogues.yaml
- function/airshipctl-schemas/airshipit.org_versionscatalogues.yaml
- function/cabpk/v0.3.7/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml
- function/capi/v0.3.7/crd/bases/cluster.x-k8s.io_machinedeployments.yaml
- function/capm3/v0.4.0/crd/bases/infrastructure.cluster.x-k8s.io_metal3machinetemplates.yaml
@ -67,7 +67,7 @@ phaseConfigs:
kindsToSkip:
- VariableCatalogue
crdList:
- function/airshipctl-schemas/network-catalogue.yaml
- function/airshipctl-schemas/versions-catalogue.yaml
- function/airshipctl-schemas/airshipit.org_networkcatalogues.yaml
- function/airshipctl-schemas/airshipit.org_versionscatalogues.yaml
- function/flux/helm-controller/upstream/crd/bases/helm.toolkit.fluxcd.io_helmreleases.yaml
- function/flux/source-controller/upstream/crd/bases/source.toolkit.fluxcd.io_helmrepositories.yaml

View File

@ -0,0 +1,138 @@
/*
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Package v1alpha1 generates the custom resource definition schema for NetworkCatalogues
// Ignore lint for the entire file is added because there is a long regex to support IPV4 and IPV6 format.
// This regex cannot be broken down. When nolint is added for the specific line it gets picked as description
// for that field by kubebuilder controller-gen.
//nolint:lll
package v1alpha1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.
// HostNetworkingSpec defines the properties for host neworking like Links, Networks and Services
type HostNetworkingSpec struct {
Links []Link `json:"links,omitempty"`
Networks []Network `json:"networks,omitempty"`
Services []Service `json:"services,omitempty"`
}
// Link defines the properties of the network link
type Link struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Type string `json:"type,omitempty"`
MTU string `json:"mtu,omitempty"`
BondLinks []string `json:"bond_links,omitempty"`
BondMode string `json:"bond_mode,omitempty"`
BondMiimon int `json:"bond_miimon,omitempty"`
VlanLink string `json:"vlan_link,omitempty"`
VlanID int `json:"vlan_id,omitempty"`
VlanMacAddress string `json:"vlan_mac_address,omitempty"`
}
// IPFormat Regex to support both IPV4 and IPV6 format
// +kubebuilder:validation:Pattern="((^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))$)|(^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$))"
type IPFormat string
// Network defines the network attributes like ID, Type, Link, Netmask and Routes
type Network struct {
ID string `json:"id,omitempty"`
Type string `json:"type,omitempty"`
Link string `json:"link,omitempty"`
NetMask IPFormat `json:"netmask,omitempty"`
Routes []Route `json:"routes,omitempty"`
}
// Route defines the spec for network route
type Route struct {
Network IPFormat `json:"network,omitempty"`
NetMask IPFormat `json:"netmask,omitempty"`
Gateway IPFormat `json:"gateway,omitempty"`
}
// Service defines the spec for service
type Service struct {
Address IPFormat `json:"address,omitempty"`
Type string `json:"type,omitempty"`
}
// EndPointSpec defines the properties of end points like IP and port
type EndPointSpec struct {
Host IPFormat `json:"host,omitempty"`
// +kubebuilder:validation:Maximum=65535
Port int `json:"port,omitempty"`
}
// KubernetesSpec defines the spec for kubernetes
type KubernetesSpec struct {
// +kubebuilder:validation:Format=cidr
ServiceCidr string `json:"serviceCidr,omitempty"`
// +kubebuilder:validation:Format=cidr
PodCidr string `json:"podCidr,omitempty"`
ControlPlaneEndpoint EndPointSpec `json:"controlPlaneEndpoint,omitempty"`
ApiserverCertSANs string `json:"apiserverCertSANs,omitempty"`
}
// IronicSpec defines the spec for Ironic
type IronicSpec struct {
ProvisioningInterface string `json:"provisioningInterface,omitempty"`
ProvisioningIP IPFormat `json:"provisioningIp,omitempty"`
DhcpRange string `json:"dhcpRange,omitempty"`
IronicAutomatedClean string `json:"ironicAutomatedClean,omitempty"`
HTTPPort string `json:"httpPort,omitempty"`
IronicFastTrack string `json:"ironicFastTrack,omitempty"`
DeployKernelURL string `json:"deployKernelUrl,omitempty"`
DeployRamdiskURL string `json:"deployRamdiskUrl,omitempty"`
IronicEndpoint string `json:"ironicEndpoint,omitempty"`
IronicInspectorEndpoint string `json:"ironicInspectorEndpoint,omitempty"`
}
// NetworkCatalogueSpec defines the default networking catalogs hosted in airshipctl
type NetworkCatalogueSpec struct {
CommonHostNetworking HostNetworkingSpec `json:"commonHostNetworking,omitempty"`
Kubernetes KubernetesSpec `json:"kubernetes,omitempty"`
Ironic IronicSpec `json:"ironic,omitempty"`
}
// +kubebuilder:object:root=true
// NetworkCatalogue is the Schema for the network catalogs API
type NetworkCatalogue struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec NetworkCatalogueSpec `json:"spec,omitempty"`
}
// +kubebuilder:object:root=true
// NetworkCatalogues contains a list of network catalogs
type NetworkCatalogues struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []NetworkCatalogue `json:"items"`
}
func init() {
SchemeBuilder.Register(&NetworkCatalogue{}, &NetworkCatalogues{})
}

View File

@ -0,0 +1,182 @@
/*
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1alpha1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.
// RepoProperties 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 RepoProperties struct {
URL string `json:"url"`
}
// RepositorySpec defines the additional properties for repository
type RepositorySpec map[string]RepoProperties
// ChartProperties defines the properties of the chart like Chart and vesrion
type ChartProperties struct {
Chart string `json:"chart"`
Version string `json:"version"`
}
// ChartSpec defines the spec for charts
type ChartSpec map[string]ChartProperties
// FileProperties 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 FileProperties struct {
URL string `json:"url"`
Checksum string `json:"checksum,omitempty"`
}
// AirshipctlFunctionFileMap 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 AirshipctlFunctionFileMap map[string]FileProperties
// FileSpec The name of each key defined here should refer to the airshipctl
// function in which the file will be used.
type FileSpec map[string]AirshipctlFunctionFileMap
// ImageURLSpec defines the properties of Image URL like repository and tag
type ImageURLSpec struct {
Repository string `json:"repository"`
Tag string `json:"tag"`
}
// CAPIImageProperties defines the spec for CAPI images
type CAPIImageProperties struct {
Manager ImageURLSpec `json:"manager"`
AuthProxy ImageURLSpec `json:"auth_proxy"`
IPAMManager ImageURLSpec `json:"ipam-manager,omitempty"`
}
// CAPIImageSpec defines the additional properties for CAPI Images
type CAPIImageSpec map[string]CAPIImageProperties
// ImageURL defines the URL for an image
type ImageURL struct {
Image string `json:"image"`
}
// KubernetesResourceMap 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 KubernetesResourceMap map[string]ImageURL
// AirshipctlFunctionImageRepoMap 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 AirshipctlFunctionImageRepoMap map[string]KubernetesResourceMap
// ImageSpec 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 ImageSpec map[string]AirshipctlFunctionImageRepoMap
// ImageRepositorySpec defines the spec for a repository that includes repository URL,
// Name and one of Hash/Tag/SHA/Digest.
type ImageRepositorySpec struct {
Repository string `json:"repository"`
Hash string `json:"hash,omitempty"`
Tag string `json:"tag,omitempty"`
SHA string `json:"sha,omitempty"`
Digest string `json:"digest,omitempty"`
// 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").
Name string `json:"name,omitempty"`
}
// AirshipctlFunctionImageComponentMap 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 AirshipctlFunctionImageComponentMap map[string]ImageRepositorySpec
// ImageComponentSpec 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 ImageComponentSpec map[string]AirshipctlFunctionImageComponentMap
// VersionsCatalogueSpec defines the default versions catalog for functions hosted in the airshipctl project
type VersionsCatalogueSpec struct {
// helm_repositories defines Helm repositories required by HelmReleases.
HelmRepositories RepositorySpec `json:"helm_repositories,omitempty"`
// charts defines collections of Helm charts. i
// The name of each key in this section should identify a specific chart, and each
// chart object must have "chart" and "version" properties defined.
Charts ChartSpec `json:"charts,omitempty"`
// files defines collections of files required by airshipctl functions.
Files FileSpec `json:"files,omitempty"`
// 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.
CAPIImages CAPIImageSpec `json:"capi_images,omtiempty"`
// 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 catalog is organized by
// airshipctl function -> Deployments in function -> images in Deployment.
Images ImageSpec `json:"images,omtiempty"`
// 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 catalog are grouped by airshipctl function ->
// images in function.
ImageComponents ImageComponentSpec `json:"image_components,omitempty"`
// Allows for the specification of the kubernetes version being used.
Kubernetes string `json:"kubernetes,omitempty"`
}
// +kubebuilder:object:root=true
// VersionsCatalogue is the Schema for the versions catalogs API
type VersionsCatalogue struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec VersionsCatalogueSpec `json:"spec,omitempty"`
}
// +kubebuilder:object:root=true
// VersionsCatalogues contains a list of versions catalog
type VersionsCatalogues struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []VersionsCatalogue `json:"items"`
}
func init() {
SchemeBuilder.Register(&VersionsCatalogue{}, &VersionsCatalogues{})
}

View File

@ -44,6 +44,79 @@ func (in *AirshipContainerSpec) DeepCopy() *AirshipContainerSpec {
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in AirshipctlFunctionFileMap) DeepCopyInto(out *AirshipctlFunctionFileMap) {
{
in := &in
*out = make(AirshipctlFunctionFileMap, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AirshipctlFunctionFileMap.
func (in AirshipctlFunctionFileMap) DeepCopy() AirshipctlFunctionFileMap {
if in == nil {
return nil
}
out := new(AirshipctlFunctionFileMap)
in.DeepCopyInto(out)
return *out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in AirshipctlFunctionImageComponentMap) DeepCopyInto(out *AirshipctlFunctionImageComponentMap) {
{
in := &in
*out = make(AirshipctlFunctionImageComponentMap, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AirshipctlFunctionImageComponentMap.
func (in AirshipctlFunctionImageComponentMap) DeepCopy() AirshipctlFunctionImageComponentMap {
if in == nil {
return nil
}
out := new(AirshipctlFunctionImageComponentMap)
in.DeepCopyInto(out)
return *out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in AirshipctlFunctionImageRepoMap) DeepCopyInto(out *AirshipctlFunctionImageRepoMap) {
{
in := &in
*out = make(AirshipctlFunctionImageRepoMap, len(*in))
for key, val := range *in {
var outVal map[string]ImageURL
if val == nil {
(*out)[key] = nil
} else {
in, out := &val, &outVal
*out = make(KubernetesResourceMap, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
(*out)[key] = outVal
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AirshipctlFunctionImageRepoMap.
func (in AirshipctlFunctionImageRepoMap) DeepCopy() AirshipctlFunctionImageRepoMap {
if in == nil {
return nil
}
out := new(AirshipctlFunctionImageRepoMap)
in.DeepCopyInto(out)
return *out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ApplyConfig) DeepCopyInto(out *ApplyConfig) {
*out = *in
@ -207,6 +280,81 @@ func (in *BootstrapContainer) DeepCopy() *BootstrapContainer {
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *CAPIImageProperties) DeepCopyInto(out *CAPIImageProperties) {
*out = *in
out.Manager = in.Manager
out.AuthProxy = in.AuthProxy
out.IPAMManager = in.IPAMManager
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CAPIImageProperties.
func (in *CAPIImageProperties) DeepCopy() *CAPIImageProperties {
if in == nil {
return nil
}
out := new(CAPIImageProperties)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in CAPIImageSpec) DeepCopyInto(out *CAPIImageSpec) {
{
in := &in
*out = make(CAPIImageSpec, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CAPIImageSpec.
func (in CAPIImageSpec) DeepCopy() CAPIImageSpec {
if in == nil {
return nil
}
out := new(CAPIImageSpec)
in.DeepCopyInto(out)
return *out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ChartProperties) DeepCopyInto(out *ChartProperties) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChartProperties.
func (in *ChartProperties) DeepCopy() *ChartProperties {
if in == nil {
return nil
}
out := new(ChartProperties)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in ChartSpec) DeepCopyInto(out *ChartSpec) {
{
in := &in
*out = make(ChartSpec, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChartSpec.
func (in ChartSpec) DeepCopy() ChartSpec {
if in == nil {
return nil
}
out := new(ChartSpec)
in.DeepCopyInto(out)
return *out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Cluster) DeepCopyInto(out *Cluster) {
*out = *in
@ -327,6 +475,21 @@ func (in *Clusterctl) DeepCopyObject() runtime.Object {
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *EndPointSpec) DeepCopyInto(out *EndPointSpec) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndPointSpec.
func (in *EndPointSpec) DeepCopy() *EndPointSpec {
if in == nil {
return nil
}
out := new(EndPointSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *EphemeralCluster) DeepCopyInto(out *EphemeralCluster) {
*out = *in
@ -342,6 +505,52 @@ func (in *EphemeralCluster) DeepCopy() *EphemeralCluster {
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *FileProperties) DeepCopyInto(out *FileProperties) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FileProperties.
func (in *FileProperties) DeepCopy() *FileProperties {
if in == nil {
return nil
}
out := new(FileProperties)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in FileSpec) DeepCopyInto(out *FileSpec) {
{
in := &in
*out = make(FileSpec, len(*in))
for key, val := range *in {
var outVal map[string]FileProperties
if val == nil {
(*out)[key] = nil
} else {
in, out := &val, &outVal
*out = make(AirshipctlFunctionFileMap, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
(*out)[key] = outVal
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FileSpec.
func (in FileSpec) DeepCopy() FileSpec {
if in == nil {
return nil
}
out := new(FileSpec)
in.DeepCopyInto(out)
return *out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *GenericContainer) DeepCopyInto(out *GenericContainer) {
*out = *in
@ -400,6 +609,71 @@ func (in *GenericContainerSpec) DeepCopy() *GenericContainerSpec {
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *HostNetworkingSpec) DeepCopyInto(out *HostNetworkingSpec) {
*out = *in
if in.Links != nil {
in, out := &in.Links, &out.Links
*out = make([]Link, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.Networks != nil {
in, out := &in.Networks, &out.Networks
*out = make([]Network, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.Services != nil {
in, out := &in.Services, &out.Services
*out = make([]Service, len(*in))
copy(*out, *in)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HostNetworkingSpec.
func (in *HostNetworkingSpec) DeepCopy() *HostNetworkingSpec {
if in == nil {
return nil
}
out := new(HostNetworkingSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in ImageComponentSpec) DeepCopyInto(out *ImageComponentSpec) {
{
in := &in
*out = make(ImageComponentSpec, len(*in))
for key, val := range *in {
var outVal map[string]ImageRepositorySpec
if val == nil {
(*out)[key] = nil
} else {
in, out := &val, &outVal
*out = make(AirshipctlFunctionImageComponentMap, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
(*out)[key] = outVal
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageComponentSpec.
func (in ImageComponentSpec) DeepCopy() ImageComponentSpec {
if in == nil {
return nil
}
out := new(ImageComponentSpec)
in.DeepCopyInto(out)
return *out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ImageMeta) DeepCopyInto(out *ImageMeta) {
*out = *in
@ -415,6 +689,92 @@ func (in *ImageMeta) DeepCopy() *ImageMeta {
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ImageRepositorySpec) DeepCopyInto(out *ImageRepositorySpec) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageRepositorySpec.
func (in *ImageRepositorySpec) DeepCopy() *ImageRepositorySpec {
if in == nil {
return nil
}
out := new(ImageRepositorySpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in ImageSpec) DeepCopyInto(out *ImageSpec) {
{
in := &in
*out = make(ImageSpec, len(*in))
for key, val := range *in {
var outVal map[string]KubernetesResourceMap
if val == nil {
(*out)[key] = nil
} else {
in, out := &val, &outVal
*out = make(AirshipctlFunctionImageRepoMap, len(*in))
for key, val := range *in {
var outVal map[string]ImageURL
if val == nil {
(*out)[key] = nil
} else {
in, out := &val, &outVal
*out = make(KubernetesResourceMap, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
(*out)[key] = outVal
}
}
(*out)[key] = outVal
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageSpec.
func (in ImageSpec) DeepCopy() ImageSpec {
if in == nil {
return nil
}
out := new(ImageSpec)
in.DeepCopyInto(out)
return *out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ImageURL) DeepCopyInto(out *ImageURL) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageURL.
func (in *ImageURL) DeepCopy() *ImageURL {
if in == nil {
return nil
}
out := new(ImageURL)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ImageURLSpec) DeepCopyInto(out *ImageURLSpec) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageURLSpec.
func (in *ImageURLSpec) DeepCopy() *ImageURLSpec {
if in == nil {
return nil
}
out := new(ImageURLSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *InitOptions) DeepCopyInto(out *InitOptions) {
*out = *in
@ -450,6 +810,21 @@ func (in *InitOptions) DeepCopy() *InitOptions {
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *IronicSpec) DeepCopyInto(out *IronicSpec) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IronicSpec.
func (in *IronicSpec) DeepCopy() *IronicSpec {
if in == nil {
return nil
}
out := new(IronicSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *IsoConfiguration) DeepCopyInto(out *IsoConfiguration) {
*out = *in
@ -648,6 +1023,63 @@ func (in *KubernetesApply) DeepCopyObject() runtime.Object {
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in KubernetesResourceMap) DeepCopyInto(out *KubernetesResourceMap) {
{
in := &in
*out = make(KubernetesResourceMap, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubernetesResourceMap.
func (in KubernetesResourceMap) DeepCopy() KubernetesResourceMap {
if in == nil {
return nil
}
out := new(KubernetesResourceMap)
in.DeepCopyInto(out)
return *out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *KubernetesSpec) DeepCopyInto(out *KubernetesSpec) {
*out = *in
out.ControlPlaneEndpoint = in.ControlPlaneEndpoint
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubernetesSpec.
func (in *KubernetesSpec) DeepCopy() *KubernetesSpec {
if in == nil {
return nil
}
out := new(KubernetesSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Link) DeepCopyInto(out *Link) {
*out = *in
if in.BondLinks != nil {
in, out := &in.BondLinks, &out.BondLinks
*out = make([]string, len(*in))
copy(*out, *in)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Link.
func (in *Link) DeepCopy() *Link {
if in == nil {
return nil
}
out := new(Link)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *MoveOptions) DeepCopyInto(out *MoveOptions) {
*out = *in
@ -678,6 +1110,102 @@ func (in *NamespacedName) DeepCopy() *NamespacedName {
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Network) DeepCopyInto(out *Network) {
*out = *in
if in.Routes != nil {
in, out := &in.Routes, &out.Routes
*out = make([]Route, len(*in))
copy(*out, *in)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Network.
func (in *Network) DeepCopy() *Network {
if in == nil {
return nil
}
out := new(Network)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *NetworkCatalogue) DeepCopyInto(out *NetworkCatalogue) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
in.Spec.DeepCopyInto(&out.Spec)
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkCatalogue.
func (in *NetworkCatalogue) DeepCopy() *NetworkCatalogue {
if in == nil {
return nil
}
out := new(NetworkCatalogue)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *NetworkCatalogue) 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 *NetworkCatalogueSpec) DeepCopyInto(out *NetworkCatalogueSpec) {
*out = *in
in.CommonHostNetworking.DeepCopyInto(&out.CommonHostNetworking)
out.Kubernetes = in.Kubernetes
out.Ironic = in.Ironic
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkCatalogueSpec.
func (in *NetworkCatalogueSpec) DeepCopy() *NetworkCatalogueSpec {
if in == nil {
return nil
}
out := new(NetworkCatalogueSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *NetworkCatalogues) DeepCopyInto(out *NetworkCatalogues) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]NetworkCatalogue, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkCatalogues.
func (in *NetworkCatalogues) DeepCopy() *NetworkCatalogues {
if in == nil {
return nil
}
out := new(NetworkCatalogues)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *NetworkCatalogues) 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 *Phase) DeepCopyInto(out *Phase) {
*out = *in
@ -919,6 +1447,72 @@ func (in *ReplacementTransformer) DeepCopyObject() runtime.Object {
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *RepoProperties) DeepCopyInto(out *RepoProperties) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RepoProperties.
func (in *RepoProperties) DeepCopy() *RepoProperties {
if in == nil {
return nil
}
out := new(RepoProperties)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in RepositorySpec) DeepCopyInto(out *RepositorySpec) {
{
in := &in
*out = make(RepositorySpec, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RepositorySpec.
func (in RepositorySpec) DeepCopy() RepositorySpec {
if in == nil {
return nil
}
out := new(RepositorySpec)
in.DeepCopyInto(out)
return *out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Route) DeepCopyInto(out *Route) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Route.
func (in *Route) DeepCopy() *Route {
if in == nil {
return nil
}
out := new(Route)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Service) DeepCopyInto(out *Service) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Service.
func (in *Service) DeepCopy() *Service {
if in == nil {
return nil
}
out := new(Service)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *StorageMount) DeepCopyInto(out *StorageMount) {
*out = *in
@ -951,3 +1545,158 @@ func (in *Templater) DeepCopyObject() runtime.Object {
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *VersionsCatalogue) DeepCopyInto(out *VersionsCatalogue) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
in.Spec.DeepCopyInto(&out.Spec)
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VersionsCatalogue.
func (in *VersionsCatalogue) DeepCopy() *VersionsCatalogue {
if in == nil {
return nil
}
out := new(VersionsCatalogue)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *VersionsCatalogue) 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 *VersionsCatalogueSpec) DeepCopyInto(out *VersionsCatalogueSpec) {
*out = *in
if in.HelmRepositories != nil {
in, out := &in.HelmRepositories, &out.HelmRepositories
*out = make(RepositorySpec, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
if in.Charts != nil {
in, out := &in.Charts, &out.Charts
*out = make(ChartSpec, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
if in.Files != nil {
in, out := &in.Files, &out.Files
*out = make(FileSpec, len(*in))
for key, val := range *in {
var outVal map[string]FileProperties
if val == nil {
(*out)[key] = nil
} else {
in, out := &val, &outVal
*out = make(AirshipctlFunctionFileMap, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
(*out)[key] = outVal
}
}
if in.CAPIImages != nil {
in, out := &in.CAPIImages, &out.CAPIImages
*out = make(CAPIImageSpec, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
if in.Images != nil {
in, out := &in.Images, &out.Images
*out = make(ImageSpec, len(*in))
for key, val := range *in {
var outVal map[string]KubernetesResourceMap
if val == nil {
(*out)[key] = nil
} else {
in, out := &val, &outVal
*out = make(AirshipctlFunctionImageRepoMap, len(*in))
for key, val := range *in {
var outVal map[string]ImageURL
if val == nil {
(*out)[key] = nil
} else {
in, out := &val, &outVal
*out = make(KubernetesResourceMap, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
(*out)[key] = outVal
}
}
(*out)[key] = outVal
}
}
if in.ImageComponents != nil {
in, out := &in.ImageComponents, &out.ImageComponents
*out = make(ImageComponentSpec, len(*in))
for key, val := range *in {
var outVal map[string]ImageRepositorySpec
if val == nil {
(*out)[key] = nil
} else {
in, out := &val, &outVal
*out = make(AirshipctlFunctionImageComponentMap, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
(*out)[key] = outVal
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VersionsCatalogueSpec.
func (in *VersionsCatalogueSpec) DeepCopy() *VersionsCatalogueSpec {
if in == nil {
return nil
}
out := new(VersionsCatalogueSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *VersionsCatalogues) DeepCopyInto(out *VersionsCatalogues) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]VersionsCatalogue, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VersionsCatalogues.
func (in *VersionsCatalogues) DeepCopy() *VersionsCatalogues {
if in == nil {
return nil
}
out := new(VersionsCatalogues)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *VersionsCatalogues) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}