Ver código fonte

Create default storageclass for cloudprovider openstack

Ping Qin 7 anos atrás
pai
commit
f4a2d002b3

+ 1 - 1
playbooks/common/openshift-cluster/openshift_default_storage_class.yml

@@ -3,4 +3,4 @@
   hosts: oo_first_master
   roles:
   - role: openshift_default_storage_class
-    when: openshift_cloudprovider_kind is defined and (openshift_cloudprovider_kind == 'aws' or openshift_cloudprovider_kind == 'gce')
+    when: openshift_cloudprovider_kind is defined and (openshift_cloudprovider_kind == 'aws' or openshift_cloudprovider_kind == 'gce' or openshift_cloudprovider_kind == 'openstack')

+ 6 - 0
roles/openshift_default_storage_class/defaults/main.yml

@@ -13,6 +13,12 @@ openshift_storageclass_defaults:
     parameters:
       type: pd-standard
 
+  openstack:
+    name: sc-cinder
+    provisioner: cinder
+    parameters:
+      fstype: xfs
+
 openshift_storageclass_default: "true"
 openshift_storageclass_name: "{{ openshift_storageclass_defaults[openshift_cloudprovider_kind]['name'] }}"
 openshift_storageclass_provisioner: "{{ openshift_storageclass_defaults[openshift_cloudprovider_kind]['provisioner'] }}"

+ 1 - 1
roles/openshift_default_storage_class/tasks/main.yml

@@ -1,5 +1,5 @@
 ---
-# Install default storage classes in GCE & AWS
+# Install default storage classes in GCE & AWS & OPENSTACK
 - name: Ensure storageclass object
   oc_storageclass:
     name: "{{ openshift_storageclass_name }}"