From 89472a43bf58160d58eeeaee54922dbad141eeb3 Mon Sep 17 00:00:00 2001 From: Jiri Mencak Date: Mon, 20 Nov 2017 16:16:26 +0100 Subject: 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 --- .../templates/v3.7/glusterfs-storageclass.yml.j2 | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'roles/openshift_storage_glusterfs/templates/v3.7') 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 %}" -- cgit v1.2.3