Project

Profile

Help

Issue #8733

closed

Can't set '' as storageClassName on operator produced PVCs

Added by jlanda almost 3 years ago. Updated over 2 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
Operator - Moved to Github Issues
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Quarter:

Description

As an openshift operator, sometimes I could want to bind my pvc to a pv without any storage class.

To be able to do this on a cluster with a default sotrage class I should set storageClassName: '' on the pvc spec:

https://docs.openshift.com/container-platform/4.7/storage/understanding-persistent-storage.html#pvc-storage-class_understanding-persistent-storage

When a default storage class is configured, the PVC must explicitly ask for StorageClass or storageClassName annotations set to "" to be bound to a PV without a storage class.

But the operator won't set a storageClassName when the respective var's value is '' :

https://github.com/pulp/pulp-operator/blob/main/roles/postgres/templates/postgres.yaml.j2#L98-L100

Also available in: Atom PDF