summaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible
diff options
context:
space:
mode:
authorYifei Xue <xueyifei@huawei.com>2018-02-26 17:15:45 +0800
committerYifei Xue <xueyifei@huawei.com>2018-02-27 18:48:41 +0800
commitf7711167f1f8df28f82068274cbb43f74ea30bcf (patch)
tree031453422be392fc5ee061d79506e9dfce4697d9 /deploy/adapters/ansible
parent4c4ac1bc245b2ce119cb7f1ea27a0dfe83f26c0c (diff)
Enable CSI plugin for Stor4nfv scenario
JIRA: - Add some configurations to enable CSI plugin in k8s v1.9 which is used by Stor4nfv scenario. Change-Id: I78e0b39f31ff666eace50921c691107154dcb249 Signed-off-by: Yifei Xue <xueyifei@huawei.com>
Diffstat (limited to 'deploy/adapters/ansible')
-rw-r--r--deploy/adapters/ansible/kubernetes/roles/kargo/tasks/main.yml18
1 files changed, 18 insertions, 0 deletions
diff --git a/deploy/adapters/ansible/kubernetes/roles/kargo/tasks/main.yml b/deploy/adapters/ansible/kubernetes/roles/kargo/tasks/main.yml
index 187e2a52..6d947623 100644
--- a/deploy/adapters/ansible/kubernetes/roles/kargo/tasks/main.yml
+++ b/deploy/adapters/ansible/kubernetes/roles/kargo/tasks/main.yml
@@ -199,6 +199,24 @@
regexp: '"calico", "weave", "canal", "flannel"',
replace: '"calico", "weave", "canal", "flannel", "2flannel"'}
+# yamllint disable rule:line-length
+- name: enable CSI plugin feature
+ lineinfile:
+ dest: "/opt/kargo_k8s/roles/kubespray-defaults/defaults/main.yaml"
+ regexp: "^kube_feature_gates:"
+ line: "{% raw %}kube_feature_gates: ['Initializers={{ istio_enabled|string }}', 'PersistentLocalVolumes={{ local_volumes_enabled|string }}', 'CSIPersistentVolume=True', 'MountPropagation=True']{% endraw %}"
+ when:
+ - stor4nfv is defined and stor4nfv == "Enable"
+# yamllint enable rule:line-length
+
+- name: enable CSI plugin runtime_config
+ lineinfile:
+ dest: /opt/kargo_k8s/roles/kubernetes/master/defaults/main.yml
+ insertafter: '^ - admissionregistration.k8s.io/v1alpha1'
+ line: ' - storage.k8s.io/v1alpha1'
+ when:
+ - stor4nfv is defined and stor4nfv == "Enable"
+
- name: run kargo playbook
shell: |
cd /opt/kargo_k8s