generated from redhat-developer/new-project-template
-
Notifications
You must be signed in to change notification settings - Fork 49
RHIDP-5515: Document default PVC and Secret configuration update #1067
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
themr0c
merged 4 commits into
redhat-developer:main
from
jmagak:RHIDP-5515-document-default-PVC-and-Secret-Configuration-2
Apr 30, 2025
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
assemblies/assembly-configuring-default-secret-pvc-mounts.adoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
||
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. | ||
|
||
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] |
40 changes: 40 additions & 0 deletions
40
modules/configuring-external-databases/proc-configuring-mount-paths.adoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
:_mod-docs-content-type: PROCEDURE | ||
[id="proc-configuring-mount-paths_{context}"] | ||
= Configuring mount paths for Secrets and PVCs | ||
|
||
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`. | ||
|
||
.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. |
43 changes: 43 additions & 0 deletions
43
modules/configuring-external-databases/proc-mounting-to-specific-containers.adoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
:_mod-docs-content-type: PROCEDURE | ||
[id="proc-mounting-to-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 `*` in your configuration file: | ||
+ | ||
.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: _<my_claim>_ | ||
annotations: | ||
rhdh.redhat.com/containers: "init-dynamic-plugins,backstage-backend" | ||
---- | ||
+ | ||
[NOTE] | ||
==== | ||
This configuration mounts the `_<my_claim>_` PVC to the `init-dynamic-plugins` and `backstage-backend` containers. | ||
==== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.