Skip to content

Commit 7b4f9b4

Browse files
author
GitHub Actions
committed
Configuring default configuration
1 parent 9ff126b commit 7b4f9b4

File tree

4 files changed

+95
-1
lines changed

4 files changed

+95
-1
lines changed
Lines changed: 9 additions & 0 deletions
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 where 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]
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
:_mod-docs-content-type: PROCEDURE
2+
[id="proc-configure-mount-path-secrets-pvcs_{context}"]
3+
= Configuring mount paths for Secrets and PVCs
4+
5+
By default, the mount path is the {product-short} container's working directory. If you do not define the mount path, it defaults to `/opt/app-root/src`.
6+
7+
You can add the `rhdh.redhat.com/mount-path` annotation to specify a custom path.
8+
9+
.Procedure
10+
11+
. To specify a PVC mount path, add the `rhdh.redhat.com/mount-path` annotation to your configuration file as shown in the following example:
12+
+
13+
.Example specifying where the PVC mounts
14+
[source,yaml,subs="+attributes,+quotes"]
15+
----
16+
apiVersion: v1
17+
kind: PersistentVolumeClaim
18+
metadata:
19+
name: _<my_claim>_
20+
annotations:
21+
rhdh.redhat.com/mount-path: /mount/path/from/annotation
22+
----
23+
where:
24+
25+
`rhdh.redhat.com/mount-path`:: Specifies which mount path the PVC mounts to (in this case, `/mount/path/from/annotation` directory).
26+
<my_claim>:: Specifies the PVC to mount.
27+
28+
. To specify a Secret mount path, add the `rhdh.redhat.com/mount-path` annotation to your configuration file as shown in the following example:
29+
+
30+
.Example specifying where the Secret mounts
31+
[source,yaml,subs="+attributes,+quotes"]
32+
----
33+
apiVersion: v1
34+
kind: Secret
35+
metadata:
36+
name: _<my_secret>_
37+
annotations:
38+
rhdh.redhat.com/mount-path: /mount/path/from/annotation
39+
----
40+
where:
41+
42+
<my_secret>:: Specifies the Secret name.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
:_mod-docs-content-type: PROCEDURE
2+
[id="proc-mount-secrets-pvcs-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 `*`:
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: myclaim
36+
annotations:
37+
rhdh.redhat.com/containers: "init-dynamic-plugins,backstage-backend"
38+
----
39+
+
40+
[NOTE]
41+
====
42+
This configuration mounts the `myclaim` PVC to the `init-dynamic-plugins` and `backstage-backend` containers.
43+
====

titles/configuring/master.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ 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::modules/configuring-external-databases/proc-configuring-default-configuration-for-secrets-and-pvcs.adoc[leveloffset=+1]
36+
include::assemblies/assembly-configuring-default-secret-pvc-mounts.adoc[leveloffset=+1]
3737

3838

3939
include::modules/dynamic-plugins/proc-installing-and-configuring-redis-cache.adoc[leveloffset=+1]

0 commit comments

Comments
 (0)