Skip to main content

Persistence

In Kubernetes or OpenShift you can set Persistence for your application or microservice.(The pvc and pv objects) This page explains you how.


1. In your manifest repository's main branch, you will find the values.yaml file, it showld be in the following folder structure [environment]/[project]/[application]

2. In the values.yaml file, search for the Additional Customizations section, you will find it like this:


## Additional Customizations #################################################

3. Bellow the section title, add the following configuration and change the values as you need:

# - Persistence
persistence:
# Enable PVC: true or false
enabled: false
mountPVC: false
mountPath: "/"
name: ""
accessMode: ReadWriteOnce
## If defined, storageClass: <storageClass>
## If set to "-", storageClass: "", which disables dynamic provisioning
## If undefined (the default) or set to null, no storageClass spec is
## set, choosing the default provisioner. (gp2 on AWS, standard on
## GKE, AWS & OpenStack)
##
storageClass: ""
additionalLabels:
key: "value"
annotations:
"helm.sh/resource-policy": keep
storageSize: 8Gi
volumeMode: ""
volumeName: ""
#####

3. Commit and enjoy! ✨