From 45a177e2a0dcbf4b73d9be078e1cc211455efa94 Mon Sep 17 00:00:00 2001 From: MikeG Date: Wed, 8 Apr 2020 09:51:43 +0300 Subject: [PATCH] add local-path-provosioner helper image def (#5817) --- inventory/sample/group_vars/k8s-cluster/addons.yml | 2 ++ .../local_path_provisioner/defaults/main.yml | 1 + .../templates/local-path-storage-deployment.yml.j2 | 4 ++++ 3 files changed, 7 insertions(+) diff --git a/inventory/sample/group_vars/k8s-cluster/addons.yml b/inventory/sample/group_vars/k8s-cluster/addons.yml index 697f09e16..85383b48e 100644 --- a/inventory/sample/group_vars/k8s-cluster/addons.yml +++ b/inventory/sample/group_vars/k8s-cluster/addons.yml @@ -27,6 +27,8 @@ local_path_provisioner_enabled: false # local_path_provisioner_debug: false # local_path_provisioner_image_repo: "rancher/local-path-provisioner" # local_path_provisioner_image_tag: "v0.0.2" +# local_path_provisioner_helper_image_repo: "busybox" +# local_path_provisioner_helper_image_tag: "latest" # Local volume provisioner deployment local_volume_provisioner_enabled: false diff --git a/roles/kubernetes-apps/external_provisioner/local_path_provisioner/defaults/main.yml b/roles/kubernetes-apps/external_provisioner/local_path_provisioner/defaults/main.yml index 45d528e5f..fa7b8b3a5 100644 --- a/roles/kubernetes-apps/external_provisioner/local_path_provisioner/defaults/main.yml +++ b/roles/kubernetes-apps/external_provisioner/local_path_provisioner/defaults/main.yml @@ -6,3 +6,4 @@ local_path_provisioner_reclaim_policy: Delete local_path_provisioner_claim_root: /opt/local-path-provisioner/ local_path_provisioner_is_default_storageclass: "true" local_path_provisioner_debug: false +local_path_provisioner_helper_image_tag: "latest" \ No newline at end of file diff --git a/roles/kubernetes-apps/external_provisioner/local_path_provisioner/templates/local-path-storage-deployment.yml.j2 b/roles/kubernetes-apps/external_provisioner/local_path_provisioner/templates/local-path-storage-deployment.yml.j2 index 6922691cf..bd3a84f29 100644 --- a/roles/kubernetes-apps/external_provisioner/local_path_provisioner/templates/local-path-storage-deployment.yml.j2 +++ b/roles/kubernetes-apps/external_provisioner/local_path_provisioner/templates/local-path-storage-deployment.yml.j2 @@ -26,6 +26,10 @@ spec: - /etc/config/config.json {% if local_path_provisioner_debug|default(false) %} - --debug +{% endif %} +{{ if local_path_provisioner_helper_image is defined }} + - --helper-image + - {{local_path_provisioner_helper_image_repo}}:{{local_path_provisioner_helper_image_tag}} {% endif %} volumeMounts: - name: config-volume