Description of problem: While creating the pvc via statefulsets, the custom labels added in the pvc are not getting appreciated. the only label available is default one "app: appname" PVC config in the test statefulset: ~~~ --- apiVersion: apps/v1 kind: StatefulSet metadata: name: test labels: test: label1 spec: volumeClaimTemplates: - metadata: name: data spec: accessModes: [ "ReadWriteOnce" ] storageClassName: "glusterfs-storage" resources: requests: storage: 1Gi ~~~ In the yaml of created pvc: ~~~ apiVersion: v1 kind: PersistentVolumeClaim metadata: annotations: volume.beta.kubernetes.io/storage-provisioner: kubernetes.io/glusterfs creationTimestamp: 2019-01-11T07:24:27Z finalizers: - kubernetes.io/pvc-protection labels: app: mehdb name: data-test-0 namespace: test resourceVersion: "31600680" selfLink: /api/v1/namespaces/test/persistentvolumeclaims/data-test-0 uid: edbf4ceb-1571-11e9-b475-001a4a000cfb ~~~ Known Kubernetes issue: https://github.com/kubernetes/kubernetes/issues/58987 Version-Release number of selected component (if applicable): N/a Actual results: No custom label available Expected results: the pvc should have the custom label as well
Hello, Is there any update on this? Regards, Sudarshan
Hi Team, Do we have any further update on the bug? If any information is required, please do let us know so that we can gather the same. Best Regards, Deepak Sukhiya Associate Manager, OpenShift
This will be fixed in OCP 4.3 (since the fix from https://github.com/kubernetes/kubernetes/pull/74941 landed in k8s 1.15). I don't envision us backporting that fix.
4.3 bump to k8s 1.16 landed in https://github.com/openshift/origin/pull/23811 moving to qa.
Confirmed with latest version, the issue has fixed: [root@dhcp-140-138 ~]# oc version Client Version: v4.3.0 Server Version: 4.3.0-0.nightly-2019-10-15-020113 Kubernetes Version: v1.16.0-beta.2+a6ff814 apiVersion: apps/v1 kind: StatefulSet metadata: name: test labels: test: label1 spec: ...... volumeClaimTemplates: - metadata: name: data spec: accessModes: [ "ReadWriteOnce" ] storageClassName: "nfs" resources: requests: storage: 1Gi [root@dhcp-140-138 kubernetes]# oc get pvc -o data-test-0 -o yaml apiVersion: v1 items: - apiVersion: v1 kind: PersistentVolumeClaim metadata: annotations: pv.kubernetes.io/bind-completed: "yes" pv.kubernetes.io/bound-by-controller: "yes" volume.beta.kubernetes.io/storage-provisioner: example.com/nfs creationTimestamp: "2019-10-15T07:43:07Z" finalizers: - kubernetes.io/pvc-protection labels: test: label1 name: data-test-0 namespace: zhouy resourceVersion: "77697" selfLink: /api/v1/namespaces/zhouy/persistentvolumeclaims/data-test-0 uid: 2ea18713-8437-42c8-9d23-4c6b876c40c4
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2020:0062