DEPLOY-377: Add pvc for saving database data

This commit is contained in:
Sergiu-Alexandru Vidrascu
2018-02-22 11:07:24 +02:00
parent 17ca05890e
commit edb6e4e741
3 changed files with 54 additions and 5 deletions
@@ -12,4 +12,8 @@ echo "http://$IP:$PORT/share"
DNSNAME=$(kubectl get services {{ .Release.Name }}-nginx-ingress-controller -o jsonpath={.status.loadBalancer.ingress[0].hostname})
echo "http://$DNSNAME/share"
5. Note: if you deployed on a different namespace than the default one, then the kubectl commands should also specify the namespace to run in with --namespace
5. Note: if you deployed on a different namespace than the default one, then the kubectl commands should also specify the namespace to run in with --namespace
6. Depending on the storage you use for volumes you should be able to access the persisted db data in the following locations:
- On minikube the usual location is /tmp/hostpath-provisioning
- With docker-for-desktop the usual location is /Users/YourUser/.docker/Volumes/
@@ -0,0 +1,34 @@
{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }}
{{- if .Values.persistence.efs.enabled -}}
apiVersion: v1
kind: PersistentVolume
metadata:
name: "{{ .Release.Namespace }}-alfresco-volume"
spec:
capacity:
storage: {{ .Values.persistence.baseSize | quote }}
accessModes:
- ReadWriteMany
nfs:
server: "{{ .Values.persistence.efs.dns }}"
path: "{{ .Values.persistence.efs.path }}"
storageClassName: efs
---
{{- end -}}
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: content-services-database-data
spec:
accessModes:
{{ if .Values.persistence.efs.enabled }}
- ReadWriteMany
volumeName: "{{ .Release.Namespace }}-alfresco-volume"
storageClassName: efs
{{ else }}
- ReadWriteOnce
{{ end }}
resources:
requests:
storage: {{ .Values.database.persistence.size | quote }}
{{- end }}
+15 -4
View File
@@ -67,6 +67,19 @@ solr:
limits:
memory: "500Mi"
persistence:
enabled: true
baseSize: 10Gi
efs:
enabled: false
dns: fs-example.efs.us-east-1.amazonaws.com
path: "/"
database:
type: postgresql
persistence:
size: 2Gi
postgresql:
## If true, install the postgresql chart alongside Alfresco Content Services
enabled: true
@@ -76,7 +89,8 @@ postgresql:
postgresPassword: alfresco
postgresDatabase: alfresco
persistence:
enabled: false
existingClaim: "content-services-database-data"
subPath: "alfresco-content-services/database-data"
resources:
requests:
memory: "250Mi"
@@ -84,7 +98,4 @@ postgresql:
memory: "500Mi"
driver: org.postgresql.Driver
database:
type: postgresql
replicaCount: 1