Skip to content
Snippets Groups Projects
Verified Commit cf20e9d9 authored by Janne Mareike Koschinski's avatar Janne Mareike Koschinski
Browse files

feat: add auto updater to postgres

parent 5b4a5b87
No related branches found
No related tags found
No related merge requests found
Pipeline #3061 passed
......@@ -2,5 +2,5 @@ apiVersion: v2
name: postgresql
description: Helm Chart for postgresql
type: application
version: 1.4.0
appVersion: "15"
version: 1.7.0
appVersion: "17"
......@@ -6,6 +6,10 @@ metadata:
{{- include "postgresql-helm.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
updateStrategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: "100%"
serviceName: {{ include "postgresql-helm.fullname" . }}
selector:
matchLabels:
......@@ -41,6 +45,40 @@ spec:
- emptyDir:
medium: Memory
name: shm
{{- if .Values.updater.enabled }}
initContainers:
- name: updater
image: "{{ .Values.updater.repository }}:{{ .Values.updater.tag | default (printf "%s-alpine" .Chart.AppVersion) }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
- name: PGAUTO_ONESHOT
value: "yes"
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
key: "postgres-password"
name: {{ include "postgresql-helm.fullname" . }}
securityContext:
runAsUser: 0
volumeMounts:
- mountPath: "/var/lib/postgresql/data"
name: data
subPath: "{{ .Chart.AppVersion }}/data"
- mountPath: "/configs"
name: config
- mountPath: "/dev/shm"
name: shm
{{ if .Values.tls.enabled -}}
- mountPath: "/certs/tls.crt"
name: certs
subPath: tls.crt
- mountPath: "/certs/tls.key"
name: certs
subPath: tls.key
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- end }}
containers:
- name: postgresql
securityContext:
......
......@@ -5,6 +5,12 @@ image:
pullPolicy: IfNotPresent
tag: ""
updater:
enabled: false
repository: pgautoupgrade/pgautoupgrade
pullPolicy: IfNotPresent
tag: ""
imagePullSecrets: [ ]
nameOverride: ""
fullnameOverride: ""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment