apiVersion: airshipit.org/v1alpha1 kind: ReplacementTransformer metadata: name: generated-secrets-replacements annotations: config.kubernetes.io/function: |- container: image: localhost/replacement-transformer replacements: - source: objref: name: combined-ephemeral-secrets fieldref: ".secretGroups.[name=isoImageSecrets].values.[name=rootPasswd].data" target: objref: kind: Secret name: ephemeral-bmc-secret fieldrefs: ["stringData.userData%REPLACEMENT_ISO_PASSWORD_ROOT%"] - source: objref: name: combined-ephemeral-secrets fieldref: ".secretGroups.[name=isoImageSecrets].values.[name=deployerPasswd].data" target: objref: kind: Secret name: ephemeral-bmc-secret fieldrefs: ["stringData.userData%REPLACEMENT_ISO_PASSWORD_DEPLOYER%"] - source: objref: name: combined-ephemeral-secrets fieldref: ".secretGroups.[name=ephemeralK8sSecrets].values.[name=caKey].data" target: objref: kind: Secret name: ephemeral-bmc-secret fieldrefs: ["stringData.userData%REPLACEMENT_CP_CA_KEY%"] - source: objref: name: combined-ephemeral-secrets fieldref: ".secretGroups.[name=ephemeralK8sSecrets].values.[name=caCrt].data" target: objref: kind: Secret name: ephemeral-bmc-secret fieldrefs: - "stringData.userData%REPLACEMENT_CP_CA_CERT%" - "stringData.userData%REPLACEMENT_CP_KUBECONFIG_CA_CERT%" - source: objref: name: combined-ephemeral-secrets fieldref: ".secretGroups.[name=ephemeralK8sSecrets].values.[name=key].data" target: objref: kind: Secret name: ephemeral-bmc-secret fieldrefs: ["stringData.userData%REPLACEMENT_CP_KUBECONFIG_ADMIN_KEY%"] - source: objref: name: combined-ephemeral-secrets fieldref: ".secretGroups.[name=ephemeralK8sSecrets].values.[name=crt].data" target: objref: kind: Secret name: ephemeral-bmc-secret fieldrefs: ["stringData.userData%REPLACEMENT_CP_KUBECONFIG_ADMIN_CERT%"]