Added replacements for composite/infra

* Added replacements for cert-manager.
* Removed the unneeded cert-manager replacement from clusterctl function
* Added the 3 images used for cert-manager in Base Versions Catalogue

Closes: #549
Change-Id: I72b458b77c399f128b490cc5723e51af7c3d6f16
This commit is contained in:
Sirajudeen 2021-06-07 18:19:47 +00:00
parent 6aa3d1121f
commit 64eee82092
13 changed files with 91 additions and 15 deletions

View File

@ -0,0 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../../function/cni/tigera-operator/replacements
- ../../../function/cert-manager/replacements

View File

@ -152,8 +152,11 @@ spec:
manager:
image: ghcr.io/fluxcd/source-controller:v0.5.3
cert-manager:
cert-manager:
repository:
image: "quay.io/jetstack"
cainjector:
image: quay.io/jetstack/cert-manager-cainjector:v1.1.0
controller:
image: quay.io/jetstack/cert-manager-controller:v1.1.0
webhook:
image: quay.io/jetstack/cert-manager-webhook:v1.1.0
kubernetes: v1.18.6

View File

@ -0,0 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- versions.yaml

View File

@ -0,0 +1,39 @@
apiVersion: airshipit.org/v1alpha1
kind: ReplacementTransformer
metadata:
name: cert-manager-versions-replacements
annotations:
config.kubernetes.io/function: |-
container:
image: localhost/replacement-transformer
replacements:
- source:
objref:
kind: VersionsCatalogue
name: versions-airshipctl
fieldref: spec.images.cert-manager.cainjector.image
target:
objref:
kind: Deployment
name: cert-manager-cainjector
fieldrefs: ["spec.template.spec.containers[name=cert-manager].image"]
- source:
objref:
kind: VersionsCatalogue
name: versions-airshipctl
fieldref: spec.images.cert-manager.controller.image
target:
objref:
kind: Deployment
name: cert-manager
fieldrefs: ["spec.template.spec.containers[name=cert-manager].image"]
- source:
objref:
kind: VersionsCatalogue
name: versions-airshipctl
fieldref: spec.images.cert-manager.webhook.image
target:
objref:
kind: Deployment
name: cert-manager-webhook
fieldrefs: ["spec.template.spec.containers[name=cert-manager].image"]

View File

@ -187,15 +187,3 @@ replacements:
kind: Clusterctl
name: clusterctl_init
fieldrefs: ["{.images.infrastructure-azure/kube-rbac-proxy}"]
# Replace the cert-manager image repository in the Clusterctl
- source:
objref:
kind: VersionsCatalogue
name: versions-airshipctl
fieldref: "{.spec.images.cert-manager.cert-manager.repository.image}"
target:
objref:
kind: Clusterctl
name: clusterctl_init
fieldrefs: ["{.images.cert-manager.repository}"]

View File

@ -0,0 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../../../function/airshipctl-base-catalogues

View File

@ -1,6 +1,10 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../catalogues
- ../../../../composite/infra
commonLabels:
airshipit.org/stage: initinfra
transformers:
- ../../../../composite/infra/replacements

View File

@ -0,0 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../../../function/airshipctl-base-catalogues

View File

@ -1,7 +1,11 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../catalogues
- ../../../../composite/infra
commonLabels:
airshipit.org/stage: initinfra
transformers:
- ../../../../composite/infra/replacements

View File

@ -0,0 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../../../function/airshipctl-base-catalogues

View File

@ -1,7 +1,12 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../catalogues
- ../../../../composite/infra
commonLabels:
airshipit.org/stage: initinfra
transformers:
- ../../../../composite/infra/replacements

View File

@ -1,5 +1,9 @@
resources:
- ../catalogues
- ../../../../composite/infra/
commonLabels:
airshipit.org/stage: initinfra
transformers:
- ../../../../composite/infra/replacements

View File

@ -1,5 +1,10 @@
resources:
- ../catalogues
- ../../../../composite/infra/
commonLabels:
airshipit.org/stage: initinfra
transformers:
- ../../../../composite/infra/replacements