| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- {{- if .Values.hue.database.create -}}
- apiVersion: apps/v1
- kind: Deployment
- metadata:
- name: postgres-hue
- spec:
- selector:
- matchLabels:
- app: postgres-hue
- strategy:
- type: Recreate
- template:
- metadata:
- labels:
- app: postgres-hue
- spec:
- containers:
- - name: postgres-hue
- image: postgres:9.5
- env:
- - name: POSTGRES_USER
- value: {{ .Values.hue.database.user }}
- - name: POSTGRES_PASSWORD
- value: {{ .Values.hue.database.password }}
- - name: POSTGRES_DB
- value: {{ .Values.hue.database.name }}
- - name: PGDATA
- value: /var/lib/postgresql/data/pgdata
- ports:
- - containerPort: {{ .Values.hue.database.port }}
- resources:
- requests:
- # memory: "350Mi"
- cpu: "20m"
- volumeMounts:
- - mountPath: /var/lib/postgresql/data
- name: postgres-data
- volumes:
- - name: postgres-data
- {{ if .Values.hue.database.persist }}
- persistentVolumeClaim:
- claimName: postgres-pvc
- {{ else }}
- emptyDir: {}
- {{ end }}
- {{- end -}}
|