97 lines
2.5 KiB
Django/Jinja
97 lines
2.5 KiB
Django/Jinja
---
|
|
schema: armada/Chart/v1
|
|
metadata:
|
|
schema: metadata/Document/v1
|
|
name: kubernetes-calico-etcd
|
|
layeringDefinition:
|
|
abstract: false
|
|
layer: site
|
|
parentSelector:
|
|
name: kubernetes-calico-etcd-global
|
|
actions:
|
|
- method: merge
|
|
path: .
|
|
storagePolicy: cleartext
|
|
substitutions:
|
|
{% set count = [0] %}
|
|
{% for rack in data.baremetal.keys() %}
|
|
{% for host in data["baremetal"][rack] %}
|
|
{% if data["baremetal"][rack][host]["type"] == 'controller' %}
|
|
- src:
|
|
schema: pegleg/CommonAddresses/v1
|
|
name: common-addresses
|
|
path: .masters[{{ count[0] }}].hostname
|
|
dest:
|
|
path: .values.nodes[{{ count[0] }}].name
|
|
- src:
|
|
schema: deckhand/Certificate/v1
|
|
name: calico-etcd-{{ host }}
|
|
path: .
|
|
dest:
|
|
path: .values.nodes[{{ count[0] }}].tls.client.cert
|
|
- src:
|
|
schema: deckhand/CertificateKey/v1
|
|
name: calico-etcd-{{ host }}
|
|
path: .
|
|
dest:
|
|
path: .values.nodes[{{ count[0] }}].tls.client.key
|
|
- src:
|
|
schema: deckhand/Certificate/v1
|
|
name: calico-etcd-{{ host }}
|
|
path: .
|
|
dest:
|
|
path: .values.nodes[{{ count[0] }}].tls.peer.cert
|
|
- src:
|
|
schema: deckhand/CertificateKey/v1
|
|
name: calico-etcd-{{ host }}-peer
|
|
path: .
|
|
dest:
|
|
path: .values.nodes[{{ count[0] }}].tls.peer.key
|
|
|
|
{% if count.append(count.pop() + 1) %}{% endif %} {# increment count by 1 #}
|
|
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% endfor %}
|
|
|
|
{% for rack in data.baremetal.keys() %}
|
|
{% for host in data["baremetal"][rack] %}
|
|
{% if data["baremetal"][rack][host]["type"] == 'genesis' %}
|
|
- src:
|
|
schema: pegleg/CommonAddresses/v1
|
|
name: common-addresses
|
|
path: .genesis.hostname
|
|
dest:
|
|
path: .values.nodes[{{ count[0] }}].name
|
|
- src:
|
|
schema: deckhand/Certificate/v1
|
|
name: calico-etcd-{{ host }}
|
|
path: .
|
|
dest:
|
|
path: .values.nodes[{{ count[0] }}].tls.client.cert
|
|
- src:
|
|
schema: deckhand/CertificateKey/v1
|
|
name: calico-etcd-{{ host }}
|
|
path: .
|
|
dest:
|
|
path: .values.nodes[{{ count[0] }}].tls.client.key
|
|
- src:
|
|
schema: deckhand/Certificate/v1
|
|
name: calico-etcd-{{ host }}-peer
|
|
path: .
|
|
dest:
|
|
path: .values.nodes[{{ count[0] }}].tls.peer.cert
|
|
- src:
|
|
schema: deckhand/CertificateKey/v1
|
|
name: calico-etcd-{{ host }}-peer
|
|
path: .
|
|
dest:
|
|
path: .values.nodes[{{ count[0] }}].tls.peer.key
|
|
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% endfor %}
|
|
|
|
data: {}
|
|
...
|