Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
:_mod-docs-content-type: ASSEMBLY
[id="assembly-configuring-default-secret-pvc-mounts_{context}"]
= Configuring default mounts for Secrets and PVCs

Check warning on line 3 in assemblies/assembly-configuring-default-secret-pvc-mounts.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [RedHat.Spelling] Verify the word 'PVCs'. It is not in the American English spelling dictionary used by Vale. Raw Output: {"message": "[RedHat.Spelling] Verify the word 'PVCs'. It is not in the American English spelling dictionary used by Vale.", "location": {"path": "assemblies/assembly-configuring-default-secret-pvc-mounts.adoc", "range": {"start": {"line": 3, "column": 46}}}, "severity": "WARNING"}

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.

Check warning on line 5 in assemblies/assembly-configuring-default-secret-pvc-mounts.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [RedHat.Spelling] Verify the word 'PVCs'. It is not in the American English spelling dictionary used by Vale. Raw Output: {"message": "[RedHat.Spelling] Verify the word 'PVCs'. It is not in the American English spelling dictionary used by Vale.", "location": {"path": "assemblies/assembly-configuring-default-secret-pvc-mounts.adoc", "range": {"start": {"line": 5, "column": 51}}}, "severity": "WARNING"}

include::modules/configuring-external-databases/proc-configuring-mount-paths.adoc[leveloffset=+1]

include::modules/configuring-external-databases/proc-mounting-to-specific-containers.adoc[leveloffset=+1]
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
:_mod-docs-content-type: PROCEDURE
[id="proc-configure-mount-path-secrets-pvcs_{context}"]
= Configuring mount paths for Secrets and PVCs

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`.

You can add the `rhdh.redhat.com/mount-path` annotation to specify a custom path.

.Procedure

. To specify a PVC mount path, add the `rhdh.redhat.com/mount-path` annotation to your configuration file as shown in the following example:
+
.Example specifying where the PVC mounts
[source,yaml,subs="+attributes,+quotes"]
----
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: _<my_claim>_
annotations:
rhdh.redhat.com/mount-path: /mount/path/from/annotation
----
where:

`rhdh.redhat.com/mount-path`:: Specifies which mount path the PVC mounts to (in this case, `/mount/path/from/annotation` directory).
<my_claim>:: Specifies the PVC to mount.

. To specify a Secret mount path, add the `rhdh.redhat.com/mount-path` annotation to your configuration file as shown in the following example:
+
.Example specifying where the Secret mounts
[source,yaml,subs="+attributes,+quotes"]
----
apiVersion: v1
kind: Secret
metadata:
name: _<my_secret>_
annotations:
rhdh.redhat.com/mount-path: /mount/path/from/annotation
----
where:

<my_secret>:: Specifies the Secret name.
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
:_mod-docs-content-type: PROCEDURE
[id="proc-mount-secrets-pvcs-specific-containers_{context}"]
= Mounting Secrets and PVCs to specific containers

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.

.Procedure

. To mount Secrets to *all* containers, set the `rhdh.redhat.com/containers` annotation to `*`:
+
.Example mounting to all containers
[source,yaml,subs="+attributes,+quotes"]
----
apiVersion: v1
kind: Secret
metadata:
name: _<my_secret>_
annotations:
rhdh.redhat.com/containers: `*`
----
+
[IMPORTANT]
====
Set `rhdh.redhat.com/containers` to `*` to mount it to all containers in the deployment.
====

. To mount to specific containers, separate the names with commas:
+
.Example separating the list of containers
[source,yaml,subs="+attributes,+quotes"]
----
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: myclaim
annotations:
rhdh.redhat.com/containers: "init-dynamic-plugins,backstage-backend"
----
+
[NOTE]
====
This configuration mounts the `myclaim` PVC to the `init-dynamic-plugins` and `backstage-backend` containers.
====
3 changes: 3 additions & 0 deletions titles/configuring/master.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,8 @@ include::modules/installation/proc-configuring-an-rhdh-instance-with-tls-in-kube
include::modules/dynamic-plugins/con-dynamic-plugins-cache.adoc[ leveloffset=+1]


include::assemblies/assembly-configuring-default-secret-pvc-mounts.adoc[leveloffset=+1]


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