Fix cert paths for flannel/calico policy apps

Signed-off-by: Bogdan Dobrelya <bogdando@mail.ru>
This commit is contained in:
Bogdan Dobrelya
2016-12-30 13:47:12 +01:00
parent a3c044b657
commit d8a2941e9e
7 changed files with 42 additions and 13 deletions

View File

@@ -51,3 +51,5 @@ netchecker_kubectl_memory_requests: 64M
# SSL
etcd_cert_dir: "/etc/ssl/etcd/ssl"
calico_cert_dir: "/etc/calico/certs"
canal_cert_dir: "/etc/canal/certs"

View File

@@ -1,8 +1,13 @@
---
- set_fact:
calico_cert_dir: "{{ canal_cert_dir }}"
when: kube_network_plugin == 'canal'
tags: facts
- name: Write calico-policy-controller yaml
template: src=calico-policy-controller.yml.j2 dest={{kube_config_dir}}/calico-policy-controller.yml
when: inventory_hostname == groups['kube-master'][0]
- name: Start of Calico policy controller
kube:
name: "calico-policy-controller"

View File

@@ -36,11 +36,11 @@ spec:
- name: ETCD_ENDPOINTS
value: "{{ etcd_access_endpoint }}"
- name: ETCD_CA_CERT_FILE
value: "{{ etcd_cert_dir }}/ca.pem"
value: "{{ calico_cert_dir }}/ca_cert.crt"
- name: ETCD_CERT_FILE
value: "{{ etcd_cert_dir }}/node-{{ inventory_hostname }}.pem"
value: "{{ calico_cert_dir }}/cert.crt"
- name: ETCD_KEY_FILE
value: "{{ etcd_cert_dir }}/node-{{ inventory_hostname }}-key.pem"
value: "{{ calico_cert_dir }}/key.pem"
# Location of the Kubernetes API - this shouldn't need to be
# changed so long as it is used in conjunction with
# CONFIGURE_ETC_HOSTS="true".
@@ -53,10 +53,10 @@ spec:
- name: CONFIGURE_ETC_HOSTS
value: "true"
volumeMounts:
- mountPath: {{ etcd_cert_dir }}
- mountPath: {{ calico_cert_dir }}
name: etcd-certs
readOnly: true
volumes:
- hostPath:
path: {{ etcd_cert_dir }}
path: {{ calico_cert_dir }}
name: etcd-certs