支持master证书添加公网ip和域名

pull/360/head
gjmzj 2018-11-07 10:23:18 +08:00
parent 877a21a0b6
commit b5cd458fde
2 changed files with 9 additions and 0 deletions

View File

@ -2,3 +2,9 @@
TMP_ENDPOINTS: "{% for h in groups['etcd'] %}https://{{ h }}:2379,{% endfor %}" TMP_ENDPOINTS: "{% for h in groups['etcd'] %}https://{{ h }}:2379,{% endfor %}"
ETCD_ENDPOINTS: "{{ TMP_ENDPOINTS.rstrip(',') }}" ETCD_ENDPOINTS: "{{ TMP_ENDPOINTS.rstrip(',') }}"
# k8s 集群 master 节点证书配置可以添加多个ip和域名比如增加公网ip和域名
MASTER_CERT_HOSTS:
- "10.1.1.1"
- "k8s.test.io"
#- "61.182.11.41"
#- "www.test.com"

View File

@ -5,6 +5,9 @@
"{{ MASTER_IP }}", "{{ MASTER_IP }}",
"{{ inventory_hostname }}", "{{ inventory_hostname }}",
"{{ CLUSTER_KUBERNETES_SVC_IP }}", "{{ CLUSTER_KUBERNETES_SVC_IP }}",
{% for HOST in MASTER_CERT_HOSTS %}
"{{ HOST }}",
{% endfor %}
"kubernetes", "kubernetes",
"kubernetes.default", "kubernetes.default",
"kubernetes.default.svc", "kubernetes.default.svc",