119 lines
4.1 KiB
YAML
119 lines
4.1 KiB
YAML
---
|
|
apiVersion: apps/v1
|
|
kind: StatefulSet
|
|
metadata:
|
|
annotations:
|
|
{{- if .Values.global.commonAnnotations }}
|
|
{{- include "render-value" ( dict "value" .Values.global.commonAnnotations "context" .) | nindent 4 }}
|
|
{{- end }}
|
|
labels:
|
|
{{- if .Values.global.commonLabels }}
|
|
{{- include "render-value" ( dict "value" .Values.global.commonLabels "context" .) | nindent 4 }}
|
|
{{- end }}
|
|
app.kubernetes.io/part-of: federatorai
|
|
app: alameda
|
|
component: federatorai-postgresql
|
|
name: federatorai-postgresql
|
|
namespace: {{ .Release.Namespace }}
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: alameda
|
|
component: federatorai-postgresql
|
|
serviceName: federatorai-postgresql
|
|
template:
|
|
metadata:
|
|
annotations:
|
|
{{- if .Values.global.podAnnotations }}
|
|
{{- include "render-value" ( dict "value" .Values.global.podAnnotations "context" .) | nindent 8 }}
|
|
{{- end }}
|
|
labels:
|
|
{{- if .Values.global.podLabels }}
|
|
{{- include "render-value" ( dict "value" .Values.global.podLabels "context" .) | nindent 8 }}
|
|
{{- end }}
|
|
app.kubernetes.io/part-of: federatorai
|
|
app: alameda
|
|
component: federatorai-postgresql
|
|
spec:
|
|
affinity:
|
|
{{- if .Values.federatoraiPostgresql.affinity }}
|
|
{{- include "render-value" ( dict "value" .Values.federatoraiPostgresql.affinity "context" .) | nindent 8 }}
|
|
{{- end }}
|
|
containers:
|
|
- env:
|
|
- name: POSTGRES_DB
|
|
value: federatorai
|
|
- name: POSTGRES_PASSWORD
|
|
value: adminpass
|
|
- name: POSTGRES_USER
|
|
value: postgres
|
|
- name: FEDERATORAI_MAXIMUM_LOG_SIZE
|
|
value: "1932735283"
|
|
{{- if .Values.federatoraiPostgresql.image }}
|
|
image: {{ .Values.federatoraiPostgresql.image }}
|
|
{{- else }}
|
|
image: {{ .Values.global.imageRegistry }}/federatorai-postgresql:{{ .Values.global.imageTag }}
|
|
{{- end }}
|
|
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
|
|
livenessProbe:
|
|
exec:
|
|
command:
|
|
- sh
|
|
- -c
|
|
- /init.sh liveness
|
|
failureThreshold: 3
|
|
initialDelaySeconds: 600
|
|
periodSeconds: 60
|
|
successThreshold: 1
|
|
timeoutSeconds: 30
|
|
name: federatorai-postgresql
|
|
ports:
|
|
- containerPort: 5432
|
|
name: postgres
|
|
protocol: TCP
|
|
readinessProbe:
|
|
exec:
|
|
command:
|
|
- sh
|
|
- -c
|
|
- /init.sh readiness
|
|
failureThreshold: 3
|
|
initialDelaySeconds: 30
|
|
periodSeconds: 30
|
|
successThreshold: 1
|
|
timeoutSeconds: 30
|
|
resources:
|
|
{{- if .Values.global.resourcesLimitsEnabled }}
|
|
limits:
|
|
{{- include "render-value" ( dict "value" .Values.federatoraiPostgresql.resources.limits "context" .) | nindent 14 }}
|
|
{{- end }}
|
|
{{- if .Values.global.resourcesRequestsEnabled }}
|
|
requests:
|
|
{{- include "render-value" ( dict "value" .Values.federatoraiPostgresql.resources.requests "context" .) | nindent 14 }}
|
|
{{- end }}
|
|
volumeMounts:
|
|
- mountPath: /var/lib/postgresql/data
|
|
name: federatorai-postgresql-data-storage
|
|
imagePullSecrets:
|
|
{{- if .Values.global.imagePullSecrets }}
|
|
{{ include "render-value" ( dict "value" .Values.global.imagePullSecrets "context" .) | nindent 8 }}
|
|
{{- end }}
|
|
securityContext:
|
|
fsGroup: 1001
|
|
{{- if .Values.federatoraiPostgresql.podSecurityContext }}
|
|
{{- include "render-value" ( dict "value" .Values.federatoraiPostgresql.podSecurityContext "context" .) | nindent 8 }}
|
|
{{- end }}
|
|
serviceAccount: federatorai-postgresql
|
|
serviceAccountName: federatorai-postgresql
|
|
tolerations:
|
|
{{- if .Values.federatoraiPostgresql.tolerations }}
|
|
{{- include "render-value" ( dict "value" .Values.federatoraiPostgresql.tolerations "context" .) | nindent 6 }}
|
|
{{- end }}
|
|
volumes:
|
|
- name: federatorai-postgresql-data-storage
|
|
persistentVolumeClaim:
|
|
claimName: federatorai-postgresql-data.pvc
|
|
updateStrategy:
|
|
type: RollingUpdate
|