Description of problem: The describer for build volumes that use CSI volume sources does not print the correct volume name. Version-Release number of selected component (if applicable): 4.10 How reproducible: Always
Adam: Could you please help how could I reproduce and verify this issue . Thanks.
The simplest way to verify is to create a BuildConfig that references a CSI volume as a volume source, then describe it: ``` $ oc apply -f - <<EOF kind: BuildConfig apiVersion: build.openshift.io/v1 metadata: name: build-csi-volume spec: source: git: uri: https://github.com/sclorg/nodejs-ex.git strategy: source: from: kind: ImageStreamTag namespace: openshift name: nodejs:latest volumes: - name: test-secret mounts: - destinationPath: /tmp/test source: type: CSI csi: driver: csi.sharedresource.openshift.io volumeAttributes: sharedSecret: testSecret EOF $ oc describe bc build-csi-volume ```
Checked with latest oc, can't reproduce the issue now: [root@localhost out]# cat /tmp/build.yaml kind: BuildConfig apiVersion: build.openshift.io/v1 metadata: name: build-csi-volume spec: source: git: uri: https://github.com/sclorg/nodejs-ex.git strategy: sourceStrategy: from: kind: ImageStreamTag namespace: openshift name: nodejs:latest volumes: - name: test-secret mounts: - destinationPath: /tmp/test source: type: CSI csi: driver: csi.sharedresource.openshift.io volumeAttributes: sharedSecret: testSecret [root@localhost out]# oc apply -f /tmp/build.yaml buildconfig.build.openshift.io/build-csi-volume created [root@localhost out]# oc get buildconfig NAME TYPE FROM LATEST build-csi-volume Source Git 0 [root@localhost out]# oc describe buildconfig/build-csi-volume Name: build-csi-volume Namespace: zhouyt Created: 29 seconds ago Labels: <none> Annotations: kubectl.kubernetes.io/last-applied-configuration={"apiVersion":"build.openshift.io/v1","kind":"BuildConfig","metadata":{"annotations":{},"name":"build-csi-volume","namespace":"zhouyt"},"spec":{"source":{"git":{"uri":"https://github.com/sclorg/nodejs-ex.git"}},"strategy":{"sourceStrategy":{"from":{"kind":"ImageStreamTag","name":"nodejs:latest","namespace":"openshift"},"volumes":[{"mounts":[{"destinationPath":"/tmp/test"}],"name":"test-secret","source":{"csi":{"driver":"csi.sharedresource.openshift.io","volumeAttributes":{"sharedSecret":"testSecret"}},"type":"CSI"}}]}}}} Latest Version: Never built Strategy: Source URL: https://github.com/sclorg/nodejs-ex.git From Image: ImageStreamTag openshift/nodejs:latest Volumes: Name Source Type Source Mounts test-secret CSI test-secret /tmp/test Build Run Policy: Serial Triggered by: <none> Builds History Limit: Successful: 5 Failed: 5 Events: <none> [root@localhost out]# oc version Client Version: 4.10.0-202201122238.p0.gda3f635.assembly.stream-da3f635 Server Version: 4.10.0-0.nightly-2022-01-17-091922 Kubernetes Version: v1.23.0+60f5a1c