mirror of
https://github.com/truenas/charts.git
synced 2026-04-13 17:52:13 +08:00
57 lines
1.9 KiB
YAML
57 lines
1.9 KiB
YAML
{{ if .Values.logsearchapi.enabled }}
|
|
{{ $values := (. | mustDeepCopy) }}
|
|
{{ $_ := set $values "common" (dict "nameSuffix" (include "postgres.nameSuffix" .)) }}
|
|
{{ include "common.deployment.common_config" $values | nindent 0 }}
|
|
spec:
|
|
replicas: {{ (default 1 .Values.replicas) }}
|
|
strategy:
|
|
type: Recreate
|
|
selector:
|
|
matchLabels:
|
|
app: {{ template "common.names.name" . }}
|
|
release: {{ .Release.Name }}
|
|
template: {{ include "common.deployment.pod.metadata" $values | nindent 4 }}
|
|
spec:
|
|
containers:
|
|
- name: {{ .Chart.Name }}-{{ include "postgres.nameSuffix" .}}
|
|
image: {{ template "postgres.imageName" . }}
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
env: {{ include "postgres.envVariableConfiguration" $values | nindent 10 }}
|
|
volumeMounts: {{ include "postgres.volumeMountsConfiguration" $values | nindent 10 }}
|
|
ports:
|
|
- name: postgres-tcp
|
|
containerPort: 5432
|
|
protocol: TCP
|
|
readinessProbe:
|
|
exec:
|
|
command:
|
|
- sh
|
|
- -c
|
|
- "until pg_isready -U${POSTGRES_USER} -h localhost; do sleep 2; done"
|
|
initialDelaySeconds: 15
|
|
failureThreshold: 5
|
|
periodSeconds: 15
|
|
timeoutSeconds: 2
|
|
livenessProbe:
|
|
exec:
|
|
command:
|
|
- sh
|
|
- -c
|
|
- "until pg_isready -U${POSTGRES_USER} -h localhost; do sleep 2; done"
|
|
initialDelaySeconds: 15
|
|
failureThreshold: 5
|
|
periodSeconds: 15
|
|
timeoutSeconds: 2
|
|
startupProbe:
|
|
exec:
|
|
command:
|
|
- sh
|
|
- -c
|
|
- "until pg_isready -U${POSTGRES_USER} -h localhost; do sleep 2; done"
|
|
initialDelaySeconds: 15
|
|
failureThreshold: 20
|
|
periodSeconds: 15
|
|
timeoutSeconds: 2
|
|
volumes: {{ include "postgres.volumeConfiguration" $values | nindent 8 }}
|
|
{{ end }}
|