summaryrefslogtreecommitdiffstats
path: root/roles/openshift_persistent_volumes/templates/persistent-volume-claim.yml.j2
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2018-02-13 09:31:50 -0800
committerGitHub <noreply@github.com>2018-02-13 09:31:50 -0800
commit4d1e757b1e84400f8049b91afc6b9fba5d5d1d9b (patch)
treea896a2f40ebe045f7406aa9c1f17376d9bedc5a7 /roles/openshift_persistent_volumes/templates/persistent-volume-claim.yml.j2
parente2fad4e69710c9d4fd18febd4ab60b0f12b78ef8 (diff)
parent0101c000a6e1e944f98a037183d9f222ee9aeb13 (diff)
downloadopenshift-4d1e757b1e84400f8049b91afc6b9fba5d5d1d9b.tar.gz
openshift-4d1e757b1e84400f8049b91afc6b9fba5d5d1d9b.tar.bz2
openshift-4d1e757b1e84400f8049b91afc6b9fba5d5d1d9b.tar.xz
openshift-4d1e757b1e84400f8049b91afc6b9fba5d5d1d9b.zip
Merge pull request #7106 from jarrpa/pvc-gen-storageclass
Automatic merge from submit-queue. Allow for blank StorageClass in PVC creation In the case where a default StorageClass is already defined and a PV's storage kind is not 'dynamic', allows for the storageClassName of the associated PVC to be blank so as to not use the default SC. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1544387 Signed-off-by: Jose A. Rivera <jarrpa@redhat.com>
Diffstat (limited to 'roles/openshift_persistent_volumes/templates/persistent-volume-claim.yml.j2')
-rw-r--r--roles/openshift_persistent_volumes/templates/persistent-volume-claim.yml.j23
1 files changed, 3 insertions, 0 deletions
diff --git a/roles/openshift_persistent_volumes/templates/persistent-volume-claim.yml.j2 b/roles/openshift_persistent_volumes/templates/persistent-volume-claim.yml.j2
index fac589a92..ca8b747ee 100644
--- a/roles/openshift_persistent_volumes/templates/persistent-volume-claim.yml.j2
+++ b/roles/openshift_persistent_volumes/templates/persistent-volume-claim.yml.j2
@@ -12,4 +12,7 @@ items:
resources:
requests:
storage: "{{ claim.capacity }}"
+{% if claim.storageclass is not None %}
+ storageClassName: "{{ claim.storageclass }}"
+{% endif %}
{% endfor %}