refactor(charts): BREAKING CHANGE (#2836)
* Update Apps with new Common version * Patch with the secret fixes from common * fix amd
This commit is contained in:
@@ -3,7 +3,7 @@ appVersion: "14.3.0"
|
||||
dependencies:
|
||||
- name: common
|
||||
repository: https://library-charts.truecharts.org
|
||||
version: 9.3.29
|
||||
version: 10.0.8
|
||||
deprecated: false
|
||||
description: PostgresSQL
|
||||
home: https://github.com/truecharts/apps/tree/master/charts/dependency/postgresql
|
||||
@@ -22,7 +22,7 @@ name: postgresql
|
||||
sources:
|
||||
- https://www.postgresql.org/
|
||||
type: application
|
||||
version: 7.0.93
|
||||
version: 8.0.0
|
||||
annotations:
|
||||
truecharts.org/catagories: |
|
||||
- database
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: "postgres-backup-hook-config-map"
|
||||
annotations:
|
||||
rollme: {{ randAlphaNum 5 | quote }}
|
||||
data:
|
||||
entrypoint.sh: |-
|
||||
#!/bin/sh
|
||||
cmd="/docker-entrypoint.sh postgres"
|
||||
eval "${cmd}" & disown;
|
||||
until pg_isready; do
|
||||
sleep 5;
|
||||
done;
|
||||
pg_dump -U {{ .Values.postgresqlUser }} -d {{ .Values.postgresqlDatabase }} > /dbbackups/$BACKUP_NAME;
|
||||
@@ -1,2 +1,2 @@
|
||||
|
||||
{{ include "common.all" . }}
|
||||
{{ include "tc.common.loader.all" . }}
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ include "common.names.fullname" . }}
|
||||
labels:
|
||||
{{- include "common.labels" . | nindent 4 }}
|
||||
annotations:
|
||||
{{- with .Values.annotations }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
type: Opaque
|
||||
data:
|
||||
postgresql-password: {{ ( .Values.postgresqlPassword | default "empty" ) | b64enc | quote }}
|
||||
postgresql-postgres-password: {{ ( .Values.postgrespassword | default "empty" ) | b64enc | quote }}
|
||||
@@ -1,56 +0,0 @@
|
||||
{{- if and ( .Values.enableUpgradeBackup ) ( .Values.ixChartContext ) -}}
|
||||
{{- if .Values.ixChartContext.isUpgrade -}}
|
||||
{{- $upgradeDict := .Values.ixChartContext.upgradeMetadata -}}
|
||||
{{ $values := (. | mustDeepCopy) }}
|
||||
---
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: "pre-upgrade-hook2"
|
||||
annotations:
|
||||
"helm.sh/hook": pre-upgrade
|
||||
"helm.sh/hook-weight": "1"
|
||||
"helm.sh/hook-delete-policy": hook-succeeded
|
||||
rollme: {{ randAlphaNum 5 | quote }}
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
name: "pre-upgrade-hook2"
|
||||
spec:
|
||||
restartPolicy: Never
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}-postgres-backup
|
||||
image: {{ printf "%v:%v" .Values.image.repository .Values.image.tag}}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
env:
|
||||
- name: BACKUP_NAME
|
||||
value: {{- printf "postgres-backup-from-%s-to-%s-revision-%d" $upgradeDict.oldChartVersion $upgradeDict.newChartVersion (int64 $upgradeDict.preUpgradeRevision) -}}
|
||||
- name: POSTGRES_USER
|
||||
value: {{ .Values.postgresqlUsername | quote }}
|
||||
- name: POSTGRES_DB
|
||||
value: {{ .Values.postgresqlDatabase | quote }}
|
||||
- name: POSTGRES_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ ( .Values.existingSecret | default ( include "common.names.fullname" . ) ) | quote }}
|
||||
key: "postgresql-password"
|
||||
command:
|
||||
- "/bin/backup_entrypoint.sh"
|
||||
volumeMounts:
|
||||
- name: backup-script-configmap
|
||||
mountPath: /bin/backup_entrypoint.sh
|
||||
readOnly: true
|
||||
subPath: entrypoint.sh
|
||||
{{- with (include "common.controller.volumeMounts" . | trim) }}
|
||||
{{ nindent 4 . }}
|
||||
{{- end }}
|
||||
volumes:
|
||||
- name: backup-script-configmap
|
||||
configMap:
|
||||
defaultMode: 0700
|
||||
name: "postgres-backup-hook-config-map"
|
||||
{{- with (include "common.controller.volumes" . | trim) }}
|
||||
{{- nindent 2 . }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
@@ -1,7 +1,7 @@
|
||||
image:
|
||||
repository: ghcr.io/truecharts/postgresql
|
||||
pullPolicy: IfNotPresent
|
||||
tag: v14.3.0@sha256:997205be58254e4196f4afdf2d0f539b809177966f62cc9891cca037b3da37a7
|
||||
tag: v14.3.0@sha256:8ceb5ef6482804203d3b09251df17c9b202ac29e4292c6cb6559db93ca57dfc3
|
||||
|
||||
controller:
|
||||
# -- Set the controller type.
|
||||
@@ -104,17 +104,22 @@ postgresqlDatabase: "test"
|
||||
postgrespassword: "testroot"
|
||||
existingSecret: ""
|
||||
|
||||
envValueFrom:
|
||||
secret:
|
||||
credentials:
|
||||
enabled: true
|
||||
data:
|
||||
postgresql-password: '{{ ( .Values.postgresqlPassword | default "empty" ) }}'
|
||||
postgresql-postgres-password: '{{ ( .Values.postgrespassword | default "empty" ) }}'
|
||||
|
||||
env:
|
||||
POSTGRES_PASSWORD:
|
||||
secretKeyRef:
|
||||
name: '{{ ( tpl .Values.existingSecret $ ) | default ( include "common.names.fullname" . ) }}'
|
||||
name: '{{ .Values.existingSecret | default ( printf "%s-credentials" ( include "tc.common.names.fullname" . ) ) }}'
|
||||
key: "postgresql-password"
|
||||
POSTGRESQL_POSTGRES_PASSWORD:
|
||||
secretKeyRef:
|
||||
name: '{{ ( tpl .Values.existingSecret $ ) | default ( include "common.names.fullname" . ) }}'
|
||||
name: '{{ .Values.existingSecret | default ( printf "%s-credentials" ( include "tc.common.names.fullname" . ) ) }}'
|
||||
key: "postgresql-postgres-password"
|
||||
|
||||
envTpl:
|
||||
POSTGRES_USER: "{{ .Values.postgresqlUsername }}"
|
||||
POSTGRES_DB: "{{ .Values.postgresqlDatabase }}"
|
||||
# POSTGRESQL_POSTGRES_PASSWORD: "{{ .Values.postgrespassword }}"
|
||||
|
||||
Reference in New Issue
Block a user