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 --- roles/openshift_metrics/templates/pvc.j2 | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'roles/openshift_metrics/templates') diff --git a/roles/openshift_metrics/templates/pvc.j2 b/roles/openshift_metrics/templates/pvc.j2 index c2e56ba21..0b801b33f 100644 --- a/roles/openshift_metrics/templates/pvc.j2 +++ b/roles/openshift_metrics/templates/pvc.j2 @@ -18,6 +18,13 @@ metadata: {% endfor %} {% endif %} spec: +{% if pv_selector is defined and pv_selector is mapping %} + selector: + matchLabels: +{% for key,value in pv_selector.iteritems() %} + {{key}}: {{value}} +{% endfor %} +{% endif %} accessModes: {% for mode in access_modes %} - {{ mode }} -- cgit v1.2.3