50 lines
1.3 KiB
YAML
50 lines
1.3 KiB
YAML
|
{{- if .Values.remoteWrite -}}
|
||
|
{{- if .Values.remoteWrite.postgres -}}
|
||
|
{{- if .Values.remoteWrite.postgres.enabled -}}
|
||
|
{{- if .Values.remoteWrite.postgres.installLocal -}}
|
||
|
apiVersion: apps/v1
|
||
|
kind: Deployment
|
||
|
metadata:
|
||
|
name: {{ template "cost-analyzer.fullname" . }}-postgres
|
||
|
labels:
|
||
|
{{ include "cost-analyzer.commonLabels" . | nindent 4 }}
|
||
|
spec:
|
||
|
selector:
|
||
|
matchLabels:
|
||
|
app: postgres
|
||
|
strategy:
|
||
|
rollingUpdate:
|
||
|
maxSurge: 1
|
||
|
maxUnavailable: 1
|
||
|
type: RollingUpdate
|
||
|
template:
|
||
|
metadata:
|
||
|
labels:
|
||
|
app: postgres
|
||
|
spec:
|
||
|
containers:
|
||
|
- image: timescale/pg_prometheus:latest-pg11
|
||
|
name: pgprometheus
|
||
|
ports:
|
||
|
- containerPort: 5432
|
||
|
args:
|
||
|
- -csynchronous_commit=off
|
||
|
- -S 1GB
|
||
|
env:
|
||
|
- name: POSTGRES_PASSWORD
|
||
|
value: {{ .Values.remoteWrite.postgres.auth.password }}
|
||
|
- name: POSTGRES_USER
|
||
|
value: postgres
|
||
|
volumeMounts:
|
||
|
- mountPath: /var/lib/postgresql/data
|
||
|
name: postgres-pv-volume
|
||
|
subPath: postgres
|
||
|
volumes:
|
||
|
- name: postgres-pv-volume
|
||
|
persistentVolumeClaim:
|
||
|
claimName: postgres-pv-claim
|
||
|
{{- end }}
|
||
|
{{- end }}
|
||
|
{{- end }}
|
||
|
{{- end }}
|