diff options
author | Jiri Mencak <jmencak@redhat.com> | 2017-11-20 16:16:26 +0100 |
---|---|---|
committer | Jiri Mencak <jmencak@redhat.com> | 2017-12-12 20:33:55 +0100 |
commit | 89472a43bf58160d58eeeaee54922dbad141eeb3 (patch) | |
tree | 5e91f4989c990d4a136b7f1e668a727154d57300 /roles/openshift_storage_glusterfs/templates/v3.7/glusterfs-storageclass.yml.j2 | |
parent | 83af99aa87a83acfe69fbc8e27942121f34f3ece (diff) | |
download | openshift-89472a43bf58160d58eeeaee54922dbad141eeb3.tar.gz openshift-89472a43bf58160d58eeeaee54922dbad141eeb3.tar.bz2 openshift-89472a43bf58160d58eeeaee54922dbad141eeb3.tar.xz openshift-89472a43bf58160d58eeeaee54922dbad141eeb3.zip |
Support for making glusterfs storage class a default one.
This PR adds support for making glusterfs storage class a
default class. By default this behaviour is turned off for
backward compatibility and can be turned on by setting:
openshift_storage_glusterfs_storageclass_default=True
Diffstat (limited to 'roles/openshift_storage_glusterfs/templates/v3.7/glusterfs-storageclass.yml.j2')
-rw-r--r-- | roles/openshift_storage_glusterfs/templates/v3.7/glusterfs-storageclass.yml.j2 | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/roles/openshift_storage_glusterfs/templates/v3.7/glusterfs-storageclass.yml.j2 b/roles/openshift_storage_glusterfs/templates/v3.7/glusterfs-storageclass.yml.j2 index 095fb780f..ca87807fe 100644 --- a/roles/openshift_storage_glusterfs/templates/v3.7/glusterfs-storageclass.yml.j2 +++ b/roles/openshift_storage_glusterfs/templates/v3.7/glusterfs-storageclass.yml.j2 @@ -3,6 +3,10 @@ apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: glusterfs-{{ glusterfs_name }} +{% if glusterfs_storageclass_default is defined and glusterfs_storageclass_default %} + annotations: + storageclass.kubernetes.io/is-default-class: "true" +{% endif %} provisioner: kubernetes.io/glusterfs parameters: resturl: "http://{% if glusterfs_heketi_is_native %}{{ glusterfs_heketi_route }}{% else %}{{ glusterfs_heketi_url }}:{{ glusterfs_heketi_port }}{% endif %}" |