Skip to content

Commit 4927ffc

Browse files
authored
Merge pull request #40074 from jkhelil/build-275
BUILD-275: add support for build csi volume source
2 parents 3152145 + eb96ac6 commit 4927ffc

File tree

1 file changed

+38
-2
lines changed

1 file changed

+38
-2
lines changed

modules/builds-using-build-volumes.adoc

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,29 @@ spec:
4646
type: ConfigMap <3>
4747
configMap:
4848
name: my-config <4>
49+
- name: my-csi-volume <1>
50+
mounts:
51+
- destinationPath: /opt/app-root/src/some_path <2>
52+
source:
53+
type: CSI <3>
54+
csi:
55+
driver: csi.sharedresource.openshift.io <5>
56+
readOnly: true <6>
57+
volumeAttributes: <7>
58+
attribute: value
4959
----
5060
<1> Required. A unique name.
5161
<2> Required. The absolute path of the mount point. It must not contain `..` or `:` and doesn't collide with the destination path generated by the builder. The `/opt/app-root/src` is the default home directory for many Red Hat S2I-enabled images.
52-
<3> Required. The type of source, `ConfigMap` or `Secret`.
62+
<3> Required. The type of source, `ConfigMap`, `Secret`, or `CSI`.
5363
<4> Required. The name of the source.
64+
<5> Required. The driver that provides the ephemeral CSI volume.
65+
<6> Optional. If true, this instructs the driver to provide a read-only volume.
66+
<7> Optional. The volume attributes of the ephemeral CSI volume. Consult the CSI driver's documentation for supported attribute keys and values.
67+
68+
[NOTE]
69+
====
70+
The shared resource CSI driver is supported as **Tech Preview** only.
71+
====
5472

5573
endif::dockerstrategy[]
5674

@@ -77,12 +95,30 @@ spec:
7795
type: ConfigMap <3>
7896
configMap:
7997
name: my-config <4>
98+
- name: my-csi-volume <1>
99+
mounts:
100+
- destinationPath: /opt/app-root/src/some_path <2>
101+
source:
102+
type: CSI <3>
103+
csi:
104+
driver: csi.sharedresource.openshift.io <5>
105+
readOnly: true <6>
106+
volumeAttributes: <7>
107+
attribute: value
80108
----
81109

82110
<1> Required. A unique name.
83111
<2> Required. The absolute path of the mount point. It must not contain `..` or `:` and doesn't collide with the destination path generated by the builder. The `/opt/app-root/src` is the default home directory for many Red Hat S2I-enabled images.
84-
<3> Required. The type of source, `ConfigMap` or `Secret`.
112+
<3> Required. The type of source, `ConfigMap`, `Secret`, or `CSI`.
85113
<4> Required. The name of the source.
114+
<5> Required. The driver that provides the ephemeral CSI volume.
115+
<6> Optional. If true, this instructs the driver to provide a read-only volume.
116+
<7> Optional. The volume attributes of the ephemeral CSI volume. Consult the CSI driver's documentation for supported attribute keys and values.
117+
118+
[NOTE]
119+
====
120+
The shared resource CSI driver is supported as **Tech Preview** only.
121+
====
86122

87123
endif::sourcestrategy[]
88124

0 commit comments

Comments
 (0)