Merge "Add replacements for workers qcow url ip"

This commit is contained in:
Zuul 2021-06-16 17:31:36 +00:00 committed by Gerrit Code Review
commit f90c9efda8
4 changed files with 25 additions and 3 deletions

@ -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"

@ -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

@ -4,3 +4,4 @@ resources:
- workers-env-vars.yaml
- generated-secrets.yaml
- networking.yaml
- 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%"