Merge "Add catalogue-driven CAPI container versions"
This commit is contained in:
commit
f3af1b8066
@ -10,7 +10,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: kube-rbac-proxy
|
||||
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.4.1
|
||||
image: ${CONTAINER_CABPK_AUTH_PROXY}
|
||||
args:
|
||||
- "--secure-listen-address=0.0.0.0:8443"
|
||||
- "--upstream=http://127.0.0.1:8080/"
|
||||
|
@ -7,5 +7,5 @@ spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- image: us.gcr.io/k8s-artifacts-prod/cluster-api/kubeadm-bootstrap-controller:v0.3.3
|
||||
- image: ${CONTAINER_CABPK_MANAGER}
|
||||
name: manager
|
||||
|
@ -10,7 +10,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: kube-rbac-proxy
|
||||
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.4.1
|
||||
image: ${CONTAINER_CACPK_AUTH_PROXY}
|
||||
args:
|
||||
- "--secure-listen-address=0.0.0.0:8443"
|
||||
- "--upstream=http://127.0.0.1:8080/"
|
||||
|
@ -7,5 +7,5 @@ spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- image: us.gcr.io/k8s-artifacts-prod/cluster-api/kubeadm-control-plane-controller:v0.3.3
|
||||
- image: ${CONTAINER_CACPK_MANAGER}
|
||||
name: manager
|
||||
|
@ -10,7 +10,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: kube-rbac-proxy
|
||||
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.4.1
|
||||
image: ${CONTAINER_CAPI_AUTH_PROXY}
|
||||
args:
|
||||
- "--secure-listen-address=0.0.0.0:8443"
|
||||
- "--upstream=http://127.0.0.1:8080/"
|
||||
|
@ -7,5 +7,5 @@ spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- image: us.gcr.io/k8s-artifacts-prod/cluster-api/cluster-api-controller:v0.3.3
|
||||
- image: ${CONTAINER_CAPI_MANAGER}
|
||||
name: manager
|
||||
|
@ -10,7 +10,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: kube-rbac-proxy
|
||||
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.4.0
|
||||
image: ${CONTAINER_CAPM3_AUTH_PROXY}
|
||||
args:
|
||||
- "--secure-listen-address=0.0.0.0:8443"
|
||||
- "--upstream=http://127.0.0.1:8080/"
|
||||
|
@ -8,5 +8,5 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
# Change the value of image field below to your controller image URL
|
||||
- image: quay.io/metal3-io/cluster-api-provider-metal3:v0.3.1
|
||||
- image: ${CONTAINER_CAPM3_MANAGER}
|
||||
name: manager
|
||||
|
16
manifests/function/clusterctl/README.md
Normal file
16
manifests/function/clusterctl/README.md
Normal file
@ -0,0 +1,16 @@
|
||||
Function: k8scontrol
|
||||
====================
|
||||
|
||||
This function defines a base Clusterctl config that includes a collection
|
||||
of available CAPI providers (under ``providers``) which are supported by
|
||||
``airshipctl``. It also provides a selection of those for a default Metal3
|
||||
deployment (under ``init-options``). The selected init-options may be
|
||||
patched/overridden at the Type level, etc.
|
||||
|
||||
This function relies on CAPI variable substitution to supply versioned
|
||||
container images to the CAPI components. The Clusterctl objects
|
||||
supplies defaults, and these can (optionally) be overridden either by
|
||||
simple Kustomize patching, or by applying the ``replacements``
|
||||
kustomization as a Kustomize transformer. In the latter case,
|
||||
an airshipctl versions catalogue must be supplied; please see the
|
||||
``airshipctl-catalogues`` function for a base/example.
|
45
manifests/function/clusterctl/clusterctl.yaml
Normal file
45
manifests/function/clusterctl/clusterctl.yaml
Normal file
@ -0,0 +1,45 @@
|
||||
apiVersion: airshipit.org/v1alpha1
|
||||
kind: Clusterctl
|
||||
metadata:
|
||||
labels:
|
||||
airshipit.org/deploy-k8s: "false"
|
||||
name: clusterctl-v1
|
||||
init-options:
|
||||
core-provider: "cluster-api:v0.3.3"
|
||||
bootstrap-providers:
|
||||
- "kubeadm:v0.3.3"
|
||||
infrastructure-providers:
|
||||
- "metal3:v0.3.1"
|
||||
control-plane-providers:
|
||||
- "kubeadm:v0.3.3"
|
||||
providers:
|
||||
- name: "metal3"
|
||||
type: "InfrastructureProvider"
|
||||
variable-substitution: true
|
||||
versions:
|
||||
v0.3.1: manifests/function/capm3/v0.3.1
|
||||
- name: "kubeadm"
|
||||
type: "BootstrapProvider"
|
||||
variable-substitution: true
|
||||
versions:
|
||||
v0.3.3: manifests/function/cabpk/v0.3.3
|
||||
- name: "cluster-api"
|
||||
type: "CoreProvider"
|
||||
variable-substitution: true
|
||||
versions:
|
||||
v0.3.3: manifests/function/capi/v0.3.3
|
||||
- name: "kubeadm"
|
||||
type: "ControlPlaneProvider"
|
||||
variable-substitution: true
|
||||
versions:
|
||||
v0.3.3: manifests/function/cacpk/v0.3.3
|
||||
# These default images can be overridden via the `replacements/` entrypoint
|
||||
additional-vars:
|
||||
CONTAINER_CAPM3_MANAGER: quay.io/metal3-io/cluster-api-provider-metal3:v0.3.1
|
||||
CONTAINER_CACPK_MANAGER: us.gcr.io/k8s-artifacts-prod/cluster-api/kubeadm-control-plane-controller:v0.3.3
|
||||
CONTAINER_CABPK_MANAGER: us.gcr.io/k8s-artifacts-prod/cluster-api/kubeadm-bootstrap-controller:v0.3.3
|
||||
CONTAINER_CAPI_MANAGER: us.gcr.io/k8s-artifacts-prod/cluster-api/cluster-api-controller:v0.3.3
|
||||
CONTAINER_CAPM3_AUTH_PROXY: gcr.io/kubebuilder/kube-rbac-proxy:v0.4.0
|
||||
CONTAINER_CACPK_AUTH_PROXY: gcr.io/kubebuilder/kube-rbac-proxy:v0.4.1
|
||||
CONTAINER_CABPK_AUTH_PROXY: gcr.io/kubebuilder/kube-rbac-proxy:v0.4.1
|
||||
CONTAINER_CAPI_AUTH_PROXY: gcr.io/kubebuilder/kube-rbac-proxy:v0.4.1
|
@ -0,0 +1,4 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- versions.yaml
|
27
manifests/function/clusterctl/replacements/versions.yaml
Normal file
27
manifests/function/clusterctl/replacements/versions.yaml
Normal file
@ -0,0 +1,27 @@
|
||||
# These rules inject versioned artifacts into the k8scontrol function.
|
||||
apiVersion: airshipit.org/v1alpha1
|
||||
kind: ReplacementTransformer
|
||||
metadata:
|
||||
name: k8scontrol-versions-replacements
|
||||
replacements:
|
||||
# Replace the Kubernetes version in the KubeadmControlPlane
|
||||
- source:
|
||||
objref:
|
||||
name: versions-airshipctl
|
||||
fieldref: kubernetes
|
||||
target:
|
||||
objref:
|
||||
kind: KubeadmControlPlane
|
||||
name: cluster-controlplane
|
||||
fieldrefs: ["spec.version"]
|
||||
# Replace the controlplane disk image in the Metal3MachineTemplate
|
||||
- source:
|
||||
objref:
|
||||
name: versions-airshipctl
|
||||
fieldref: files.k8scontrol.cluster_controlplane_image
|
||||
target:
|
||||
objref:
|
||||
kind: Metal3MachineTemplate
|
||||
name: cluster-controlplane
|
||||
fieldrefs: ["spec.template.spec.image"]
|
||||
|
@ -1,6 +1,6 @@
|
||||
resources:
|
||||
- ../../../../composite/infra
|
||||
- ../../shared/clusterctl
|
||||
- ../../../../function/clusterctl
|
||||
- ../../../../function/airshipctl-catalogues
|
||||
- ../../../../function/baremetal-operator
|
||||
patchesStrategicMerge:
|
||||
|
@ -1,31 +0,0 @@
|
||||
apiVersion: airshipit.org/v1alpha1
|
||||
kind: Clusterctl
|
||||
metadata:
|
||||
labels:
|
||||
airshipit.org/deploy-k8s: "false"
|
||||
name: clusterctl-v1
|
||||
init-options:
|
||||
core-provider: "cluster-api:v0.3.3"
|
||||
bootstrap-providers:
|
||||
- "kubeadm:v0.3.3"
|
||||
infrastructure-providers:
|
||||
- "metal3:v0.3.1"
|
||||
control-plane-providers:
|
||||
- "kubeadm:v0.3.3"
|
||||
providers:
|
||||
- name: "metal3"
|
||||
type: "InfrastructureProvider"
|
||||
versions:
|
||||
v0.3.1: manifests/function/capm3/v0.3.1
|
||||
- name: "kubeadm"
|
||||
type: "BootstrapProvider"
|
||||
versions:
|
||||
v0.3.3: manifests/function/cabpk/v0.3.3
|
||||
- name: "cluster-api"
|
||||
type: "CoreProvider"
|
||||
versions:
|
||||
v0.3.3: manifests/function/capi/v0.3.3
|
||||
- name: "kubeadm"
|
||||
type: "ControlPlaneProvider"
|
||||
versions:
|
||||
v0.3.3: manifests/function/cacpk/v0.3.3
|
@ -1,6 +1,6 @@
|
||||
resources:
|
||||
- ../../../../composite/infra
|
||||
- ../../shared/clusterctl
|
||||
- ../../../../function/clusterctl
|
||||
- ../../../../function/airshipctl-catalogues
|
||||
- ../../../../function/baremetal-operator
|
||||
- ../../../../function/helm-operator
|
||||
|
Loading…
Reference in New Issue
Block a user