updated templates and scripts for Airship 1.3
[yaml_builds.git] / site_type / sriov-a13 / templates / software / charts / kubernetes / container-networking / etcd.j2
1 ---
2 # The purpose of this file is to build the list of calico etcd nodes and the
3 # calico etcd certs for those nodes in the environment.
4 schema: armada/Chart/v1
5 metadata:
6   schema: metadata/Document/v1
7   name: kubernetes-calico-etcd
8   layeringDefinition:
9     abstract: false
10     layer: site
11     parentSelector:
12       name: kubernetes-calico-etcd-global
13     actions:
14       - method: merge
15         path: .
16   storagePolicy: cleartext
17   substitutions:
18     # Generate a list of control plane nodes (i.e. genesis node + master node
19     # list) on which calico etcd will run and will need certs. It is assumed
20     # that Airship sites will have 4 control plane nodes, so this should not need to
21     # change for a new site.
22     - src:
23         schema: pegleg/CommonAddresses/v1
24         name: common-addresses
25         path: .genesis.hostname
26       dest:
27         path: .values.nodes[0].name
28 {% for server in yaml.masters %}
29     - src:
30         schema: pegleg/CommonAddresses/v1
31         name: common-addresses
32         path: .masters[{{loop.index-1}}].hostname
33       dest:
34         path: .values.nodes[{{loop.index}}].name
35 {% endfor %}
36
37     # Certificate substitutions for the node names assembled on the above list.
38     # NEWSITE-CHANGEME: Per above, the number of substitutions should not need
39     # to change with a standard Airship deployment. However, the names of each
40     # deckhand certficiate should be updated with the correct hostnames for your
41     # environment. The ordering is important (Genesis is index 0, then master
42     # nodes in the order they are specified in common-addresses).
43
44     # Genesis node {{yaml.genesis.name}}
45     - src:
46         schema: deckhand/Certificate/v1
47         name: calico-etcd-{{yaml.genesis.name}}
48         path: .
49       dest:
50         path: .values.nodes[0].tls.client.cert
51     - src:
52         schema: deckhand/CertificateKey/v1
53         name: calico-etcd-{{yaml.genesis.name}}
54         path: .
55       dest:
56         path: .values.nodes[0].tls.client.key
57     - src:
58         schema: deckhand/Certificate/v1
59         name: calico-etcd-{{yaml.genesis.name}}-peer
60         path: .
61       dest:
62         path: .values.nodes[0].tls.peer.cert
63     - src:
64         schema: deckhand/CertificateKey/v1
65         name: calico-etcd-{{yaml.genesis.name}}-peer
66         path: .
67       dest:
68         path: .values.nodes[0].tls.peer.key
69 {% for server in yaml.masters %}
70
71     # Master node {{server.name}}
72     - src:
73         schema: deckhand/Certificate/v1
74         name: calico-etcd-{{server.name}}
75         path: .
76       dest:
77         path: .values.nodes[{{loop.index}}].tls.client.cert
78     - src:
79         schema: deckhand/CertificateKey/v1
80         name: calico-etcd-{{server.name}}
81         path: .
82       dest:
83         path: .values.nodes[{{loop.index}}].tls.client.key
84     - src:
85         schema: deckhand/Certificate/v1
86         name: calico-etcd-{{server.name}}-peer
87         path: .
88       dest:
89         path: .values.nodes[{{loop.index}}].tls.peer.cert
90     - src:
91         schema: deckhand/CertificateKey/v1
92         name: calico-etcd-{{server.name}}-peer
93         path: .
94       dest:
95         path: .values.nodes[{{loop.index}}].tls.peer.key
96 {% endfor %}
97
98 data: {}
99 ...