When a PVC is created by an operator (and thus has a metadata.ownerReferences field) with a storageClass that has nfsResources set to "true" the provision of the nfs volume fails. This results in the original PVC staying in the 'Pending' state.
This only happens when nfsResources is set to "true".
StorageClass:
---
allowVolumeExpansion: true
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
labels:
environment: int
name: hpe-standard
parameters:
csi.storage.k8s.io/controller-expand-secret-name: nimble-storage
csi.storage.k8s.io/controller-expand-secret-namespace: nimble-storage
csi.storage.k8s.io/controller-publish-secret-name: nimble-storage
csi.storage.k8s.io/controller-publish-secret-namespace: nimble-storage
csi.storage.k8s.io/fstype: xfs
csi.storage.k8s.io/node-publish-secret-name: nimble-storage
csi.storage.k8s.io/node-publish-secret-namespace: nimble-storage
csi.storage.k8s.io/node-stage-secret-name: nimble-storage
csi.storage.k8s.io/node-stage-secret-namespace: nimble-storage
csi.storage.k8s.io/provisioner-secret-name: nimble-storage
csi.storage.k8s.io/provisioner-secret-namespace: nimble-storage
description: Volume created by the HPE CSI Driver for Kubernetes
destroyOnDelete: "true"
nfsResources: "true"
provisioner: csi.hpe.com
reclaimPolicy: Delete
volumeBindingMode: Immediate
PersistentVolumeClaim:
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
annotations:
volume.beta.kubernetes.io/storage-class: hpe-standard
volume.beta.kubernetes.io/storage-provisioner: csi.hpe.com
creationTimestamp: "2021-12-20T13:07:16Z"
finalizers:
- kubernetes.io/pvc-protection
name: my-claim-2
namespace: default
ownerReferences:
- apiVersion: zalando.org/v1
blockOwnerDeletion: true
controller: true
kind: EphemeralVolumeClaim
name: my-claim-2
uid: 1272133c-546b-4620-8baf-f1113002ff18
resourceVersion: "11046667"
uid: 9d20d560-50ef-45c6-bc21-0f915a22c4df
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1G
volumeMode: Filesystem
status:
phase: Pending
csi-provisioner.log
csi-driver.log
When a PVC is created by an operator (and thus has a metadata.ownerReferences field) with a storageClass that has nfsResources set to "true" the provision of the nfs volume fails. This results in the original PVC staying in the 'Pending' state.
This only happens when nfsResources is set to "true".
StorageClass:
PersistentVolumeClaim:
csi-provisioner.log
csi-driver.log