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

Actions #1

Updated by chambridge almost 3 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to chambridge
Actions #2

Updated by pulpbot almost 3 years ago

  • Status changed from ASSIGNED to POST

Added by chambridge almost 3 years ago

Revision 65499186 | View on GitHub

Allow user to specify empty string storage class for postgres PVC.

  • Update defaults
  • Update jinja2 condition in template

fixes #8733 https://pulp.plan.io/issues/8733

Actions #3

Updated by chambridge almost 3 years ago

  • Status changed from POST to MODIFIED
Actions #4

Updated by fao89 over 2 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Also available in: Atom PDF