Skip to content

Commit

Permalink
Fix cinder & external_openstack cacert deployment
Browse files Browse the repository at this point in the history
The CA cert was only deployed on master nodes
  • Loading branch information
bozzo committed Sep 28, 2020
1 parent aba63f0 commit da4c0df
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
# include to workaround mitogen issue
# https://github.com/dw/mitogen/issues/663

- name: Cinder CSI Driver | Write cacert file
copy:
src: "{{ cinder_cacert }}"
dest: "{{ kube_config_dir }}/cinder-cacert.pem"
group: "{{ kube_cert_group }}"
mode: 0640
tags: cinder-csi-driver
delegate_to: "{{ delegate_host_to_write_cacert }}"
10 changes: 5 additions & 5 deletions roles/kubernetes-apps/csi_driver/cinder/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
tags: cinder-csi-driver

- name: Cinder CSI Driver | Write cacert file
copy:
src: "{{ cinder_cacert }}"
dest: "{{ kube_config_dir }}/cinder-cacert.pem"
group: "{{ kube_cert_group }}"
mode: 0640
include_tasks: cinder-write-cacert.yml
run_once: true
loop: "{{ groups['k8s-cluster'] }}"
loop_control:
loop_var: delegate_host_to_write_cacert
when:
- inventory_hostname in groups['k8s-cluster']
- cinder_cacert is defined
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
tags: external-openstack

- name: External OpenStack Cloud Controller | Write cacert file
copy:
src: "{{ external_openstack_cacert }}"
dest: "{{ kube_config_dir }}/external-openstack-cacert.pem"
group: "{{ kube_cert_group }}"
mode: 0640
include_tasks: openstack-write-cacert.yml
run_once: true
loop: "{{ groups['k8s-cluster'] }}"
loop_control:
loop_var: delegate_host_to_write_cacert
when:
- inventory_hostname in groups['k8s-cluster']
- external_openstack_cacert is defined
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
# include to workaround mitogen issue
# https://github.com/dw/mitogen/issues/663

- name: External OpenStack Cloud Controller | Write cacert file
copy:
src: "{{ external_openstack_cacert }}"
dest: "{{ kube_config_dir }}/external-openstack-cacert.pem"
group: "{{ kube_cert_group }}"
mode: 0640
tags: external-openstack
delegate_to: "{{ delegate_host_to_write_cacert }}"

0 comments on commit da4c0df

Please sign in to comment.