From 44227c5bf81d6e95882ed96179eebc5d7900d423 Mon Sep 17 00:00:00 2001 From: ewolinetz Date: Wed, 24 May 2017 11:10:00 -0500 Subject: Allowing openshift_metrics to specify PV selectors and allow way to define selectors when creating pv --- .../openshift_persistent_volumes/templates/persistent-volume.yml.j2 | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'roles/openshift_persistent_volumes') diff --git a/roles/openshift_persistent_volumes/templates/persistent-volume.yml.j2 b/roles/openshift_persistent_volumes/templates/persistent-volume.yml.j2 index 877e88002..9c5103597 100644 --- a/roles/openshift_persistent_volumes/templates/persistent-volume.yml.j2 +++ b/roles/openshift_persistent_volumes/templates/persistent-volume.yml.j2 @@ -7,6 +7,12 @@ items: kind: PersistentVolume metadata: name: "{{ volume.name }}" +{% if volume.labels is defined and volume.labels is mapping %} + labels: +{% for key,value in volume.labels.iteritems() %} + {{ key }}: {{ value }} +{% endfor %} +{% endif %} spec: capacity: storage: "{{ volume.capacity }}" -- cgit v1.2.3