Fix etcd cert generation for calico-rr role
"etcd_node_cert_data" variable is undefinded for "calico-rr" role. This patch adds "calico-rr" nodes to task where "etcd_node_cert_data" variable is registered.
This commit is contained in:
parent
d296284bfa
commit
a47f2d611c
3 changed files with 11 additions and 8 deletions
|
@ -40,7 +40,7 @@
|
||||||
{{ m }}
|
{{ m }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}"
|
{% endfor %}"
|
||||||
- HOSTS: "{% for h in groups['k8s-cluster'] %}
|
- HOSTS: "{% for h in (groups['k8s-cluster'] + groups['calico-rr']|default([]))|unique %}
|
||||||
{% if hostvars[h].sync_certs|default(false) %}
|
{% if hostvars[h].sync_certs|default(false) %}
|
||||||
{{ h }}
|
{{ h }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -65,7 +65,7 @@
|
||||||
'member-{{ inventory_hostname }}-key.pem'
|
'member-{{ inventory_hostname }}-key.pem'
|
||||||
]
|
]
|
||||||
all_node_certs: "['ca.pem',
|
all_node_certs: "['ca.pem',
|
||||||
{% for node in groups['k8s-cluster'] %}
|
{% for node in (groups['k8s-cluster'] + groups['calico-rr']|default([]))|unique %}
|
||||||
'node-{{ node }}.pem',
|
'node-{{ node }}.pem',
|
||||||
'node-{{ node }}-key.pem',
|
'node-{{ node }}-key.pem',
|
||||||
{% endfor %}]"
|
{% endfor %}]"
|
||||||
|
@ -88,8 +88,9 @@
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
register: etcd_node_cert_data
|
register: etcd_node_cert_data
|
||||||
delegate_to: "{{groups['etcd'][0]}}"
|
delegate_to: "{{groups['etcd'][0]}}"
|
||||||
when: inventory_hostname in groups['k8s-cluster'] and sync_certs|default(false) and
|
when: (('calico-rr' in groups and inventory_hostname in groups['calico-rr']) or
|
||||||
inventory_hostname not in groups['etcd']
|
inventory_hostname in groups['k8s-cluster']) and
|
||||||
|
sync_certs|default(false) and inventory_hostname not in groups['etcd']
|
||||||
notify: set etcd_secret_changed
|
notify: set etcd_secret_changed
|
||||||
|
|
||||||
- name: Gen_certs | Copy certs on masters
|
- name: Gen_certs | Copy certs on masters
|
||||||
|
|
|
@ -21,10 +21,6 @@ global_as_num: "64512"
|
||||||
# calico_mtu: 1500
|
# calico_mtu: 1500
|
||||||
|
|
||||||
# Limits for apps
|
# Limits for apps
|
||||||
calico_rr_memory_limit: 1000M
|
|
||||||
calico_rr_cpu_limit: 300m
|
|
||||||
calico_rr_memory_requests: 500M
|
|
||||||
calico_rr_cpu_requests: 150m
|
|
||||||
calico_node_memory_limit: 500M
|
calico_node_memory_limit: 500M
|
||||||
calico_node_cpu_limit: 300m
|
calico_node_cpu_limit: 300m
|
||||||
calico_node_memory_requests: 256M
|
calico_node_memory_requests: 256M
|
||||||
|
|
|
@ -5,3 +5,9 @@ global_as_num: "64512"
|
||||||
|
|
||||||
calico_cert_dir: /etc/calico/certs
|
calico_cert_dir: /etc/calico/certs
|
||||||
etcd_cert_dir: /etc/ssl/etcd/ssl
|
etcd_cert_dir: /etc/ssl/etcd/ssl
|
||||||
|
|
||||||
|
# Limits for apps
|
||||||
|
calico_rr_memory_limit: 1000M
|
||||||
|
calico_rr_cpu_limit: 300m
|
||||||
|
calico_rr_memory_requests: 500M
|
||||||
|
calico_rr_cpu_requests: 150m
|
||||||
|
|
Loading…
Reference in a new issue