From ab6f0012cc6c4ce5ce397596ab34626b6e1bf6bf Mon Sep 17 00:00:00 2001 From: Frank Ritchie Date: Thu, 6 Jun 2019 07:36:14 -0400 Subject: [PATCH] Make local volume provisioner dir mode a variable (#4821) * Make local volume provisioner dir mode a variable I need to change this for Nagios monitoring. Others may need to as well. Had to close previous commits, sorry for the spam. * Make local volume provisioner dir mode a variable I need to change this for Nagios monitoring. Others may need to as well. Had to close previous commits, sorry for the spam. --- .../local_volume_provisioner/tasks/main.yml | 2 +- roles/kubernetes/preinstall/tasks/0050-create_directories.yml | 2 +- roles/kubespray-defaults/defaults/main.yaml | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/roles/kubernetes-apps/external_provisioner/local_volume_provisioner/tasks/main.yml b/roles/kubernetes-apps/external_provisioner/local_volume_provisioner/tasks/main.yml index 2359588b5..57994468c 100644 --- a/roles/kubernetes-apps/external_provisioner/local_volume_provisioner/tasks/main.yml +++ b/roles/kubernetes-apps/external_provisioner/local_volume_provisioner/tasks/main.yml @@ -5,7 +5,7 @@ state: directory owner: root group: root - mode: 0700 + mode: "{{ local_volume_provisioner_directory_mode }}" delegate_to: "{{ item[0] }}" with_nested: - "{{ groups['k8s-cluster'] }}" diff --git a/roles/kubernetes/preinstall/tasks/0050-create_directories.yml b/roles/kubernetes/preinstall/tasks/0050-create_directories.yml index 2e2c46184..91230c9de 100644 --- a/roles/kubernetes/preinstall/tasks/0050-create_directories.yml +++ b/roles/kubernetes/preinstall/tasks/0050-create_directories.yml @@ -69,7 +69,7 @@ state: directory owner: root group: root - mode: 0700 + mode: "{{ local_volume_provisioner_directory_mode }}" with_items: "{{ local_volume_provisioner_storage_classes.keys() | list }}" when: - inventory_hostname in groups['k8s-cluster'] diff --git a/roles/kubespray-defaults/defaults/main.yaml b/roles/kubespray-defaults/defaults/main.yaml index 8a9478380..044ec27e8 100644 --- a/roles/kubespray-defaults/defaults/main.yaml +++ b/roles/kubespray-defaults/defaults/main.yaml @@ -279,6 +279,7 @@ registry_enabled: false metrics_server_enabled: false enable_network_policy: true local_volume_provisioner_enabled: "{{ local_volumes_enabled | default('false') }}" +local_volume_provisioner_directory_mode: 0700 persistent_volumes_enabled: false cephfs_provisioner_enabled: false rbd_provisioner_enabled: false