replicationcontroller-postgres.yaml 957 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. {{- if .Values.hue.database.create -}}
  2. apiVersion: v1
  3. kind: ReplicationController
  4. metadata:
  5. name: postgres-hue
  6. spec:
  7. replicas: 1
  8. template:
  9. metadata:
  10. labels:
  11. app: postgres-hue
  12. spec:
  13. containers:
  14. - name: postgres-hue
  15. image: postgres:9.5
  16. env:
  17. - name: POSTGRES_USER
  18. value: hue
  19. - name: POSTGRES_PASSWORD
  20. value: hue
  21. - name: POSTGRES_DB
  22. value: hue
  23. - name: PGDATA
  24. value: /var/lib/postgresql/data/pgdata
  25. ports:
  26. - containerPort: 5432
  27. volumeMounts:
  28. - mountPath: /var/lib/postgresql/data
  29. name: postgres-data
  30. volumes:
  31. - name: postgres-data
  32. {{ if .Values.hue.database.persist }}
  33. persistentVolumeClaim:
  34. claimName: postgres-pvc
  35. {{ else }}
  36. emptyDir: {}
  37. {{ end }}
  38. {{- end -}}