Define/attach Persistence Volume claim in application.properties

7/27/2021

I would like to define or more "attach" a persistance volume claim (which is already present in K8s and named "pvc-vol-divacms-epass") and all I can see in the documentation is that there is a property "quarkus.kubernetes.pvc-volumes" for which the type is defined as "Map<String, PersistentVolumeClaimVolume>".<br> 2 questions:

  • is that the right property to use
  • if no, which one should I use and how do I use it; if yes, how do I enter values for "Map<String, PersistentVolumeClaimVolume>" in the application.properties file?

My K8s portion in the file looks like this

quarkus.container-image.group=dwamara
quarkus.container-image.name=${quarkus.application.name}
quarkus.container-image.tag=version_tag
quarkus.kubernetes.namespace=divacms-dev

quarkus.kubernetes.ingress.expose=true
quarkus.kubernetes.ingress.host=gateway.divacms.${application.host}
-- Daniel W.
kubernetes
persistent-volume-claims
quarkus

2 Answers

7/27/2021

Just add something like:

quarkus.kubernetes.pvc-volumes.epass.claim-name=pvc-vol-divacms-epass
quarkus.kubernetes.pvc-volumes.db.readonly=false

to application.properties.

-- geoand
Source: StackOverflow

7/27/2021

Thanks, you saved my life :-) I've added

quarkus.kubernetes.mounts.epass.path=${qrcode.folder}
quarkus.kubernetes.pvc-volumes.epass.claim-name=pvc-vol-divacms-epass
quarkus.kubernetes.pvc-volumes.db.readonly=false

and it did the trick.

Thanks, D.

-- Daniel W.
Source: StackOverflow