Ce contenu n'est pas disponible dans la langue sélectionnée.
Chapter 9. Configuring default mounts for Secrets and PVCs
You can configure Persistent Volume Claims (PVCs) and Secrets mount in your Red Hat Developer Hub deployment. Use annotations to define the custom mount paths and specify the containers to mount them to.
9.1. Configuring mount paths for Secrets and PVCs Copier lienLien copié sur presse-papiers!
By default, the mount path is the working directory of the Developer Hub 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-pathannotation to your configuration file as shown in the following example:Example specifying where the PVC mounts
Copy to Clipboard Copied! Toggle word wrap Toggle overflow where:
rhdh.redhat.com/mount-path-
Specifies which mount path the PVC mounts to (in this case,
/mount/path/from/annotationdirectory). - <my_claim>
- Specifies the PVC to mount.
To specify a Secret mount path, add the
rhdh.redhat.com/mount-pathannotation to your configuration file as shown in the following example:Example specifying where the Secret mounts
Copy to Clipboard Copied! Toggle word wrap Toggle overflow where:
- <my_secret>
- Specifies the Secret name.
9.2. Mounting Secrets and PVCs to specific containers Copier lienLien copié sur presse-papiers!
By default, Secrets and PVCs mount only to the Red Hat Developer Hub 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/containersannotation to*in your configuration file:Example mounting to all containers
Copy to Clipboard Copied! Toggle word wrap Toggle overflow ImportantSet
rhdh.redhat.com/containersto*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
Copy to Clipboard Copied! Toggle word wrap Toggle overflow NoteThis configuration mounts the
<my_claim>PVC to theinit-dynamic-pluginsandbackstage-backendcontainers.