Update capm3 to 0.4.0 to fix clusterctl move BMH bug

This PS updates the capm3 version to 0.4.0, to fix the
clusterctl move BMH bug.

Closes: #466
Change-Id: If9369b6421bde628efee90f1a94681c13f9e749c
This commit is contained in:
Sirisha Gopigiri 2021-03-01 12:14:58 +05:30
parent c0fcc8c37f
commit 3bade9c0ed
62 changed files with 3956 additions and 11 deletions

View File

@ -26,7 +26,7 @@ spec:
capm3: # Images specific to the camp3 function; etc.
manager:
repository: quay.io/metal3-io
tag: v0.3.2
tag: v0.4.0
auth_proxy:
repository: gcr.io/kubebuilder
tag: v0.4.0

View File

@ -0,0 +1,5 @@
# BMO AS PART OF DEPLOYMENT OF CAPM3
The main goal is to deploy BMO as part of deployment in CAPM3 project.
We are referencing to BMO inside the kustomization file in order to
deploy BMO in CAPM3.

View File

@ -0,0 +1,11 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: metal3-baremetal-operator
spec:
template:
spec:
containers:
# Change the value of image field below to your controller image URL
- image: quay.io/metal3-io/baremetal-operator:master
name: baremetal-operator

View File

@ -0,0 +1,10 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: metal3-baremetal-operator
spec:
template:
spec:
containers:
- name: baremetal-operator
imagePullPolicy: IfNotPresent

View File

@ -0,0 +1,23 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: capm3-system
resources:
- github.com/metal3-io/baremetal-operator/deploy/operator/?ref=master
- github.com/metal3-io/baremetal-operator/deploy/crds/?ref=master
- github.com/metal3-io/baremetal-operator/deploy/rbac/?ref=master
configMapGenerator:
- behavior: create
literals:
- DEPLOY_KERNEL_URL=${DEPLOY_KERNEL_URL}
- DEPLOY_RAMDISK_URL=${DEPLOY_RAMDISK_URL}
- IRONIC_ENDPOINT=${IRONIC_URL}
- IRONIC_INSPECTOR_ENDPOINT=${IRONIC_INSPECTOR_URL}
name: ironic-bmo-configmap
patchesStrategicMerge:
- bmo_image_patch.yaml
- bmo_pull_policy.yaml
configurations:
- kustomizeconfig.yaml

View File

@ -0,0 +1,15 @@
# the following config is for teaching kustomize where to look at when substituting vars.
# It requires kustomize v2.1.0 or newer to work properly.
nameReference:
- kind: ServiceAccount
version: v1
fieldSpecs:
- kind: ClusterRoleBinding
group: rbac.authorization.k8s.io
path: subjects/name
namespace:
- kind: ClusterRoleBinding
group: rbac.authorization.k8s.io
path: subjects/namespace
create: true

View File

@ -0,0 +1,24 @@
# The following manifests contain a self-signed issuer CR and a certificate CR.
# More document can be found at https://docs.cert-manager.io
apiVersion: cert-manager.io/v1alpha2
kind: Issuer
metadata:
name: selfsigned-issuer
namespace: system
spec:
selfSigned: {}
---
apiVersion: cert-manager.io/v1alpha2
kind: Certificate
metadata:
name: serving-cert # this name should match the one appeared in kustomizeconfig.yaml
namespace: system
spec:
# $(SERVICE_NAME) and $(SERVICE_NAMESPACE) will be substituted by kustomize
dnsNames:
- $(SERVICE_NAME).$(SERVICE_NAMESPACE).svc
- $(SERVICE_NAME).$(SERVICE_NAMESPACE).svc.cluster.local
issuerRef:
kind: Issuer
name: selfsigned-issuer
secretName: $(SERVICE_NAME)-cert # this secret will not be prefixed, since it's not managed by kustomize

View File

@ -0,0 +1,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- certificate.yaml
configurations:
- kustomizeconfig.yaml

View File

@ -0,0 +1,19 @@
# This configuration is for teaching kustomize how to update name ref and var substitution
nameReference:
- kind: Issuer
group: cert-manager.io
fieldSpecs:
- kind: Certificate
group: cert-manager.io
path: spec/issuerRef/name
varReference:
- kind: Certificate
group: cert-manager.io
path: spec/commonName
- kind: Certificate
group: cert-manager.io
path: spec/dnsNames
- kind: Certificate
group: cert-manager.io
path: spec/secretName

View File

@ -0,0 +1,311 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.3.0
creationTimestamp: null
name: metal3clusters.infrastructure.cluster.x-k8s.io
spec:
group: infrastructure.cluster.x-k8s.io
names:
categories:
- cluster-api
kind: Metal3Cluster
listKind: Metal3ClusterList
plural: metal3clusters
shortNames:
- m3c
- m3cluster
singular: metal3cluster
scope: Namespaced
versions:
- additionalPrinterColumns:
- description: metal3Cluster is Ready
jsonPath: .status.ready
name: Ready
type: string
- description: Most recent error
jsonPath: .status.errorReason
name: Error
type: string
- description: API endpoints
jsonPath: .status.apiEndpoints
name: APIEndpoints
type: string
name: v1alpha2
schema:
openAPIV3Schema:
description: Metal3Cluster is the Schema for the metal3clusters 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: Metal3ClusterSpec defines the desired state of Metal3Cluster.
properties:
apiEndpoint:
type: string
noCloudProvider:
type: boolean
required:
- apiEndpoint
type: object
status:
description: Metal3ClusterStatus defines the observed state of Metal3Cluster.
properties:
apiEndpoints:
description: APIEndpoints represents the endpoints to communicate
with the control plane.
items:
description: APIEndpoint represents a reachable Kubernetes API endpoint.
properties:
host:
description: Host is the hostname on which the API server is
serving.
type: string
port:
description: Port is the port on which the API server is serving.
type: integer
required:
- host
- port
type: object
type: array
errorMessage:
description: "ErrorMessage will be set in the event that there is
a terminal problem reconciling the metal3machine and will contain
a more verbose string suitable for logging and human consumption.
\n This field should not be set for transitive errors that a controller
faces that are expected to be fixed automatically over time (like
service outages), but instead indicate that something is fundamentally
wrong with the metal3machine's spec or the configuration of the
controller, and that manual intervention is required. Examples of
terminal errors would be invalid combinations of settings in the
spec, values that are unsupported by the controller, or the responsible
controller itself being critically misconfigured. \n Any transient
errors that occur during the reconciliation of Machines can be added
as events to the metal3machine object and/or logged in the controller's
output."
type: string
errorReason:
description: "ErrorReason will be set in the event that there is a
terminal problem reconciling the metal3machine and will contain
a succinct value suitable for machine interpretation. \n This field
should not be set for transitive errors that a controller faces
that are expected to be fixed automatically over time (like service
outages), but instead indicate that something is fundamentally wrong
with the metal3machine's spec or the configuration of the controller,
and that manual intervention is required. Examples of terminal errors
would be invalid combinations of settings in the spec, values that
are unsupported by the controller, or the responsible controller
itself being critically misconfigured. \n Any transient errors that
occur during the reconciliation of Machines can be added as events
to the metal3machine object and/or logged in the controller's output."
type: string
lastUpdated:
description: LastUpdated identifies when this status was last observed.
format: date-time
type: string
ready:
description: Ready denotes that the Metal3 cluster (infrastructure)
is ready. In Baremetal case, it does not mean anything for now as
no infrastructure steps need to be performed. Required by Cluster
API. Set to True by the metal3Cluster controller after creation.
type: boolean
required:
- ready
type: object
type: object
served: true
storage: false
subresources:
status: {}
- additionalPrinterColumns:
- description: metal3Cluster is Ready
jsonPath: .status.ready
name: Ready
type: string
- description: Most recent error
jsonPath: .status.failureReason
name: Error
type: string
- description: Cluster to which this BMCluster belongs
jsonPath: .metadata.labels.cluster\.x-k8s\.io/cluster-name
name: Cluster
type: string
- description: Control plane endpoint
jsonPath: .spec.controlPlaneEndpoint
name: Endpoint
type: string
name: v1alpha3
schema:
openAPIV3Schema:
description: Metal3Cluster is the Schema for the metal3clusters 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: Metal3ClusterSpec defines the desired state of Metal3Cluster.
properties:
controlPlaneEndpoint:
description: ControlPlaneEndpoint represents the endpoint used to
communicate with the control plane.
properties:
host:
description: Host is the hostname on which the API server is serving.
type: string
port:
description: Port is the port on which the API server is serving.
type: integer
required:
- host
- port
type: object
noCloudProvider:
type: boolean
required:
- controlPlaneEndpoint
type: object
status:
description: Metal3ClusterStatus defines the observed state of Metal3Cluster.
properties:
failureMessage:
description: FailureMessage indicates that there is a fatal problem
reconciling the state, and will be set to a descriptive error message.
type: string
failureReason:
description: FailureReason indicates that there is a fatal problem
reconciling the state, and will be set to a token value suitable
for programmatic interpretation.
type: string
lastUpdated:
description: LastUpdated identifies when this status was last observed.
format: date-time
type: string
ready:
description: Ready denotes that the Metal3 cluster (infrastructure)
is ready. In Baremetal case, it does not mean anything for now as
no infrastructure steps need to be performed. Required by Cluster
API. Set to True by the metal3Cluster controller after creation.
type: boolean
required:
- ready
type: object
type: object
served: true
storage: false
subresources:
status: {}
- additionalPrinterColumns:
- description: metal3Cluster is Ready
jsonPath: .status.ready
name: Ready
type: string
- description: Most recent error
jsonPath: .status.failureReason
name: Error
type: string
- description: Cluster to which this BMCluster belongs
jsonPath: .metadata.labels.cluster\.x-k8s\.io/cluster-name
name: Cluster
type: string
- description: Control plane endpoint
jsonPath: .spec.controlPlaneEndpoint
name: Endpoint
type: string
name: v1alpha4
schema:
openAPIV3Schema:
description: Metal3Cluster is the Schema for the metal3clusters 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: Metal3ClusterSpec defines the desired state of Metal3Cluster.
properties:
controlPlaneEndpoint:
description: ControlPlaneEndpoint represents the endpoint used to
communicate with the control plane.
properties:
host:
description: Host is the hostname on which the API server is serving.
type: string
port:
description: Port is the port on which the API server is serving.
type: integer
required:
- host
- port
type: object
noCloudProvider:
type: boolean
required:
- controlPlaneEndpoint
type: object
status:
description: Metal3ClusterStatus defines the observed state of Metal3Cluster.
properties:
failureMessage:
description: FailureMessage indicates that there is a fatal problem
reconciling the state, and will be set to a descriptive error message.
type: string
failureReason:
description: FailureReason indicates that there is a fatal problem
reconciling the state, and will be set to a token value suitable
for programmatic interpretation.
type: string
lastUpdated:
description: LastUpdated identifies when this status was last observed.
format: date-time
type: string
ready:
description: Ready denotes that the Metal3 cluster (infrastructure)
is ready. In Baremetal case, it does not mean anything for now as
no infrastructure steps need to be performed. Required by Cluster
API. Set to True by the metal3Cluster controller after creation.
type: boolean
required:
- ready
type: object
type: object
served: true
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@ -0,0 +1,137 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.3.0
creationTimestamp: null
name: metal3dataclaims.infrastructure.cluster.x-k8s.io
spec:
group: infrastructure.cluster.x-k8s.io
names:
categories:
- cluster-api
kind: Metal3DataClaim
listKind: Metal3DataClaimList
plural: metal3dataclaims
shortNames:
- m3dc
- m3dataclaim
singular: metal3dataclaim
scope: Namespaced
versions:
- name: v1alpha4
schema:
openAPIV3Schema:
description: Metal3DataClaim is the Schema for the metal3datas 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: Metal3DataSpec defines the desired state of Metal3Data.
properties:
template:
description: Template is the Metal3DataTemplate this was generated
for.
properties:
apiVersion:
description: API version of the referent.
type: string
fieldPath:
description: 'If referring to a piece of an object instead of
an entire object, this string should contain a valid JSON/Go
field access statement, such as desiredState.manifest.containers[2].
For example, if the object reference is to a container within
a pod, this would take on a value like: "spec.containers{name}"
(where "name" refers to the name of the container that triggered
the event) or if no container name is specified "spec.containers[2]"
(container with index 2 in this pod). This syntax is chosen
only to have some well-defined way of referencing a part of
an object. TODO: this design is not final and this field is
subject to change in the future.'
type: string
kind:
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
type: string
namespace:
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
type: string
resourceVersion:
description: 'Specific resourceVersion to which this reference
is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
type: string
uid:
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
type: string
type: object
required:
- template
type: object
status:
description: Metal3DataClaimStatus defines the observed state of Metal3Data.
properties:
errorMessage:
description: ErrorMessage contains the error message
type: string
renderedData:
description: RenderedData references the Metal3Data when ready
properties:
apiVersion:
description: API version of the referent.
type: string
fieldPath:
description: 'If referring to a piece of an object instead of
an entire object, this string should contain a valid JSON/Go
field access statement, such as desiredState.manifest.containers[2].
For example, if the object reference is to a container within
a pod, this would take on a value like: "spec.containers{name}"
(where "name" refers to the name of the container that triggered
the event) or if no container name is specified "spec.containers[2]"
(container with index 2 in this pod). This syntax is chosen
only to have some well-defined way of referencing a part of
an object. TODO: this design is not final and this field is
subject to change in the future.'
type: string
kind:
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
type: string
namespace:
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
type: string
resourceVersion:
description: 'Specific resourceVersion to which this reference
is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
type: string
uid:
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
type: string
type: object
type: object
type: object
served: true
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@ -0,0 +1,171 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.3.0
creationTimestamp: null
name: metal3datas.infrastructure.cluster.x-k8s.io
spec:
group: infrastructure.cluster.x-k8s.io
names:
categories:
- cluster-api
kind: Metal3Data
listKind: Metal3DataList
plural: metal3datas
shortNames:
- m3d
- m3data
singular: metal3data
scope: Namespaced
versions:
- name: v1alpha4
schema:
openAPIV3Schema:
description: Metal3Data is the Schema for the metal3datas 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: Metal3DataSpec defines the desired state of Metal3Data.
properties:
claim:
description: DataClaim points to the Metal3DataClaim the Metal3Data
was created for.
properties:
apiVersion:
description: API version of the referent.
type: string
fieldPath:
description: 'If referring to a piece of an object instead of
an entire object, this string should contain a valid JSON/Go
field access statement, such as desiredState.manifest.containers[2].
For example, if the object reference is to a container within
a pod, this would take on a value like: "spec.containers{name}"
(where "name" refers to the name of the container that triggered
the event) or if no container name is specified "spec.containers[2]"
(container with index 2 in this pod). This syntax is chosen
only to have some well-defined way of referencing a part of
an object. TODO: this design is not final and this field is
subject to change in the future.'
type: string
kind:
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
type: string
namespace:
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
type: string
resourceVersion:
description: 'Specific resourceVersion to which this reference
is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
type: string
uid:
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
type: string
type: object
index:
description: Index stores the index value of this instance in the
Metal3DataTemplate.
type: integer
metaData:
description: MetaData points to the rendered MetaData secret.
properties:
name:
description: Name is unique within a namespace to reference a
secret resource.
type: string
namespace:
description: Namespace defines the space within which the secret
name must be unique.
type: string
type: object
networkData:
description: NetworkData points to the rendered NetworkData secret.
properties:
name:
description: Name is unique within a namespace to reference a
secret resource.
type: string
namespace:
description: Namespace defines the space within which the secret
name must be unique.
type: string
type: object
template:
description: DataTemplate is the Metal3DataTemplate this was generated
from.
properties:
apiVersion:
description: API version of the referent.
type: string
fieldPath:
description: 'If referring to a piece of an object instead of
an entire object, this string should contain a valid JSON/Go
field access statement, such as desiredState.manifest.containers[2].
For example, if the object reference is to a container within
a pod, this would take on a value like: "spec.containers{name}"
(where "name" refers to the name of the container that triggered
the event) or if no container name is specified "spec.containers[2]"
(container with index 2 in this pod). This syntax is chosen
only to have some well-defined way of referencing a part of
an object. TODO: this design is not final and this field is
subject to change in the future.'
type: string
kind:
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
type: string
namespace:
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
type: string
resourceVersion:
description: 'Specific resourceVersion to which this reference
is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
type: string
uid:
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
type: string
type: object
required:
- claim
- template
type: object
status:
description: Metal3DataStatus defines the observed state of Metal3Data.
properties:
errorMessage:
description: ErrorMessage contains the error message
type: string
ready:
description: Ready is a flag set to True if the secrets were rendered
properly
type: boolean
type: object
type: object
served: true
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@ -0,0 +1,850 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.3.0
creationTimestamp: null
name: metal3datatemplates.infrastructure.cluster.x-k8s.io
spec:
group: infrastructure.cluster.x-k8s.io
names:
categories:
- cluster-api
kind: Metal3DataTemplate
listKind: Metal3DataTemplateList
plural: metal3datatemplates
shortNames:
- m3dt
- m3datatemplate
singular: metal3datatemplate
scope: Namespaced
versions:
- additionalPrinterColumns:
- description: Cluster to which this template belongs
jsonPath: .metadata.labels.cluster\.x-k8s\.io/cluster-name
name: Cluster
type: string
name: v1alpha4
schema:
openAPIV3Schema:
description: Metal3DataTemplate is the Schema for the metal3datatemplates
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: Metal3DataTemplateSpec defines the desired state of Metal3DataTemplate.
properties:
clusterName:
description: ClusterName is the name of the Cluster this object belongs
to.
minLength: 1
type: string
metaData:
description: MetaData contains the information needed to generate
the metadata secret
properties:
dnsServersFromIPPool:
description: DNSServersFromPool is the list of metadata items
to be rendered as dns servers.
items:
properties:
key:
description: Key will be used as the key to set in the metadata
map for cloud-init
type: string
name:
description: Name is the name of the IPPool used to fetch
the value to set in the metadata map for cloud-init
type: string
required:
- key
- name
type: object
type: array
fromAnnotations:
description: FromAnnotations is the list of metadata items to
be fetched from object Annotations
items:
description: MetaDataFromAnnotation contains the information
to fetch an annotation content, if the label does not exist,
it is rendered as empty string
properties:
annotation:
description: Annotation is the key of the Annotation to
fetch
type: string
key:
description: Key will be used as the key to set in the metadata
map for cloud-init
type: string
object:
description: Object is the type of the object from which
we retrieve the name
enum:
- machine
- metal3machine
- baremetalhost
type: string
required:
- annotation
- key
- object
type: object
type: array
fromHostInterfaces:
description: FromHostInterfaces is the list of metadata items
to be rendered as MAC addresses of the host interfaces.
items:
description: MetaDataHostInterface contains the information
to render the object name
properties:
interface:
description: Interface is the name of the interface in the
BareMetalHost Status Hardware Details list of interfaces
from which to fetch the MAC address.
type: string
key:
description: Key will be used as the key to set in the metadata
map for cloud-init
type: string
required:
- interface
- key
type: object
type: array
fromLabels:
description: FromLabels is the list of metadata items to be fetched
from object labels
items:
description: MetaDataFromLabel contains the information to fetch
a label content, if the label does not exist, it is rendered
as empty string
properties:
key:
description: Key will be used as the key to set in the metadata
map for cloud-init
type: string
label:
description: Label is the key of the label to fetch
type: string
object:
description: Object is the type of the object from which
we retrieve the name
enum:
- machine
- metal3machine
- baremetalhost
type: string
required:
- key
- label
- object
type: object
type: array
gatewaysFromIPPool:
description: GatewaysFromPool is the list of metadata items to
be rendered as gateway addresses.
items:
properties:
key:
description: Key will be used as the key to set in the metadata
map for cloud-init
type: string
name:
description: Name is the name of the IPPool used to fetch
the value to set in the metadata map for cloud-init
type: string
required:
- key
- name
type: object
type: array
indexes:
description: Indexes is the list of metadata items to be rendered
from the index of the Metal3Data
items:
description: MetaDataIndex contains the information to render
the index
properties:
key:
description: Key will be used as the key to set in the metadata
map for cloud-init
type: string
offset:
description: Offset is the offset to apply to the index
when rendering it
type: integer
prefix:
description: Prefix is the prefix string
type: string
step:
default: 1
description: Step is the multiplier of the index
type: integer
suffix:
description: Suffix is the suffix string
type: string
required:
- key
type: object
type: array
ipAddressesFromIPPool:
description: IPAddressesFromPool is the list of metadata items
to be rendered as ip addresses.
items:
properties:
key:
description: Key will be used as the key to set in the metadata
map for cloud-init
type: string
name:
description: Name is the name of the IPPool used to fetch
the value to set in the metadata map for cloud-init
type: string
required:
- key
- name
type: object
type: array
namespaces:
description: Namespaces is the list of metadata items to be rendered
from the namespace
items:
description: MetaDataNamespace contains the information to render
the namespace
properties:
key:
description: Key will be used as the key to set in the metadata
map for cloud-init
type: string
required:
- key
type: object
type: array
objectNames:
description: ObjectNames is the list of metadata items to be rendered
from the name of objects.
items:
description: MetaDataObjectName contains the information to
render the object name
properties:
key:
description: Key will be used as the key to set in the metadata
map for cloud-init
type: string
object:
description: Object is the type of the object from which
we retrieve the name
enum:
- machine
- metal3machine
- baremetalhost
type: string
required:
- key
- object
type: object
type: array
prefixesFromIPPool:
description: PrefixesFromPool is the list of metadata items to
be rendered as network prefixes.
items:
properties:
key:
description: Key will be used as the key to set in the metadata
map for cloud-init
type: string
name:
description: Name is the name of the IPPool used to fetch
the value to set in the metadata map for cloud-init
type: string
required:
- key
- name
type: object
type: array
strings:
description: Strings is the list of metadata items to be rendered
from strings
items:
description: MetaDataString contains the information to render
the string
properties:
key:
description: Key will be used as the key to set in the metadata
map for cloud-init
type: string
value:
description: Value is the string to render.
type: string
required:
- key
- value
type: object
type: array
type: object
networkData:
description: NetworkData contains the information needed to generate
the networkdata secret
properties:
links:
description: Links is a structure containing lists of different
types objects
properties:
bonds:
description: Bonds contains a list of Bond links
items:
description: NetworkDataLinkBond represents a bond link
object
properties:
bondLinks:
description: BondLinks is the list of links that are
part of the bond.
items:
type: string
type: array
bondMode:
description: BondMode is the mode of bond used. It can
be one of balance-rr, active-backup, balance-xor,
broadcast, balance-tlb, balance-alb, 802.1ad
enum:
- balance-rr
- active-backup
- balance-xor
- broadcast
- balance-tlb
- balance-alb
- 802.1ad
type: string
id:
description: Id is the ID of the interface (used for
naming)
type: string
macAddress:
description: MACAddress is the MAC address of the interface,
containing the object used to render it.
properties:
fromHostInterface:
description: FromHostInterface contains the name
of the interface in the BareMetalHost Introspection
details from which to fetch the MAC address
type: string
string:
description: String contains the MAC address given
as a string
type: string
type: object
mtu:
default: 1500
description: MTU is the MTU of the interface
maximum: 9000
type: integer
required:
- bondLinks
- bondMode
- id
- macAddress
type: object
type: array
ethernets:
description: Ethernets contains a list of Ethernet links
items:
description: NetworkDataLinkEthernet represents an ethernet
link object
properties:
id:
description: Id is the ID of the interface (used for
naming)
type: string
macAddress:
description: MACAddress is the MAC address of the interface,
containing the object used to render it.
properties:
fromHostInterface:
description: FromHostInterface contains the name
of the interface in the BareMetalHost Introspection
details from which to fetch the MAC address
type: string
string:
description: String contains the MAC address given
as a string
type: string
type: object
mtu:
default: 1500
description: MTU is the MTU of the interface
maximum: 9000
type: integer
type:
description: 'Type is the type of the ethernet link.
It can be one of: bridge, dvs, hw_veb, hyperv, ovs,
tap, vhostuser, vif, phy'
enum:
- bridge
- dvs
- hw_veb
- hyperv
- ovs
- tap
- vhostuser
- vif
- phy
type: string
required:
- id
- macAddress
- type
type: object
type: array
vlans:
description: Vlans contains a list of Vlan links
items:
description: NetworkDataLinkVlan represents a vlan link
object
properties:
id:
description: Id is the ID of the interface (used for
naming)
type: string
macAddress:
description: MACAddress is the MAC address of the interface,
containing the object used to render it.
properties:
fromHostInterface:
description: FromHostInterface contains the name
of the interface in the BareMetalHost Introspection
details from which to fetch the MAC address
type: string
string:
description: String contains the MAC address given
as a string
type: string
type: object
mtu:
default: 1500
description: MTU is the MTU of the interface
maximum: 9000
type: integer
vlanID:
description: VlanID is the Vlan ID
maximum: 4096
type: integer
vlanLink:
description: VlanLink is the name of the link on which
the vlan should be added
type: string
required:
- id
- macAddress
- vlanID
- vlanLink
type: object
type: array
type: object
networks:
description: Networks is a structure containing lists of different
types objects
properties:
ipv4:
description: IPv4 contains a list of IPv4 static allocations
items:
description: NetworkDataIPv4 represents an ipv4 static network
object
properties:
id:
description: ID is the network ID (name)
type: string
ipAddressFromIPPool:
description: IPAddressFromIPPool contains the name of
the IPPool to use to get an ip address
type: string
link:
description: Link is the link on which the network applies
type: string
routes:
description: Routes contains a list of IPv4 routes
items:
description: NetworkDataRoutev4 represents an ipv4
route object
properties:
gateway:
description: Gateway is the IPv4 address of the
gateway
properties:
fromIPPool:
description: FromIPPool is the name of the
IPPool to fetch the gateway from
type: string
string:
description: String is the gateway given as
a string
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]))$
type: string
type: object
network:
description: Network is the IPv4 network address
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]))$
type: string
prefix:
description: Prefix is the mask of the network
as integer (max 32)
maximum: 32
type: integer
services:
description: Services is a list of IPv4 services
properties:
dns:
description: DNS is a list of IPv4 DNS services
items:
description: IPAddressv4 is used for validation
of an IPv6 address
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]))$
type: string
type: array
dnsFromIPPool:
description: DNSFromIPPool is the name of
the IPPool from which to get the DNS servers
type: string
type: object
required:
- gateway
- network
type: object
type: array
required:
- id
- ipAddressFromIPPool
- link
type: object
type: array
ipv4DHCP:
description: IPv4 contains a list of IPv4 DHCP allocations
items:
description: NetworkDataIPv4DHCP represents an ipv4 DHCP
network object
properties:
id:
description: ID is the network ID (name)
type: string
link:
description: Link is the link on which the network applies
type: string
routes:
description: Routes contains a list of IPv4 routes
items:
description: NetworkDataRoutev4 represents an ipv4
route object
properties:
gateway:
description: Gateway is the IPv4 address of the
gateway
properties:
fromIPPool:
description: FromIPPool is the name of the
IPPool to fetch the gateway from
type: string
string:
description: String is the gateway given as
a string
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]))$
type: string
type: object
network:
description: Network is the IPv4 network address
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]))$
type: string
prefix:
description: Prefix is the mask of the network
as integer (max 32)
maximum: 32
type: integer
services:
description: Services is a list of IPv4 services
properties:
dns:
description: DNS is a list of IPv4 DNS services
items:
description: IPAddressv4 is used for validation
of an IPv6 address
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]))$
type: string
type: array
dnsFromIPPool:
description: DNSFromIPPool is the name of
the IPPool from which to get the DNS servers
type: string
type: object
required:
- gateway
- network
type: object
type: array
required:
- id
- link
type: object
type: array
ipv6:
description: IPv4 contains a list of IPv6 static allocations
items:
description: NetworkDataIPv6 represents an ipv6 static network
object
properties:
id:
description: ID is the network ID (name)
type: string
ipAddressFromIPPool:
description: IPAddressFromIPPool contains the name of
the IPPool to use to get an ip address
type: string
link:
description: Link is the link on which the network applies
type: string
routes:
description: Routes contains a list of IPv6 routes
items:
description: NetworkDataRoutev6 represents an ipv6
route object
properties:
gateway:
description: Gateway is the IPv6 address of the
gateway
properties:
fromIPPool:
description: FromIPPool is the name of the
IPPool to fetch the gateway from
type: string
string:
description: String is the gateway given as
a string
pattern: ^(([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
network:
description: Network is the IPv6 network address
pattern: ^(([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
prefix:
description: Prefix is the mask of the network
as integer (max 128)
maximum: 128
type: integer
services:
description: Services is a list of IPv6 services
properties:
dns:
description: DNS is a list of IPv6 DNS services
items:
description: IPAddressv6 is used for validation
of an IPv6 address
pattern: ^(([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: array
dnsFromIPPool:
description: DNSFromIPPool is the name of
the IPPool from which to get the DNS servers
type: string
type: object
required:
- gateway
- network
type: object
type: array
required:
- id
- ipAddressFromIPPool
- link
type: object
type: array
ipv6DHCP:
description: IPv4 contains a list of IPv6 DHCP allocations
items:
description: NetworkDataIPv6DHCP represents an ipv6 DHCP
network object
properties:
id:
description: ID is the network ID (name)
type: string
link:
description: Link is the link on which the network applies
type: string
routes:
description: Routes contains a list of IPv6 routes
items:
description: NetworkDataRoutev6 represents an ipv6
route object
properties:
gateway:
description: Gateway is the IPv6 address of the
gateway
properties:
fromIPPool:
description: FromIPPool is the name of the
IPPool to fetch the gateway from
type: string
string:
description: String is the gateway given as
a string
pattern: ^(([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
network:
description: Network is the IPv6 network address
pattern: ^(([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
prefix:
description: Prefix is the mask of the network
as integer (max 128)
maximum: 128
type: integer
services:
description: Services is a list of IPv6 services
properties:
dns:
description: DNS is a list of IPv6 DNS services
items:
description: IPAddressv6 is used for validation
of an IPv6 address
pattern: ^(([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: array
dnsFromIPPool:
description: DNSFromIPPool is the name of
the IPPool from which to get the DNS servers
type: string
type: object
required:
- gateway
- network
type: object
type: array
required:
- id
- link
type: object
type: array
ipv6SLAAC:
description: IPv4 contains a list of IPv6 SLAAC allocations
items:
description: NetworkDataIPv6DHCP represents an ipv6 DHCP
network object
properties:
id:
description: ID is the network ID (name)
type: string
link:
description: Link is the link on which the network applies
type: string
routes:
description: Routes contains a list of IPv6 routes
items:
description: NetworkDataRoutev6 represents an ipv6
route object
properties:
gateway:
description: Gateway is the IPv6 address of the
gateway
properties:
fromIPPool:
description: FromIPPool is the name of the
IPPool to fetch the gateway from
type: string
string:
description: String is the gateway given as
a string
pattern: ^(([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
network:
description: Network is the IPv6 network address
pattern: ^(([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
prefix:
description: Prefix is the mask of the network
as integer (max 128)
maximum: 128
type: integer
services:
description: Services is a list of IPv6 services
properties:
dns:
description: DNS is a list of IPv6 DNS services
items:
description: IPAddressv6 is used for validation
of an IPv6 address
pattern: ^(([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: array
dnsFromIPPool:
description: DNSFromIPPool is the name of
the IPPool from which to get the DNS servers
type: string
type: object
required:
- gateway
- network
type: object
type: array
required:
- id
- link
type: object
type: array
type: object
services:
description: Services is a structure containing lists of different
types objects
properties:
dns:
description: DNS is a list of DNS services
items:
description: IPAddress is used for validation of an IP address
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: array
dnsFromIPPool:
description: DNSFromIPPool is the name of the IPPool from
which to get the DNS servers
type: string
type: object
type: object
required:
- clusterName
type: object
status:
description: Metal3DataTemplateSptatus defines the observed state of Metal3DataTemplate.
properties:
indexes:
additionalProperties:
type: integer
description: Indexes contains the map of Metal3Machine and index used
type: object
lastUpdated:
description: LastUpdated identifies when this status was last observed.
format: date-time
type: string
type: object
type: object
served: true
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@ -0,0 +1,741 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.3.0
creationTimestamp: null
name: metal3machines.infrastructure.cluster.x-k8s.io
spec:
group: infrastructure.cluster.x-k8s.io
names:
categories:
- cluster-api
kind: Metal3Machine
listKind: Metal3MachineList
plural: metal3machines
shortNames:
- m3m
- m3machine
singular: metal3machine
scope: Namespaced
versions:
- additionalPrinterColumns:
- description: Provider ID
jsonPath: .spec.providerID
name: ProviderID
type: string
- description: Machines current phase
jsonPath: .status.phase
name: Phase
type: string
- description: metal3machine is Ready
jsonPath: .status.ready
name: Ready
type: string
- description: Most recent error
jsonPath: .status.errorReason
name: Error
type: string
name: v1alpha2
schema:
openAPIV3Schema:
description: Metal3Machine is the Schema for the metal3machines 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: Metal3MachineSpec defines the desired state of Metal3Machine
properties:
hostSelector:
description: HostSelector specifies matching criteria for labels on
BareMetalHosts. This is used to limit the set of BareMetalHost objects
considered for claiming for a metal3machine.
properties:
matchExpressions:
description: Label match expressions that must be true on a chosen
BareMetalHost
items:
description: HostSelectorRequirement struct
properties:
key:
type: string
operator:
description: Operator represents a key/field's relationship
to value(s). See labels.Requirement and fields.Requirement
for more details.
type: string
values:
items:
type: string
type: array
required:
- key
- operator
- values
type: object
type: array
matchLabels:
additionalProperties:
type: string
description: Key/value pairs of labels that must exist on a chosen
BareMetalHost
type: object
type: object
image:
description: Image is the image to be provisioned.
properties:
checksum:
description: Checksum is a md5sum value or a URL to retrieve one.
type: string
url:
description: URL is a location of an image to deploy.
type: string
required:
- checksum
- url
type: object
providerID:
description: ProviderID will be the Metal3 machine in ProviderID format
(metal3://<bmh-uuid>)
type: string
userData:
description: UserData references the Secret that holds user data needed
by the bare metal operator. The Namespace is optional; it will default
to the metal3machine's namespace if not specified.
properties:
name:
description: Name is unique within a namespace to reference a
secret resource.
type: string
namespace:
description: Namespace defines the space within which the secret
name must be unique.
type: string
type: object
required:
- image
type: object
status:
description: Metal3MachineStatus defines the observed state of Metal3Machine
properties:
addresses:
description: Addresses is a list of addresses assigned to the machine.
This field is copied from the infrastructure provider reference.
items:
description: MachineAddress contains information for the node's
address.
properties:
address:
description: The machine address.
type: string
type:
description: Machine address type, one of Hostname, ExternalIP
or InternalIP.
type: string
required:
- address
- type
type: object
type: array
errorMessage:
description: "ErrorMessage will be set in the event that there is
a terminal problem reconciling the metal3machine and will contain
a more verbose string suitable for logging and human consumption.
\n This field should not be set for transitive errors that a controller
faces that are expected to be fixed automatically over time (like
service outages), but instead indicate that something is fundamentally
wrong with the metal3machine's spec or the configuration of the
controller, and that manual intervention is required. Examples of
terminal errors would be invalid combinations of settings in the
spec, values that are unsupported by the controller, or the responsible
controller itself being critically misconfigured. \n Any transient
errors that occur during the reconciliation of metal3machines can
be added as events to the metal3machine object and/or logged in
the controller's output."
type: string
errorReason:
description: "ErrorReason will be set in the event that there is a
terminal problem reconciling the metal3machine and will contain
a succinct value suitable for machine interpretation. \n This field
should not be set for transitive errors that a controller faces
that are expected to be fixed automatically over time (like service
outages), but instead indicate that something is fundamentally wrong
with the metal3machine's spec or the configuration of the controller,
and that manual intervention is required. Examples of terminal errors
would be invalid combinations of settings in the spec, values that
are unsupported by the controller, or the responsible controller
itself being critically misconfigured. \n Any transient errors that
occur during the reconciliation of metal3machines can be added as
events to the metal3machine object and/or logged in the controller's
output."
type: string
lastUpdated:
description: LastUpdated identifies when this status was last observed.
format: date-time
type: string
phase:
description: Phase represents the current phase of machine actuation.
E.g. Pending, Running, Terminating, Failed etc.
type: string
ready:
description: 'Ready is the state of the metal3. TODO : Document the
variable : mhrivnak: " it would be good to document what this means,
how to interpret it, under what circumstances the value changes,
etc."'
type: boolean
type: object
type: object
served: true
storage: false
subresources:
status: {}
- additionalPrinterColumns:
- description: Provider ID
jsonPath: .spec.providerID
name: ProviderID
type: string
- description: metal3machine is Ready
jsonPath: .status.ready
name: Ready
type: string
- description: Cluster to which this M3Machine belongs
jsonPath: .metadata.labels.cluster\.x-k8s\.io/cluster-name
name: Cluster
type: string
- description: metal3machine current phase
jsonPath: .status.phase
name: Phase
type: string
name: v1alpha3
schema:
openAPIV3Schema:
description: Metal3Machine is the Schema for the metal3machines 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: Metal3MachineSpec defines the desired state of Metal3Machine
properties:
hostSelector:
description: HostSelector specifies matching criteria for labels on
BareMetalHosts. This is used to limit the set of BareMetalHost objects
considered for claiming for a metal3machine.
properties:
matchExpressions:
description: Label match expressions that must be true on a chosen
BareMetalHost
items:
properties:
key:
type: string
operator:
description: Operator represents a key/field's relationship
to value(s). See labels.Requirement and fields.Requirement
for more details.
type: string
values:
items:
type: string
type: array
required:
- key
- operator
- values
type: object
type: array
matchLabels:
additionalProperties:
type: string
description: Key/value pairs of labels that must exist on a chosen
BareMetalHost
type: object
type: object
image:
description: Image is the image to be provisioned.
properties:
checksum:
description: Checksum is a md5sum value or a URL to retrieve one.
type: string
checksumType:
description: ChecksumType is the checksum algorithm for the image.
e.g md5, sha256, sha512
enum:
- md5
- sha256
- sha512
type: string
format:
description: DiskFormat contains the image disk format
enum:
- raw
- qcow2
- vdi
- vmdk
type: string
url:
description: URL is a location of an image to deploy.
type: string
required:
- checksum
- url
type: object
providerID:
description: ProviderID will be the Metal3 machine in ProviderID format
(metal3://<bmh-uuid>)
type: string
userData:
description: UserData references the Secret that holds user data needed
by the bare metal operator. The Namespace is optional; it will default
to the metal3machine's namespace if not specified.
properties:
name:
description: Name is unique within a namespace to reference a
secret resource.
type: string
namespace:
description: Namespace defines the space within which the secret
name must be unique.
type: string
type: object
required:
- image
type: object
status:
description: Metal3MachineStatus defines the observed state of Metal3Machine
properties:
addresses:
description: Addresses is a list of addresses assigned to the machine.
This field is copied from the infrastructure provider reference.
items:
description: MachineAddress contains information for the node's
address.
properties:
address:
description: The machine address.
type: string
type:
description: Machine address type, one of Hostname, ExternalIP
or InternalIP.
type: string
required:
- address
- type
type: object
type: array
failureMessage:
description: "FailureMessage will be set in the event that there is
a terminal problem reconciling the metal3machine and will contain
a more verbose string suitable for logging and human consumption.
\n This field should not be set for transitive errors that a controller
faces that are expected to be fixed automatically over time (like
service outages), but instead indicate that something is fundamentally
wrong with the metal3machine's spec or the configuration of the
controller, and that manual intervention is required. Examples of
terminal errors would be invalid combinations of settings in the
spec, values that are unsupported by the controller, or the responsible
controller itself being critically misconfigured. \n Any transient
errors that occur during the reconciliation of metal3machines can
be added as events to the metal3machine object and/or logged in
the controller's output."
type: string
failureReason:
description: "FailureReason will be set in the event that there is
a terminal problem reconciling the metal3machine and will contain
a succinct value suitable for machine interpretation. \n This field
should not be set for transitive errors that a controller faces
that are expected to be fixed automatically over time (like service
outages), but instead indicate that something is fundamentally wrong
with the metal3machine's spec or the configuration of the controller,
and that manual intervention is required. Examples of terminal errors
would be invalid combinations of settings in the spec, values that
are unsupported by the controller, or the responsible controller
itself being critically misconfigured. \n Any transient errors that
occur during the reconciliation of metal3machines can be added as
events to the metal3machine object and/or logged in the controller's
output."
type: string
lastUpdated:
description: LastUpdated identifies when this status was last observed.
format: date-time
type: string
phase:
description: Phase represents the current phase of machine actuation.
E.g. Pending, Running, Terminating, Failed etc.
type: string
ready:
description: 'Ready is the state of the metal3. TODO : Document the
variable : mhrivnak: " it would be good to document what this means,
how to interpret it, under what circumstances the value changes,
etc."'
type: boolean
type: object
type: object
served: true
storage: false
subresources:
status: {}
- additionalPrinterColumns:
- description: Provider ID
jsonPath: .spec.providerID
name: ProviderID
type: string
- description: metal3machine is Ready
jsonPath: .status.ready
name: Ready
type: string
- description: Cluster to which this M3Machine belongs
jsonPath: .metadata.labels.cluster\.x-k8s\.io/cluster-name
name: Cluster
type: string
- description: metal3machine current phase
jsonPath: .status.phase
name: Phase
type: string
name: v1alpha4
schema:
openAPIV3Schema:
description: Metal3Machine is the Schema for the metal3machines 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: Metal3MachineSpec defines the desired state of Metal3Machine
properties:
dataTemplate:
description: MetadataTemplate is a reference to a Metal3DataTemplate
object containing a template of metadata to be rendered. Metadata
keys defined in the metadataTemplate take precendence over keys
defined in metadata field.
properties:
apiVersion:
description: API version of the referent.
type: string
fieldPath:
description: 'If referring to a piece of an object instead of
an entire object, this string should contain a valid JSON/Go
field access statement, such as desiredState.manifest.containers[2].
For example, if the object reference is to a container within
a pod, this would take on a value like: "spec.containers{name}"
(where "name" refers to the name of the container that triggered
the event) or if no container name is specified "spec.containers[2]"
(container with index 2 in this pod). This syntax is chosen
only to have some well-defined way of referencing a part of
an object. TODO: this design is not final and this field is
subject to change in the future.'
type: string
kind:
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
type: string
namespace:
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
type: string
resourceVersion:
description: 'Specific resourceVersion to which this reference
is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
type: string
uid:
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
type: string
type: object
hostSelector:
description: HostSelector specifies matching criteria for labels on
BareMetalHosts. This is used to limit the set of BareMetalHost objects
considered for claiming for a metal3machine.
properties:
matchExpressions:
description: Label match expressions that must be true on a chosen
BareMetalHost
items:
properties:
key:
type: string
operator:
description: Operator represents a key/field's relationship
to value(s). See labels.Requirement and fields.Requirement
for more details.
type: string
values:
items:
type: string
type: array
required:
- key
- operator
- values
type: object
type: array
matchLabels:
additionalProperties:
type: string
description: Key/value pairs of labels that must exist on a chosen
BareMetalHost
type: object
type: object
image:
description: Image is the image to be provisioned.
properties:
checksum:
description: Checksum is a md5sum value or a URL to retrieve one.
type: string
checksumType:
description: ChecksumType is the checksum algorithm for the image.
e.g md5, sha256, sha512
enum:
- md5
- sha256
- sha512
type: string
format:
description: DiskFormat contains the image disk format
enum:
- raw
- qcow2
- vdi
- vmdk
type: string
url:
description: URL is a location of an image to deploy.
type: string
required:
- checksum
- url
type: object
metaData:
description: MetaData is an object storing the reference to the secret
containing the Metadata given by the user.
properties:
name:
description: Name is unique within a namespace to reference a
secret resource.
type: string
namespace:
description: Namespace defines the space within which the secret
name must be unique.
type: string
type: object
networkData:
description: NetworkData is an object storing the reference to the
secret containing the network data given by the user.
properties:
name:
description: Name is unique within a namespace to reference a
secret resource.
type: string
namespace:
description: Namespace defines the space within which the secret
name must be unique.
type: string
type: object
providerID:
description: ProviderID will be the Metal3 machine in ProviderID format
(metal3://<bmh-uuid>)
type: string
userData:
description: UserData references the Secret that holds user data needed
by the bare metal operator. The Namespace is optional; it will default
to the metal3machine's namespace if not specified.
properties:
name:
description: Name is unique within a namespace to reference a
secret resource.
type: string
namespace:
description: Namespace defines the space within which the secret
name must be unique.
type: string
type: object
required:
- image
type: object
status:
description: Metal3MachineStatus defines the observed state of Metal3Machine
properties:
addresses:
description: Addresses is a list of addresses assigned to the machine.
This field is copied from the infrastructure provider reference.
items:
description: MachineAddress contains information for the node's
address.
properties:
address:
description: The machine address.
type: string
type:
description: Machine address type, one of Hostname, ExternalIP
or InternalIP.
type: string
required:
- address
- type
type: object
type: array
failureMessage:
description: "FailureMessage will be set in the event that there is
a terminal problem reconciling the metal3machine and will contain
a more verbose string suitable for logging and human consumption.
\n This field should not be set for transitive errors that a controller
faces that are expected to be fixed automatically over time (like
service outages), but instead indicate that something is fundamentally
wrong with the metal3machine's spec or the configuration of the
controller, and that manual intervention is required. Examples of
terminal errors would be invalid combinations of settings in the
spec, values that are unsupported by the controller, or the responsible
controller itself being critically misconfigured. \n Any transient
errors that occur during the reconciliation of metal3machines can
be added as events to the metal3machine object and/or logged in
the controller's output."
type: string
failureReason:
description: "FailureReason will be set in the event that there is
a terminal problem reconciling the metal3machine and will contain
a succinct value suitable for machine interpretation. \n This field
should not be set for transitive errors that a controller faces
that are expected to be fixed automatically over time (like service
outages), but instead indicate that something is fundamentally wrong
with the metal3machine's spec or the configuration of the controller,
and that manual intervention is required. Examples of terminal errors
would be invalid combinations of settings in the spec, values that
are unsupported by the controller, or the responsible controller
itself being critically misconfigured. \n Any transient errors that
occur during the reconciliation of metal3machines can be added as
events to the metal3machine object and/or logged in the controller's
output."
type: string
lastUpdated:
description: LastUpdated identifies when this status was last observed.
format: date-time
type: string
metaData:
description: MetaData is an object storing the reference to the secret
containing the Metadata used to deploy the BareMetalHost.
properties:
name:
description: Name is unique within a namespace to reference a
secret resource.
type: string
namespace:
description: Namespace defines the space within which the secret
name must be unique.
type: string
type: object
networkData:
description: NetworkData is an object storing the reference to the
secret containing the network data used to deploy the BareMetalHost.
properties:
name:
description: Name is unique within a namespace to reference a
secret resource.
type: string
namespace:
description: Namespace defines the space within which the secret
name must be unique.
type: string
type: object
phase:
description: Phase represents the current phase of machine actuation.
E.g. Pending, Running, Terminating, Failed etc.
type: string
ready:
description: 'Ready is the state of the metal3. TODO : Document the
variable : mhrivnak: " it would be good to document what this means,
how to interpret it, under what circumstances the value changes,
etc."'
type: boolean
renderedData:
description: RenderedData is a reference to a rendered Metal3Data
object containing the references to metaData and networkData secrets.
properties:
apiVersion:
description: API version of the referent.
type: string
fieldPath:
description: 'If referring to a piece of an object instead of
an entire object, this string should contain a valid JSON/Go
field access statement, such as desiredState.manifest.containers[2].
For example, if the object reference is to a container within
a pod, this would take on a value like: "spec.containers{name}"
(where "name" refers to the name of the container that triggered
the event) or if no container name is specified "spec.containers[2]"
(container with index 2 in this pod). This syntax is chosen
only to have some well-defined way of referencing a part of
an object. TODO: this design is not final and this field is
subject to change in the future.'
type: string
kind:
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
type: string
namespace:
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
type: string
resourceVersion:
description: 'Specific resourceVersion to which this reference
is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
type: string
uid:
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
type: string
type: object
userData:
description: UserData references the Secret that holds user data needed
by the bare metal operator. The Namespace is optional; it will default
to the metal3machine's namespace if not specified.
properties:
name:
description: Name is unique within a namespace to reference a
secret resource.
type: string
namespace:
description: Namespace defines the space within which the secret
name must be unique.
type: string
type: object
type: object
type: object
served: true
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@ -0,0 +1,449 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.3.0
creationTimestamp: null
name: metal3machinetemplates.infrastructure.cluster.x-k8s.io
spec:
group: infrastructure.cluster.x-k8s.io
names:
categories:
- cluster-api
kind: Metal3MachineTemplate
listKind: Metal3MachineTemplateList
plural: metal3machinetemplates
singular: metal3machinetemplate
scope: Namespaced
versions:
- name: v1alpha2
schema:
openAPIV3Schema:
description: Metal3MachineTemplate is the Schema for the metal3machinetemplates
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: Metal3MachineTemplateSpec defines the desired state of Metal3MachineTemplate
properties:
template:
description: Metal3MachineTemplateResource describes the data needed
to create a Metal3Machine from a template
properties:
spec:
description: Spec is the specification of the desired behavior
of the machine.
properties:
hostSelector:
description: HostSelector specifies matching criteria for
labels on BareMetalHosts. This is used to limit the set
of BareMetalHost objects considered for claiming for a metal3machine.
properties:
matchExpressions:
description: Label match expressions that must be true
on a chosen BareMetalHost
items:
description: HostSelectorRequirement struct
properties:
key:
type: string
operator:
description: Operator represents a key/field's relationship
to value(s). See labels.Requirement and fields.Requirement
for more details.
type: string
values:
items:
type: string
type: array
required:
- key
- operator
- values
type: object
type: array
matchLabels:
additionalProperties:
type: string
description: Key/value pairs of labels that must exist
on a chosen BareMetalHost
type: object
type: object
image:
description: Image is the image to be provisioned.
properties:
checksum:
description: Checksum is a md5sum value or a URL to retrieve
one.
type: string
url:
description: URL is a location of an image to deploy.
type: string
required:
- checksum
- url
type: object
providerID:
description: ProviderID will be the Metal3 machine in ProviderID
format (metal3://<bmh-uuid>)
type: string
userData:
description: UserData references the Secret that holds user
data needed by the bare metal operator. The Namespace is
optional; it will default to the metal3machine's namespace
if not specified.
properties:
name:
description: Name is unique within a namespace to reference
a secret resource.
type: string
namespace:
description: Namespace defines the space within which
the secret name must be unique.
type: string
type: object
required:
- image
type: object
required:
- spec
type: object
required:
- template
type: object
type: object
served: true
storage: false
- name: v1alpha3
schema:
openAPIV3Schema:
description: Metal3MachineTemplate is the Schema for the metal3machinetemplates
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: Metal3MachineTemplateSpec defines the desired state of Metal3MachineTemplate
properties:
template:
description: Metal3MachineTemplateResource describes the data needed
to create a Metal3Machine from a template
properties:
spec:
description: Spec is the specification of the desired behavior
of the machine.
properties:
hostSelector:
description: HostSelector specifies matching criteria for
labels on BareMetalHosts. This is used to limit the set
of BareMetalHost objects considered for claiming for a metal3machine.
properties:
matchExpressions:
description: Label match expressions that must be true
on a chosen BareMetalHost
items:
properties:
key:
type: string
operator:
description: Operator represents a key/field's relationship
to value(s). See labels.Requirement and fields.Requirement
for more details.
type: string
values:
items:
type: string
type: array
required:
- key
- operator
- values
type: object
type: array
matchLabels:
additionalProperties:
type: string
description: Key/value pairs of labels that must exist
on a chosen BareMetalHost
type: object
type: object
image:
description: Image is the image to be provisioned.
properties:
checksum:
description: Checksum is a md5sum value or a URL to retrieve
one.
type: string
checksumType:
description: ChecksumType is the checksum algorithm for
the image. e.g md5, sha256, sha512
enum:
- md5
- sha256
- sha512
type: string
format:
description: DiskFormat contains the image disk format
enum:
- raw
- qcow2
- vdi
- vmdk
type: string
url:
description: URL is a location of an image to deploy.
type: string
required:
- checksum
- url
type: object
providerID:
description: ProviderID will be the Metal3 machine in ProviderID
format (metal3://<bmh-uuid>)
type: string
userData:
description: UserData references the Secret that holds user
data needed by the bare metal operator. The Namespace is
optional; it will default to the metal3machine's namespace
if not specified.
properties:
name:
description: Name is unique within a namespace to reference
a secret resource.
type: string
namespace:
description: Namespace defines the space within which
the secret name must be unique.
type: string
type: object
required:
- image
type: object
required:
- spec
type: object
required:
- template
type: object
type: object
served: true
storage: false
- name: v1alpha4
schema:
openAPIV3Schema:
description: Metal3MachineTemplate is the Schema for the metal3machinetemplates
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: Metal3MachineTemplateSpec defines the desired state of Metal3MachineTemplate
properties:
template:
description: Metal3MachineTemplateResource describes the data needed
to create a Metal3Machine from a template
properties:
spec:
description: Spec is the specification of the desired behavior
of the machine.
properties:
dataTemplate:
description: MetadataTemplate is a reference to a Metal3DataTemplate
object containing a template of metadata to be rendered.
Metadata keys defined in the metadataTemplate take precendence
over keys defined in metadata field.
properties:
apiVersion:
description: API version of the referent.
type: string
fieldPath:
description: 'If referring to a piece of an object instead
of an entire object, this string should contain a valid
JSON/Go field access statement, such as desiredState.manifest.containers[2].
For example, if the object reference is to a container
within a pod, this would take on a value like: "spec.containers{name}"
(where "name" refers to the name of the container that
triggered the event) or if no container name is specified
"spec.containers[2]" (container with index 2 in this
pod). This syntax is chosen only to have some well-defined
way of referencing a part of an object. TODO: this design
is not final and this field is subject to change in
the future.'
type: string
kind:
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
type: string
namespace:
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
type: string
resourceVersion:
description: 'Specific resourceVersion to which this reference
is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
type: string
uid:
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
type: string
type: object
hostSelector:
description: HostSelector specifies matching criteria for
labels on BareMetalHosts. This is used to limit the set
of BareMetalHost objects considered for claiming for a metal3machine.
properties:
matchExpressions:
description: Label match expressions that must be true
on a chosen BareMetalHost
items:
properties:
key:
type: string
operator:
description: Operator represents a key/field's relationship
to value(s). See labels.Requirement and fields.Requirement
for more details.
type: string
values:
items:
type: string
type: array
required:
- key
- operator
- values
type: object
type: array
matchLabels:
additionalProperties:
type: string
description: Key/value pairs of labels that must exist
on a chosen BareMetalHost
type: object
type: object
image:
description: Image is the image to be provisioned.
properties:
checksum:
description: Checksum is a md5sum value or a URL to retrieve
one.
type: string
checksumType:
description: ChecksumType is the checksum algorithm for
the image. e.g md5, sha256, sha512
enum:
- md5
- sha256
- sha512
type: string
format:
description: DiskFormat contains the image disk format
enum:
- raw
- qcow2
- vdi
- vmdk
type: string
url:
description: URL is a location of an image to deploy.
type: string
required:
- checksum
- url
type: object
metaData:
description: MetaData is an object storing the reference to
the secret containing the Metadata given by the user.
properties:
name:
description: Name is unique within a namespace to reference
a secret resource.
type: string
namespace:
description: Namespace defines the space within which
the secret name must be unique.
type: string
type: object
networkData:
description: NetworkData is an object storing the reference
to the secret containing the network data given by the user.
properties:
name:
description: Name is unique within a namespace to reference
a secret resource.
type: string
namespace:
description: Namespace defines the space within which
the secret name must be unique.
type: string
type: object
providerID:
description: ProviderID will be the Metal3 machine in ProviderID
format (metal3://<bmh-uuid>)
type: string
userData:
description: UserData references the Secret that holds user
data needed by the bare metal operator. The Namespace is
optional; it will default to the metal3machine's namespace
if not specified.
properties:
name:
description: Name is unique within a namespace to reference
a secret resource.
type: string
namespace:
description: Namespace defines the space within which
the secret name must be unique.
type: string
type: object
required:
- image
type: object
required:
- spec
type: object
required:
- template
type: object
type: object
served: true
storage: true
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@ -0,0 +1,43 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
# This kustomization.yaml is not intended to be run by itself,
# since it depends on service name and namespace that are out of this kustomize package.
# It should be run by config/default
commonLabels:
cluster.x-k8s.io/v1alpha2: v1alpha2
cluster.x-k8s.io/v1alpha3: v1alpha3_v1alpha4
resources:
- bases/infrastructure.cluster.x-k8s.io_metal3clusters.yaml
- bases/infrastructure.cluster.x-k8s.io_metal3machines.yaml
- bases/infrastructure.cluster.x-k8s.io_metal3machinetemplates.yaml
- bases/infrastructure.cluster.x-k8s.io_metal3datatemplates.yaml
- bases/infrastructure.cluster.x-k8s.io_metal3datas.yaml
- bases/infrastructure.cluster.x-k8s.io_metal3dataclaims.yaml
# +kubebuilder:scaffold:crdkustomizeresource
patchesStrategicMerge:
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix.
# patches here are for enabling the conversion webhook for each CRD
- patches/webhook_in_metal3machines.yaml
- patches/webhook_in_metal3clusters.yaml
- patches/webhook_in_metal3machinetemplates.yaml
- patches/webhook_in_metal3datatemplates.yaml
- patches/webhook_in_metal3datas.yaml
- patches/webhook_in_metal3dataclaims.yaml
# +kubebuilder:scaffold:crdkustomizewebhookpatch
# [CERTMANAGER] To enable webhook, uncomment all the sections with [CERTMANAGER] prefix.
# patches here are for enabling the CA injection for each CRD
- patches/cainjection_in_metal3machines.yaml
- patches/cainjection_in_metal3clusters.yaml
- patches/cainjection_in_metal3machinetemplates.yaml
- patches/cainjection_in_metal3datatemplates.yaml
- patches/cainjection_in_metal3datas.yaml
- patches/cainjection_in_metal3dataclaims.yaml
# +kubebuilder:scaffold:crdkustomizecainjectionpatch
# the following config is for teaching kustomize how to do kustomization for CRDs.
configurations:
- kustomizeconfig.yaml

View File

@ -0,0 +1,17 @@
# This file is for teaching kustomize how to substitute name and namespace reference in CRD
nameReference:
- kind: Service
version: v1
fieldSpecs:
- kind: CustomResourceDefinition
group: apiextensions.k8s.io
path: spec/conversion/webhook/clientConfig/service/name
namespace:
- kind: CustomResourceDefinition
group: apiextensions.k8s.io
path: spec/conversion/webhook/clientConfig/service/namespace
create: false
varReference:
- path: metadata/annotations

View File

@ -0,0 +1,8 @@
# The following patch adds a directive for certmanager to inject CA into the CRD
# CRD conversion requires k8s 1.13 or later.
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
name: metal3clusters.infrastructure.cluster.x-k8s.io

View File

@ -0,0 +1,8 @@
# The following patch adds a directive for certmanager to inject CA into the CRD
# CRD conversion requires k8s 1.13 or later.
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
name: metal3dataclaims.infrastructure.cluster.x-k8s.io

View File

@ -0,0 +1,8 @@
# The following patch adds a directive for certmanager to inject CA into the CRD
# CRD conversion requires k8s 1.13 or later.
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
name: metal3datas.infrastructure.cluster.x-k8s.io

View File

@ -0,0 +1,8 @@
# The following patch adds a directive for certmanager to inject CA into the CRD
# CRD conversion requires k8s 1.13 or later.
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
name: metal3datatemplates.infrastructure.cluster.x-k8s.io

View File

@ -0,0 +1,8 @@
# The following patch adds a directive for certmanager to inject CA into the CRD
# CRD conversion requires k8s 1.13 or later.
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
name: metal3machines.infrastructure.cluster.x-k8s.io

View File

@ -0,0 +1,8 @@
# The following patch adds a directive for certmanager to inject CA into the CRD
# CRD conversion requires k8s 1.13 or later.
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
name: metal3machinetemplates.infrastructure.cluster.x-k8s.io

View File

@ -0,0 +1,19 @@
# The following patch enables conversion webhook for CRD
# CRD conversion requires k8s 1.13 or later.
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: metal3clusters.infrastructure.cluster.x-k8s.io
spec:
conversion:
strategy: Webhook
webhook:
conversionReviewVersions: ["v1", "v1beta1"]
clientConfig:
# this is "\n" used as a placeholder, otherwise it will be rejected by the apiserver for being blank,
# but we're going to set it later using the cert-manager (or potentially a patch if not using cert-manager)
caBundle: Cg==
service:
namespace: system
name: webhook-service
path: /convert

View File

@ -0,0 +1,19 @@
# The following patch enables conversion webhook for CRD
# CRD conversion requires k8s 1.13 or later.
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: metal3dataclaims.infrastructure.cluster.x-k8s.io
spec:
conversion:
strategy: Webhook
webhook:
conversionReviewVersions: ["v1", "v1beta1"]
clientConfig:
# this is "\n" used as a placeholder, otherwise it will be rejected by the apiserver for being blank,
# but we're going to set it later using the cert-manager (or potentially a patch if not using cert-manager)
caBundle: Cg==
service:
namespace: system
name: webhook-service
path: /convert

View File

@ -0,0 +1,19 @@
# The following patch enables conversion webhook for CRD
# CRD conversion requires k8s 1.13 or later.
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: metal3datas.infrastructure.cluster.x-k8s.io
spec:
conversion:
strategy: Webhook
webhook:
conversionReviewVersions: ["v1", "v1beta1"]
clientConfig:
# this is "\n" used as a placeholder, otherwise it will be rejected by the apiserver for being blank,
# but we're going to set it later using the cert-manager (or potentially a patch if not using cert-manager)
caBundle: Cg==
service:
namespace: system
name: webhook-service
path: /convert

View File

@ -0,0 +1,19 @@
# The following patch enables conversion webhook for CRD
# CRD conversion requires k8s 1.13 or later.
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: metal3datatemplates.infrastructure.cluster.x-k8s.io
spec:
conversion:
strategy: Webhook
webhook:
conversionReviewVersions: ["v1", "v1beta1"]
clientConfig:
# this is "\n" used as a placeholder, otherwise it will be rejected by the apiserver for being blank,
# but we're going to set it later using the cert-manager (or potentially a patch if not using cert-manager)
caBundle: Cg==
service:
namespace: system
name: webhook-service
path: /convert

View File

@ -0,0 +1,19 @@
# The following patch enables conversion webhook for CRD
# CRD conversion requires k8s 1.13 or later.
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: metal3machines.infrastructure.cluster.x-k8s.io
spec:
conversion:
strategy: Webhook
webhook:
conversionReviewVersions: ["v1", "v1beta1"]
clientConfig:
# this is "\n" used as a placeholder, otherwise it will be rejected by the apiserver for being blank,
# but we're going to set it later using the cert-manager (or potentially a patch if not using cert-manager)
caBundle: Cg==
service:
namespace: system
name: webhook-service
path: /convert

View File

@ -0,0 +1,19 @@
# The following patch enables conversion webhook for CRD
# CRD conversion requires k8s 1.13 or later.
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: metal3machinetemplates.infrastructure.cluster.x-k8s.io
spec:
conversion:
strategy: Webhook
webhook:
conversionReviewVersions: ["v1", "v1beta1"]
clientConfig:
# this is "\n" used as a placeholder, otherwise it will be rejected by the apiserver for being blank,
# but we're going to set it later using the cert-manager (or potentially a patch if not using cert-manager)
caBundle: Cg==
service:
namespace: system
name: webhook-service
path: /convert

View File

@ -0,0 +1,2 @@
resources:
- metadata.yaml

View File

@ -0,0 +1,11 @@
---
apiVersion: clusterctl.cluster.x-k8s.io/v1alpha3
kind: Metadata
metadata:
name: repository-metadata
labels:
airshipit.org/deploy-k8s: "false"
releaseSeries:
- major: 0
minor: 4
contract: v1alpha3

View File

@ -0,0 +1,12 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
# Adds namespace to all resources.
namespace: capm3-system
resources:
- namespace.yaml
bases:
- ../rbac
- ../manager

View File

@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: system

View File

@ -0,0 +1,25 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: ipam-controller-manager
namespace: capm3-system
spec:
template:
spec:
containers:
# Change the value of image field below to your controller image URL
- image: quay.io/metal3-io/ip-address-manager:v0.0.4
name: manager
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: ipam-controller-manager
namespace: capi-webhook-system
spec:
template:
spec:
containers:
# Change the value of image field below to your controller image URL
- image: quay.io/metal3-io/ip-address-manager:v0.0.4
name: manager

View File

@ -0,0 +1,10 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
# When updating the release, update also the image tag in image_patch.yaml
resources:
- https://github.com/metal3-io/ip-address-manager/releases/download/v0.0.4/ipam-components.yaml
patchesStrategicMerge:
- image_patch.yaml
- pull_policy_patch.yaml

View File

@ -0,0 +1,23 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: ipam-controller-manager
namespace: capm3-system
spec:
template:
spec:
containers:
- name: manager
imagePullPolicy: IfNotPresent
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: ipam-controller-manager
namespace: capi-webhook-system
spec:
template:
spec:
containers:
- name: manager
imagePullPolicy: IfNotPresent

View File

@ -0,0 +1,49 @@
namePrefix: capm3-
commonLabels:
cluster.x-k8s.io/provider: "infrastructure-metal3"
bases:
- crd
- webhook # Disable this if you're not using the webhook functionality.
- default
- data
- ipam
patchesJson6902:
- target: # NOTE: This patch needs to be repeatd for EACH CustomResourceDefinition you have under crd/bases.
group: apiextensions.k8s.io
version: v1
kind: CustomResourceDefinition
name: metal3clusters.infrastructure.cluster.x-k8s.io
path: patch_crd_webhook_namespace.yaml
- target:
group: apiextensions.k8s.io
version: v1
kind: CustomResourceDefinition
name: metal3machines.infrastructure.cluster.x-k8s.io
path: patch_crd_webhook_namespace.yaml
- target:
group: apiextensions.k8s.io
version: v1
kind: CustomResourceDefinition
name: metal3machinetemplates.infrastructure.cluster.x-k8s.io
path: patch_crd_webhook_namespace.yaml
- target:
group: apiextensions.k8s.io
version: v1
kind: CustomResourceDefinition
name: metal3datatemplates.infrastructure.cluster.x-k8s.io
path: patch_crd_webhook_namespace.yaml
- target:
group: apiextensions.k8s.io
version: v1
kind: CustomResourceDefinition
name: metal3datas.infrastructure.cluster.x-k8s.io
path: patch_crd_webhook_namespace.yaml
- target:
group: apiextensions.k8s.io
version: v1
kind: CustomResourceDefinition
name: metal3dataclaims.infrastructure.cluster.x-k8s.io
path: patch_crd_webhook_namespace.yaml

View File

@ -0,0 +1,13 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- manager.yaml
generatorOptions:
disableNameSuffixHash: true
patchesStrategicMerge:
- manager_image_patch.yaml
- manager_pull_policy.yaml
- manager_auth_proxy_patch.yaml

View File

@ -0,0 +1,46 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: controller-manager
namespace: system
labels:
control-plane: controller-manager
controller-tools.k8s.io: "1.0"
spec:
selector:
matchLabels:
control-plane: controller-manager
controller-tools.k8s.io: "1.0"
template:
metadata:
labels:
control-plane: controller-manager
controller-tools.k8s.io: "1.0"
spec:
containers:
- command:
- /manager
image: controller:latest
imagePullPolicy: IfNotPresent
name: manager
env:
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
ports:
- containerPort: 9440
name: healthz
protocol: TCP
readinessProbe:
httpGet:
path: /readyz
port: healthz
livenessProbe:
httpGet:
path: /healthz
port: healthz
terminationGracePeriodSeconds: 10
tolerations:
- effect: NoSchedule
key: node-role.kubernetes.io/master

View File

@ -0,0 +1,25 @@
# This patch inject a sidecar container which is a HTTP proxy for the controller manager,
# it performs RBAC authorization against the Kubernetes API using SubjectAccessReviews.
apiVersion: apps/v1
kind: Deployment
metadata:
name: controller-manager
namespace: system
spec:
template:
spec:
containers:
- name: kube-rbac-proxy
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.4.0
args:
- "--secure-listen-address=0.0.0.0:8443"
- "--upstream=http://127.0.0.1:8080/"
- "--logtostderr=true"
- "--v=10"
ports:
- containerPort: 8443
name: https
- name: manager
args:
- "--metrics-addr=127.0.0.1:8080"
- "--enable-leader-election"

View File

@ -0,0 +1,12 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: controller-manager
namespace: system
spec:
template:
spec:
containers:
# Change the value of image field below to your controller image URL
- image: quay.io/metal3-io/cluster-api-provider-metal3:master
name: manager

View File

@ -0,0 +1,19 @@
# This patch enables Prometheus scraping for the manager pod.
apiVersion: apps/v1
kind: Deployment
metadata:
name: controller-manager
namespace: system
spec:
template:
metadata:
annotations:
prometheus.io/scrape: 'true'
spec:
containers:
# Expose the prometheus metrics on default port
- name: manager
ports:
- containerPort: 8080
name: metrics
protocol: TCP

View File

@ -0,0 +1,11 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: controller-manager
namespace: system
spec:
template:
spec:
containers:
- name: manager
imagePullPolicy: IfNotPresent

View File

@ -0,0 +1,3 @@
- op: replace
path: "/spec/conversion/webhook/clientConfig/service/namespace"
value: capi-webhook-system

View File

@ -0,0 +1,13 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: proxy-role
rules:
- apiGroups: ["authentication.k8s.io"]
resources:
- tokenreviews
verbs: ["create"]
- apiGroups: ["authorization.k8s.io"]
resources:
- subjectaccessreviews
verbs: ["create"]

View File

@ -0,0 +1,12 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: proxy-rolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: proxy-role
subjects:
- kind: ServiceAccount
name: default
namespace: system

View File

@ -0,0 +1,18 @@
apiVersion: v1
kind: Service
metadata:
annotations:
prometheus.io/port: "8443"
prometheus.io/scheme: https
prometheus.io/scrape: "true"
labels:
control-plane: controller-manager
name: controller-metrics-service
namespace: system
spec:
ports:
- name: https
port: 8443
targetPort: https
selector:
control-plane: controller-manager

View File

@ -0,0 +1,10 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- role.yaml
- role_binding.yaml
- auth_proxy_service.yaml
- auth_proxy_role.yaml
- auth_proxy_role_binding.yaml
- leader_election_role_binding.yaml
- leader_election_role.yaml

View File

@ -0,0 +1,32 @@
# permissions to do leader election.
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: leader-election-role
rules:
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- configmaps/status
verbs:
- get
- update
- patch
- apiGroups:
- ""
resources:
- events
verbs:
- create

View File

@ -0,0 +1,12 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: leader-election-rolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: leader-election-role
subjects:
- kind: ServiceAccount
name: default
namespace: system

View File

@ -0,0 +1,215 @@
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
name: manager-role
rules:
- apiGroups:
- ""
resources:
- events
verbs:
- create
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
- secrets
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- cluster.x-k8s.io
resources:
- clusters
verbs:
- get
- list
- watch
- apiGroups:
- cluster.x-k8s.io
resources:
- clusters
- clusters/status
verbs:
- get
- list
- watch
- apiGroups:
- cluster.x-k8s.io
resources:
- clusters/status
verbs:
- get
- apiGroups:
- cluster.x-k8s.io
resources:
- machines
- machines/status
verbs:
- get
- list
- watch
- apiGroups:
- infrastructure.cluster.x-k8s.io
resources:
- metal3clusters
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- infrastructure.cluster.x-k8s.io
resources:
- metal3clusters/status
verbs:
- get
- patch
- update
- apiGroups:
- infrastructure.cluster.x-k8s.io
resources:
- metal3dataclaims
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- infrastructure.cluster.x-k8s.io
resources:
- metal3dataclaims/status
verbs:
- get
- patch
- update
- apiGroups:
- infrastructure.cluster.x-k8s.io
resources:
- metal3datas
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- infrastructure.cluster.x-k8s.io
resources:
- metal3datas/status
verbs:
- get
- patch
- update
- apiGroups:
- infrastructure.cluster.x-k8s.io
resources:
- metal3datatemplates
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- infrastructure.cluster.x-k8s.io
resources:
- metal3datatemplates/status
verbs:
- get
- patch
- update
- apiGroups:
- infrastructure.cluster.x-k8s.io
resources:
- metal3ipaddresses
verbs:
- get
- list
- watch
- apiGroups:
- infrastructure.cluster.x-k8s.io
resources:
- metal3ipaddresses/status
verbs:
- get
- apiGroups:
- infrastructure.cluster.x-k8s.io
resources:
- metal3ipclaims
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- infrastructure.cluster.x-k8s.io
resources:
- metal3ipclaims/status
verbs:
- get
- apiGroups:
- infrastructure.cluster.x-k8s.io
resources:
- metal3machines
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- infrastructure.cluster.x-k8s.io
resources:
- metal3machines/status
verbs:
- get
- patch
- update
- apiGroups:
- metal3.io
resources:
- baremetalhosts
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- metal3.io
resources:
- baremetalhosts/status
verbs:
- get
- patch
- update

View File

@ -0,0 +1,12 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: manager-rolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: manager-role
subjects:
- kind: ServiceAccount
name: default
namespace: system

View File

@ -0,0 +1,42 @@
namespace: capi-webhook-system
resources:
- manifests.yaml
- service.yaml
- ../certmanager
- ../manager
configurations:
- kustomizeconfig.yaml
patchesStrategicMerge:
- manager_webhook_patch.yaml
- webhookcainjection_patch.yaml # Disable this value if you don't have any defaulting or validation webhook. If you don't know, you can check if the manifests.yaml file in the same directory has any contents.
vars:
- name: CERTIFICATE_NAMESPACE # namespace of the certificate CR
objref:
kind: Certificate
group: cert-manager.io
version: v1alpha2
name: serving-cert # this name should match the one in certificate.yaml
fieldref:
fieldpath: metadata.namespace
- name: CERTIFICATE_NAME
objref:
kind: Certificate
group: cert-manager.io
version: v1alpha2
name: serving-cert # this name should match the one in certificate.yaml
- name: SERVICE_NAMESPACE # namespace of the service
objref:
kind: Service
version: v1
name: webhook-service
fieldref:
fieldpath: metadata.namespace
- name: SERVICE_NAME
objref:
kind: Service
version: v1
name: webhook-service

View File

@ -0,0 +1,27 @@
# the following config is for teaching kustomize where to look at when substituting vars.
# It requires kustomize v2.1.0 or newer to work properly.
nameReference:
- kind: Service
version: v1
fieldSpecs:
- kind: MutatingWebhookConfiguration
group: admissionregistration.k8s.io
path: webhooks/clientConfig/service/name
- kind: ValidatingWebhookConfiguration
group: admissionregistration.k8s.io
path: webhooks/clientConfig/service/name
namespace:
- kind: MutatingWebhookConfiguration
group: admissionregistration.k8s.io
path: webhooks/clientConfig/service/namespace
create: true
- kind: ValidatingWebhookConfiguration
group: admissionregistration.k8s.io
path: webhooks/clientConfig/service/namespace
create: true
varReference:
- path: metadata/annotations
- kind: Deployment
path: spec/template/spec/volumes/secret/secretName

View File

@ -0,0 +1,26 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: controller-manager
namespace: system
spec:
template:
spec:
containers:
- name: manager
args:
- "--metrics-addr=127.0.0.1:8080"
- "--webhook-port=9443"
ports:
- containerPort: 9443
name: webhook-server
protocol: TCP
volumeMounts:
- mountPath: /tmp/k8s-webhook-server/serving-certs
name: cert
readOnly: true
volumes:
- name: cert
secret:
defaultMode: 420
secretName: $(SERVICE_NAME)-cert

View File

@ -0,0 +1,244 @@
---
apiVersion: admissionregistration.k8s.io/v1beta1
kind: MutatingWebhookConfiguration
metadata:
creationTimestamp: null
name: mutating-webhook-configuration
webhooks:
- clientConfig:
caBundle: Cg==
service:
name: webhook-service
namespace: system
path: /mutate-infrastructure-cluster-x-k8s-io-v1alpha4-metal3cluster
failurePolicy: Fail
matchPolicy: Equivalent
name: default.metal3cluster.infrastructure.cluster.x-k8s.io
rules:
- apiGroups:
- infrastructure.cluster.x-k8s.io
apiVersions:
- v1alpha4
operations:
- CREATE
- UPDATE
resources:
- metal3clusters
- clientConfig:
caBundle: Cg==
service:
name: webhook-service
namespace: system
path: /mutate-infrastructure-cluster-x-k8s-io-v1alpha4-metal3data
failurePolicy: Fail
matchPolicy: Equivalent
name: default.metal3data.infrastructure.cluster.x-k8s.io
rules:
- apiGroups:
- infrastructure.cluster.x-k8s.io
apiVersions:
- v1alpha4
operations:
- CREATE
- UPDATE
resources:
- metal3datas
- clientConfig:
caBundle: Cg==
service:
name: webhook-service
namespace: system
path: /mutate-infrastructure-cluster-x-k8s-io-v1alpha4-metal3dataclaim
failurePolicy: Fail
matchPolicy: Equivalent
name: default.metal3dataclaim.infrastructure.cluster.x-k8s.io
rules:
- apiGroups:
- infrastructure.cluster.x-k8s.io
apiVersions:
- v1alpha4
operations:
- CREATE
- UPDATE
resources:
- metal3dataclaims
- clientConfig:
caBundle: Cg==
service:
name: webhook-service
namespace: system
path: /mutate-infrastructure-cluster-x-k8s-io-v1alpha4-metal3datatemplate
failurePolicy: Fail
matchPolicy: Equivalent
name: default.metal3datatemplate.infrastructure.cluster.x-k8s.io
rules:
- apiGroups:
- infrastructure.cluster.x-k8s.io
apiVersions:
- v1alpha4
operations:
- CREATE
- UPDATE
resources:
- metal3datatemplates
- clientConfig:
caBundle: Cg==
service:
name: webhook-service
namespace: system
path: /mutate-infrastructure-cluster-x-k8s-io-v1alpha4-metal3machine
failurePolicy: Fail
matchPolicy: Equivalent
name: default.metal3machine.infrastructure.cluster.x-k8s.io
rules:
- apiGroups:
- infrastructure.cluster.x-k8s.io
apiVersions:
- v1alpha4
operations:
- CREATE
- UPDATE
resources:
- metal3machines
- clientConfig:
caBundle: Cg==
service:
name: webhook-service
namespace: system
path: /mutate-infrastructure-cluster-x-k8s-io-v1alpha4-metal3machinetemplate
failurePolicy: Fail
matchPolicy: Equivalent
name: default.metal3machinetemplate.infrastructure.cluster.x-k8s.io
rules:
- apiGroups:
- infrastructure.cluster.x-k8s.io
apiVersions:
- v1alpha4
operations:
- CREATE
- UPDATE
resources:
- metal3machinetemplates
---
apiVersion: admissionregistration.k8s.io/v1beta1
kind: ValidatingWebhookConfiguration
metadata:
creationTimestamp: null
name: validating-webhook-configuration
webhooks:
- clientConfig:
caBundle: Cg==
service:
name: webhook-service
namespace: system
path: /validate-infrastructure-cluster-x-k8s-io-v1alpha4-metal3cluster
failurePolicy: Fail
matchPolicy: Equivalent
name: validation.metal3cluster.infrastructure.cluster.x-k8s.io
rules:
- apiGroups:
- infrastructure.cluster.x-k8s.io
apiVersions:
- v1alpha4
operations:
- CREATE
- UPDATE
resources:
- metal3clusters
- clientConfig:
caBundle: Cg==
service:
name: webhook-service
namespace: system
path: /validate-infrastructure-cluster-x-k8s-io-v1alpha4-metal3data
failurePolicy: Fail
matchPolicy: Equivalent
name: validation.metal3data.infrastructure.cluster.x-k8s.io
rules:
- apiGroups:
- infrastructure.cluster.x-k8s.io
apiVersions:
- v1alpha4
operations:
- CREATE
- UPDATE
resources:
- metal3datas
- clientConfig:
caBundle: Cg==
service:
name: webhook-service
namespace: system
path: /validate-infrastructure-cluster-x-k8s-io-v1alpha4-metal3dataclaim
failurePolicy: Fail
matchPolicy: Equivalent
name: validation.metal3dataclaim.infrastructure.cluster.x-k8s.io
rules:
- apiGroups:
- infrastructure.cluster.x-k8s.io
apiVersions:
- v1alpha4
operations:
- CREATE
- UPDATE
resources:
- metal3dataclaims
- clientConfig:
caBundle: Cg==
service:
name: webhook-service
namespace: system
path: /validate-infrastructure-cluster-x-k8s-io-v1alpha4-metal3datatemplate
failurePolicy: Fail
matchPolicy: Equivalent
name: validation.metal3datatemplate.infrastructure.cluster.x-k8s.io
rules:
- apiGroups:
- infrastructure.cluster.x-k8s.io
apiVersions:
- v1alpha4
operations:
- CREATE
- UPDATE
resources:
- metal3datatemplates
- clientConfig:
caBundle: Cg==
service:
name: webhook-service
namespace: system
path: /validate-infrastructure-cluster-x-k8s-io-v1alpha4-metal3machine
failurePolicy: Fail
matchPolicy: Equivalent
name: validation.metal3machine.infrastructure.cluster.x-k8s.io
rules:
- apiGroups:
- infrastructure.cluster.x-k8s.io
apiVersions:
- v1alpha4
operations:
- CREATE
- UPDATE
resources:
- metal3machines
- clientConfig:
caBundle: Cg==
service:
name: webhook-service
namespace: system
path: /validate-infrastructure-cluster-x-k8s-io-v1alpha4-metal3machinetemplate
failurePolicy: Fail
matchPolicy: Equivalent
name: validation.metal3machinetemplate.infrastructure.cluster.x-k8s.io
rules:
- apiGroups:
- infrastructure.cluster.x-k8s.io
apiVersions:
- v1alpha4
operations:
- CREATE
- UPDATE
resources:
- metal3machinetemplates

View File

@ -0,0 +1,10 @@
apiVersion: v1
kind: Service
metadata:
name: webhook-service
namespace: system
spec:
ports:
- port: 443
targetPort: webhook-server

View File

@ -0,0 +1,15 @@
# This patch add annotation to admission webhook config and
# the variables $(CERTIFICATE_NAMESPACE) and $(CERTIFICATE_NAME) will be substituted by kustomize.
apiVersion: admissionregistration.k8s.io/v1beta1
kind: MutatingWebhookConfiguration
metadata:
name: mutating-webhook-configuration
annotations:
cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
---
apiVersion: admissionregistration.k8s.io/v1beta1
kind: ValidatingWebhookConfiguration
metadata:
name: validating-webhook-configuration
annotations:
cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)

View File

@ -9,7 +9,7 @@ init-options:
bootstrap-providers:
- "kubeadm:v0.3.7"
infrastructure-providers:
- "metal3:v0.3.2"
- "metal3:v0.4.0"
control-plane-providers:
- "kubeadm:v0.3.7"
providers:
@ -17,7 +17,7 @@ providers:
type: "InfrastructureProvider"
variable-substitution: true
versions:
v0.3.2: airshipctl/manifests/function/capm3/v0.3.2
v0.4.0: airshipctl/manifests/function/capm3/v0.4.0
- name: "kubeadm"
type: "BootstrapProvider"
variable-substitution: true
@ -59,7 +59,7 @@ images:
tag: "v0.4.1"
infrastructure-metal3/cluster-api-provider-metal3:
repository: "quay.io/metal3-io"
tag: "v0.3.2"
tag: "v0.4.0"
infrastructure-metal3/kube-rbac-proxy:
repository: "gcr.io/kubebuilder"
tag: "v0.4.0"

View File

@ -22,7 +22,7 @@ spec:
cidrBlocks: ["192.168.0.0/18"]
serviceDomain: "cluster.local"
infrastructureRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
kind: Metal3Cluster
name: target-cluster
controlPlaneRef:
@ -30,7 +30,7 @@ spec:
apiVersion: controlplane.cluster.x-k8s.io/v1alpha3
name: cluster-controlplane
---
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
kind: Metal3Cluster
metadata:
name: target-cluster

View File

@ -7,7 +7,7 @@ spec:
version: v1.18.6
infrastructureTemplate:
kind: Metal3MachineTemplate
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
name: cluster-controlplane
kubeadmConfigSpec:
clusterConfiguration:
@ -37,7 +37,7 @@ spec:
kubeletExtraArgs:
node-labels: 'metal3.io/uuid={{ ds.meta_data.uuid }}'
---
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha3
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
kind: Metal3MachineTemplate
metadata:
name: cluster-controlplane

View File

@ -25,9 +25,6 @@ export CLUSTER_NAMESPACE=${CLUSTER_NAMESPACE:-"default"}
echo "Check Cluster Status"
kubectl --kubeconfig $KUBECONFIG --context $KUBECONFIG_EPHEMERAL_CONTEXT -n $CLUSTER_NAMESPACE get cluster target-cluster -o json | jq '.status.controlPlaneReady'
echo "Annotate BMH for target node"
kubectl --kubeconfig $KUBECONFIG --context $KUBECONFIG_EPHEMERAL_CONTEXT -n $CLUSTER_NAMESPACE annotate bmh $TARGET_NODE baremetalhost.metal3.io/paused=true
echo "Move Cluster Object to Target Cluster"
airshipctl phase run clusterctl-move