diff --git a/manifests/function/workers-capm3/kubeadmconfigtemplate.yaml b/manifests/function/workers-capm3/kubeadmconfigtemplate.yaml index 5e6b7f878..839937a50 100644 --- a/manifests/function/workers-capm3/kubeadmconfigtemplate.yaml +++ b/manifests/function/workers-capm3/kubeadmconfigtemplate.yaml @@ -9,7 +9,7 @@ spec: nodeRegistration: name: '{{ ds.meta_data.name }}' kubeletExtraArgs: - node-labels: 'metal3.io/uuid={{ ds.meta_data.uuid }}' + node-labels: 'metal3.io/uuid={{ ds.meta_data.uuid }},node-type=worker' provider-id: 'metal3://{{ ds.meta_data.uuid }}' feature-gates: "IPv6DualStack=true" cgroup-driver: "systemd" diff --git a/manifests/function/workers-capm3/metal3machinetemplate.yaml b/manifests/function/workers-capm3/metal3machinetemplate.yaml index 0152b999d..6008cd2ef 100644 --- a/manifests/function/workers-capm3/metal3machinetemplate.yaml +++ b/manifests/function/workers-capm3/metal3machinetemplate.yaml @@ -9,5 +9,5 @@ spec: matchLabels: airshipit.org/k8s-role: worker image: - url: http://10.23.24.102:80/images/data-plane.qcow2 - checksum: http://10.23.24.102:80/images/data-plane.qcow2.md5sum + url: http://REPLACEMENT_PROVISIONING_IP:80/images/data-plane.qcow2 + checksum: http://REPLACEMENT_PROVISIONING_IP:80/images/data-plane.qcow2.md5sum diff --git a/manifests/function/workers-capm3/replacements/kustomization.yaml b/manifests/function/workers-capm3/replacements/kustomization.yaml index a23d0dd1e..2545553d8 100644 --- a/manifests/function/workers-capm3/replacements/kustomization.yaml +++ b/manifests/function/workers-capm3/replacements/kustomization.yaml @@ -4,3 +4,4 @@ resources: - workers-env-vars.yaml - generated-secrets.yaml - networking.yaml + - metal3machinetemplate_vars.yaml diff --git a/manifests/function/workers-capm3/replacements/metal3machinetemplate_vars.yaml b/manifests/function/workers-capm3/replacements/metal3machinetemplate_vars.yaml new file mode 100644 index 000000000..50441c342 --- /dev/null +++ b/manifests/function/workers-capm3/replacements/metal3machinetemplate_vars.yaml @@ -0,0 +1,21 @@ +# These rules inject env vars into the workers. +apiVersion: airshipit.org/v1alpha1 +kind: ReplacementTransformer +metadata: + name: metal3machientemplate-replacements + annotations: + config.kubernetes.io/function: |- + container: + image: localhost/replacement-transformer +replacements: +- source: + objref: + name: networking + fieldref: spec.ironic.provisioningIp + target: + objref: + kind: Metal3MachineTemplate + name: worker-1 + fieldrefs: + - "spec.template.spec.image.url%REPLACEMENT_PROVISIONING_IP%" + - "spec.template.spec.image.checksum%REPLACEMENT_PROVISIONING_IP%"