Merge "Added replacements for composite/infra"

This commit is contained in:
Zuul 2021-06-10 15:59:34 +00:00 committed by Gerrit Code Review
commit 7b8f976889
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

@ -146,8 +146,11 @@ spec:
manager: manager:
image: ghcr.io/fluxcd/source-controller:v0.5.3 image: ghcr.io/fluxcd/source-controller:v0.5.3
cert-manager: cert-manager:
cert-manager: cainjector:
repository: image: quay.io/jetstack/cert-manager-cainjector:v1.1.0
image: "quay.io/jetstack" 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 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 kind: Clusterctl
name: clusterctl_init name: clusterctl_init
fieldrefs: ["{.images.infrastructure-azure/kube-rbac-proxy}"] 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 apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization kind: Kustomization
resources: resources:
- ../catalogues
- ../../../../composite/infra - ../../../../composite/infra
commonLabels: commonLabels:
airshipit.org/stage: initinfra 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 apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization kind: Kustomization
resources: resources:
- ../catalogues
- ../../../../composite/infra - ../../../../composite/infra
commonLabels: commonLabels:
airshipit.org/stage: initinfra 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 apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization kind: Kustomization
resources: resources:
- ../catalogues
- ../../../../composite/infra - ../../../../composite/infra
commonLabels: commonLabels:
airshipit.org/stage: initinfra airshipit.org/stage: initinfra
transformers:
- ../../../../composite/infra/replacements

View File

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

View File

@ -1,6 +1,11 @@
resources: resources:
- ../catalogues
- ../../../../composite/infra/ - ../../../../composite/infra/
- namespace.yaml - namespace.yaml
commonLabels: commonLabels:
airshipit.org/stage: initinfra airshipit.org/stage: initinfra
transformers:
- ../../../../composite/infra/replacements