Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1810500

Summary: Add default label for default VolumeSnapshotClass like StorageClass
Product: OpenShift Container Platform Reporter: Wei Duan <wduan>
Component: StorageAssignee: Christian Huffman <chuffman>
Status: CLOSED CANTFIX QA Contact: Wei Duan <wduan>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.4CC: aos-bugs, chuffman, piqin
Target Milestone: ---   
Target Release: 4.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-20 13:41:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Wei Duan 2020-03-05 11:49:52 UTC
Description of problem:

When specifying a default VolumeSnapshotClass with the annotations of snapshot.storage.kubernetes.io/is-default-class: "true", it is expected to add the (default) labels like StorageClass, it will be helpful to create VolumeSnapshots that don’t request any particular class to bind to, and aslo avoid for more than one default VolumeSnapshotClass defined.

[wduan@MINT tmp]$ oc get volumesnapshotclass
NAME                    DRIVER               DELETIONPOLICY   AGE
csi-azuredisk-vsc       disk.csi.azure.com   Delete           8m4s
default-snapshotclass   disk.csi.azure.com   Delete           12s

[wduan@MINT tmp]$ oc get volumesnapshotclass default-snapshotclass -o yaml
apiVersion: snapshot.storage.k8s.io/v1beta1
deletionPolicy: Delete
driver: disk.csi.azure.com
kind: VolumeSnapshotClass
metadata:
  annotations:
    snapshot.storage.kubernetes.io/is-default-class: "true"
  creationTimestamp: "2020-03-05T11:23:49Z"
  generation: 1
  name: default-snapshotclass
  resourceVersion: "193732"
  selfLink: /apis/snapshot.storage.k8s.io/v1beta1/volumesnapshotclasses/default-snapshotclass
  uid: ca5078ad-a2cd-406e-b1d3-27323e454ef0

[wduan@MINT tmp]$ oc get sc
NAME                        PROVISIONER                RECLAIMPOLICY   VOLUMEBINDINGMODE      ALLOWVOLUMEEXPANSION   AGE
disk.csi.azure.com          disk.csi.azure.com         Delete          Immediate              true                   33m
managed-premium (default)   kubernetes.io/azure-disk   Delete          WaitForFirstConsumer   true                   10h


Version-Release number of selected component (if applicable):
4.4.0-0.nightly-2020-03-03-175205

How reproducible:

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:

Master Log:

Node Log (of failed PODs):

PV Dump:

PVC Dump:

StorageClass Dump (if StorageClass used by PV/PVC):

Additional info:

Comment 1 Christian Huffman 2020-03-20 13:41:18 UTC
While I'd like to see this, it's not currently possible since the VolumeSnapshotClass is outside of the core kubernetes API. Configuring the displayed information for VolumeSnapshotClass is performed via kubebuilder extensions, and these cannot perform dynamic operations, such as checking for annotations and modifying the name.

Comment 2 Christian Huffman 2020-06-01 12:40:00 UTC
*** Bug 1842455 has been marked as a duplicate of this bug. ***