Bug 2039311 - oc Does Not Describe Build CSI Volumes
Summary: oc Does Not Describe Build CSI Volumes
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 4.10
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: 4.10.0
Assignee: jawed
QA Contact: zhou ying
URL:
Whiteboard: devex
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-01-11 13:37 UTC by Adam Kaplan
Modified: 2022-03-11 18:15 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-03-11 18:15:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift oc pull 994 0 None open Bug 2039311: Add support for build csi volume source 2022-01-11 13:38:30 UTC

Description Adam Kaplan 2022-01-11 13:37:16 UTC
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

Comment 3 zhou ying 2022-01-14 03:43:07 UTC
Adam:

Could you please help how could I reproduce and verify this issue . Thanks.

Comment 4 Adam Kaplan 2022-01-14 13:54:43 UTC
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
```

Comment 5 zhou ying 2022-01-19 08:01:11 UTC
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


Note You need to log in before you can comment on or make changes to this bug.