Skip to content

Commit b58369b

Browse files
GitHub Actionsjmagak
authored andcommitted
Configurable PVC mounting
1 parent f2a9639 commit b58369b

File tree

3 files changed

+83
-82
lines changed

3 files changed

+83
-82
lines changed
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
:_mod-docs-content-type: PROCEDURE
2+
[id="proc-configuring-pvc-mounts_{context}"]
3+
= Configuring Persistent Volume Claim (PVC) mounts
4+
5+
You can configure which containers the Persistent Volume Claim (PVC) mounts to by adding `rhdh.redhat.com/containers` to your configuration file. You can configure multiple secrets by using annotations to specify mount paths for each secret and target specific containers where the secrets should mount. Adding annotations ensures flexible storage and secrets management across different containers. The `default-config/deployment.yaml` file defines the dynamic plugins directory, as shown in the following example:
6+
7+
[source,yaml]
8+
----
9+
- ephemeral:
10+
volumeClaimTemplate:
11+
spec:
12+
accessModes:
13+
- ReadWriteOnce
14+
resources:
15+
requests:
16+
storage: 2Gi
17+
name: dynamic-plugins-root
18+
----
19+
20+
.Procedure
21+
22+
. Specify the container where the PVC mounts by adding the `rhdh.redhat.com/mount-path` annotation to your configuration as shown in the following example:
23+
+
24+
.Example specifying where the PVC mounts
25+
[source,yaml,subs="+attributes,+quotes"]
26+
----
27+
apiVersion: v1
28+
kind: PersistentVolumeClaim
29+
metadata:
30+
name: _<my_claim>_
31+
annotations:
32+
rhdh.redhat.com/mount-path: /mount/path/from/annotation
33+
----
34+
where:
35+
36+
`rhdh.redhat.com/mount-path`:: Specifies which container the PVC mounts to.
37+
<my_claim>:: Specifies the PVC to mount.
38+
39+
. Specify the container where the Secret mounts by adding the `rhdh.redhat.com/mount-path` annotation to your configuration as shown in the following example:
40+
+
41+
.Example specifying where the Secret mounts
42+
[source,yaml,subs="+attributes,+quotes"]
43+
----
44+
apiVersion: v1
45+
kind: Secret
46+
metadata:
47+
name: _<my_secret>_
48+
annotations:
49+
rhdh.redhat.com/mount-path: /mount/path/from/annotation
50+
----
51+
where:
52+
53+
<my_secret>:: Specifies the Secret name.
54+
55+
. Use the following configuration to mount PVCs to all containers:
56+
+
57+
.Example configuration for mounting to all containers
58+
[source,yaml,subs="+attributes,+quotes"]
59+
----
60+
metadata:
61+
name: _<my_secret>_
62+
annotations:
63+
rhdh.redhat.com/containers: `*`
64+
----
65+
+
66+
[IMPORTANT]
67+
====
68+
Set `rhdh.redhat.com/containers` to `*` to mount it to all containers in the deployment.
69+
====
70+
71+
. Optional: Use commas to separate the list of containers to mount to as shown in the following example:
72+
+
73+
.Example configuration for separating the list of containers
74+
[source,yaml,subs="+attributes,+quotes"]
75+
----
76+
apiVersion: v1
77+
kind: PersistentVolumeClaim
78+
metadata:
79+
name: myclaim
80+
annotations:
81+
rhdh.redhat.com/containers: "init-dynamic-plugins,backstage-backend"
82+
----

modules/configuring-external-databases/proc-configuring-pvc-secret-mounting.adoc

Lines changed: 0 additions & 81 deletions
This file was deleted.

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-pvc-secret-mounting.adoc[leveloffset=+1]
36+
include::modules/configuring-external-databases/proc-configuring-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)