Sreejith Punnapuzha c58a4177f8 Fix ssh key replacement
Correct the user for ssh in replacement

Signed-off-by: Sreejith Punnapuzha <Sreejith.Punnapuzha@outlook.com>
Change-Id: I48a04a8d9be1c05fe36b78c27c4fec2cfc7f4daa
2021-04-06 10:38:55 -05:00

21 lines
616 B
YAML

# These rules inject env vars into the k8scontrol function.
apiVersion: airshipit.org/v1alpha1
kind: ReplacementTransformer
metadata:
name: k8scontrol-generated-secrets-replacements
annotations:
config.kubernetes.io/function: |-
container:
image: quay.io/airshipit/replacement-transformer:v2
replacements:
- source:
objref:
name: generated-secrets
fieldref: "{.sshKeys.publicKey}"
target:
objref:
kind: KubeadmControlPlane
name: cluster-controlplane
fieldrefs:
- "spec.kubeadmConfigSpec.users[name=deployer].sshAuthorizedKeys[0]%REPLACE_HOST_SSH_KEY%"