Skip to content

Commit 23d3ce3

Browse files
openshift-cherrypick-robotGitHub Actions
and
GitHub Actions
authored
[release-1.5] RHIDP-5515: Document default PVC and Secret configuration update (#1124)
Co-authored-by: GitHub Actions <[email protected]>
1 parent 5a06d55 commit 23d3ce3

File tree

4 files changed

+95
-0
lines changed

4 files changed

+95
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
:_mod-docs-content-type: ASSEMBLY
2+
[id="assembly-configuring-default-secret-pvc-mounts_{context}"]
3+
= Configuring default mounts for Secrets and PVCs
4+
5+
You can configure Persistent Volume Claims (PVCs) and Secrets mount in your {product} deployment. Use annotations to define the custom mount paths and specify the containers to mount them to.
6+
7+
include::modules/configuring-external-databases/proc-configuring-mount-paths.adoc[leveloffset=+1]
8+
9+
include::modules/configuring-external-databases/proc-mounting-to-specific-containers.adoc[leveloffset=+1]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
:_mod-docs-content-type: PROCEDURE
2+
[id="proc-configuring-mount-paths_{context}"]
3+
= Configuring mount paths for Secrets and PVCs
4+
5+
By default, the mount path is the working directory of the {product-short} container. If you do not define the mount path, it defaults to `/opt/app-root/src`.
6+
7+
.Procedure
8+
9+
. To specify a PVC mount path, add the `rhdh.redhat.com/mount-path` annotation to your configuration file as shown in the following example:
10+
+
11+
.Example specifying where the PVC mounts
12+
[source,yaml,subs="+attributes,+quotes"]
13+
----
14+
apiVersion: v1
15+
kind: PersistentVolumeClaim
16+
metadata:
17+
name: _<my_claim>_
18+
annotations:
19+
rhdh.redhat.com/mount-path: /mount/path/from/annotation
20+
----
21+
where:
22+
23+
`rhdh.redhat.com/mount-path`:: Specifies which mount path the PVC mounts to (in this case, `/mount/path/from/annotation` directory).
24+
_<my_claim>_:: Specifies the PVC to mount.
25+
26+
. To specify a Secret mount path, add the `rhdh.redhat.com/mount-path` annotation to your configuration file as shown in the following example:
27+
+
28+
.Example specifying where the Secret mounts
29+
[source,yaml,subs="+attributes,+quotes"]
30+
----
31+
apiVersion: v1
32+
kind: Secret
33+
metadata:
34+
name: _<my_secret>_
35+
annotations:
36+
rhdh.redhat.com/mount-path: /mount/path/from/annotation
37+
----
38+
where:
39+
40+
_<my_secret>_:: Specifies the Secret name.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
:_mod-docs-content-type: PROCEDURE
2+
[id="proc-mounting-to-specific-containers_{context}"]
3+
= Mounting Secrets and PVCs to specific containers
4+
5+
By default, Secrets and PVCs mount only to the {product} `backstage-backend` container. You can add the `rhdh.redhat.com/containers` annotation to your configuration file to specify the containers to mount to.
6+
7+
.Procedure
8+
9+
. To mount Secrets to *all* containers, set the `rhdh.redhat.com/containers` annotation to `*` in your configuration file:
10+
+
11+
.Example mounting to all containers
12+
[source,yaml,subs="+attributes,+quotes"]
13+
----
14+
apiVersion: v1
15+
kind: Secret
16+
metadata:
17+
name: _<my_secret>_
18+
annotations:
19+
rhdh.redhat.com/containers: `*`
20+
----
21+
+
22+
[IMPORTANT]
23+
====
24+
Set `rhdh.redhat.com/containers` to `*` to mount it to all containers in the deployment.
25+
====
26+
27+
. To mount to specific containers, separate the names with commas:
28+
+
29+
.Example separating the list of containers
30+
[source,yaml,subs="+attributes,+quotes"]
31+
----
32+
apiVersion: v1
33+
kind: PersistentVolumeClaim
34+
metadata:
35+
name: _<my_claim>_
36+
annotations:
37+
rhdh.redhat.com/containers: "init-dynamic-plugins,backstage-backend"
38+
----
39+
+
40+
[NOTE]
41+
====
42+
This configuration mounts the `_<my_claim>_` PVC to the `init-dynamic-plugins` and `backstage-backend` containers.
43+
====

titles/configuring/master.adoc

+3
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,8 @@ include::modules/installation/proc-configuring-an-rhdh-instance-with-tls-in-kube
3333
include::modules/dynamic-plugins/con-dynamic-plugins-cache.adoc[ leveloffset=+1]
3434

3535

36+
include::assemblies/assembly-configuring-default-secret-pvc-mounts.adoc[leveloffset=+1]
37+
38+
3639
include::modules/dynamic-plugins/proc-installing-and-configuring-redis-cache.adoc[leveloffset=+1]
3740

0 commit comments

Comments
 (0)