You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
treasuremap/manifests/site/reference-multi-tenant/kubeconfig/update-target.yaml

70 lines
2.0 KiB

apiVersion: airshipit.org/v1alpha1
kind: ReplacementTransformer
metadata:
name: k8scontrol-cluster-replacements
annotations:
config.kubernetes.io/function: |-
container:
image: localhost/replacement-transformer
replacements:
- source:
objref:
kind: VariableCatalogue
name: generated-secrets
fieldref: "{.targetKubeconfig.certificate-authority-data}"
target:
objref:
kind: KubeConfig
name: default
fieldrefs: [".config.clusters.[name=target-cluster].cluster.certificate-authority-data"]
- source:
objref:
kind: VariableCatalogue
name: generated-secrets
fieldref: "{.targetKubeconfig.client-certificate-data}"
target:
objref:
kind: KubeConfig
name: default
fieldrefs: [".config.users.[name=target-cluster-admin].user.client-certificate-data"]
- source:
objref:
kind: VariableCatalogue
name: generated-secrets
fieldref: "{.targetKubeconfig.client-key-data}"
target:
objref:
kind: KubeConfig
name: default
fieldrefs: [".config.users.[name=target-cluster-admin].user.client-key-data"]
- source:
objref:
kind: VariableCatalogue
name: generated-secrets
fieldref: "{.ephemeralKubeconfig.certificate-authority-data}"
target:
objref:
kind: KubeConfig
name: default
fieldrefs: [".config.clusters.[name=ephemeral-cluster].cluster.certificate-authority-data"]
- source:
objref:
kind: VariableCatalogue
name: generated-secrets
fieldref: "{.ephemeralKubeconfig.client-certificate-data}"
target:
objref:
kind: KubeConfig
name: default
fieldrefs: [".config.users.[name=ephemeral-cluster-admin].user.client-certificate-data"]
- source:
objref:
kind: VariableCatalogue
name: generated-secrets
fieldref: "{.ephemeralKubeconfig.client-key-data}"
target:
objref:
kind: KubeConfig
name: default
fieldrefs: [".config.users.[name=ephemeral-cluster-admin].user.client-key-data"]