diff options
Diffstat (limited to 'roles/openshift_default_storage_class')
-rw-r--r-- | roles/openshift_default_storage_class/defaults/main.yml | 13 | ||||
-rw-r--r-- | roles/openshift_default_storage_class/tasks/main.yml | 17 |
2 files changed, 12 insertions, 18 deletions
diff --git a/roles/openshift_default_storage_class/defaults/main.yml b/roles/openshift_default_storage_class/defaults/main.yml index 66ffd2a73..8d07dbecc 100644 --- a/roles/openshift_default_storage_class/defaults/main.yml +++ b/roles/openshift_default_storage_class/defaults/main.yml @@ -1,14 +1,19 @@ --- openshift_storageclass_defaults: aws: - name: gp2 provisioner: kubernetes.io/aws-ebs - type: gp2 + name: gp2 + parameters: + type: gp2 + kmsKeyId: '' + encrypted: 'false' gce: name: standard provisioner: kubernetes.io/gce-pd - type: pd-standard + parameters: + type: pd-standard +openshift_storageclass_default: "true" openshift_storageclass_name: "{{ openshift_storageclass_defaults[openshift_cloudprovider_kind]['name'] }}" openshift_storageclass_provisioner: "{{ openshift_storageclass_defaults[openshift_cloudprovider_kind]['provisioner'] }}" -openshift_storageclass_type: "{{ openshift_storageclass_defaults[openshift_cloudprovider_kind]['type'] }}" +openshift_storageclass_parameters: "{{ openshift_storageclass_defaults[openshift_cloudprovider_kind]['parameters'] }}" diff --git a/roles/openshift_default_storage_class/tasks/main.yml b/roles/openshift_default_storage_class/tasks/main.yml index 408fc17c7..8e14e67dc 100644 --- a/roles/openshift_default_storage_class/tasks/main.yml +++ b/roles/openshift_default_storage_class/tasks/main.yml @@ -1,19 +1,8 @@ --- # Install default storage classes in GCE & AWS - name: Ensure storageclass object - oc_obj: - kind: storageclass + oc_storageclass: name: "{{ openshift_storageclass_name }}" - content: - path: /tmp/openshift_storageclass - data: - kind: StorageClass - apiVersion: storage.k8s.io/v1beta1 - metadata: - name: "{{ openshift_storageclass_name }}" - annotations: - storageclass.beta.kubernetes.io/is-default-class: "true" - provisioner: "{{ openshift_storageclass_provisioner }}" - parameters: - type: "{{ openshift_storageclass_type }}" + default_storage_class: "{{ openshift_storageclass_default | default('true') | string}}" + parameters: "{{ openshift_storageclass_parameters }}" run_once: true |