diff --git a/automation/dbp-moodle/Chart.lock b/automation/dbp-moodle/Chart.lock index bc0d27718..09f30eb2f 100644 --- a/automation/dbp-moodle/Chart.lock +++ b/automation/dbp-moodle/Chart.lock @@ -27,4 +27,4 @@ dependencies: repository: https://burningalchemist.github.io/sql_exporter/ version: 0.6.1 digest: sha256:c2d696cb5b0cfe3096fabb66d1fbdf72969e84cf33898a25fd8f218e6bdca87b -generated: "2024-11-07T14:21:32.734524736Z" +generated: "2024-11-08T11:40:05.97016554Z" diff --git a/automation/dbp-moodle/Chart.yaml b/automation/dbp-moodle/Chart.yaml index bc13029f8..a18077e1e 100644 --- a/automation/dbp-moodle/Chart.yaml +++ b/automation/dbp-moodle/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v2 -appVersion: DBP-1051 +appVersion: DBP-000 dependencies: - name: moodle repository: https://charts.bitnami.com/bitnami @@ -47,4 +47,4 @@ description: 'This is a Helm Chart bundling some of the bitnami resources to dep home: https://dbildungsplattform.github.io/dbp-moodle/ name: dbp-moodle type: application -version: 0.0.0-dbp-1051-20241107-1421 +version: 0.0.0-dbp-000-20241108-1139 diff --git a/automation/dbp-moodle/scripts/hook/moodle-update-preparation.sh b/automation/dbp-moodle/scripts/hook/moodle-update-preparation.sh index 60be4db36..705957a5e 100644 --- a/automation/dbp-moodle/scripts/hook/moodle-update-preparation.sh +++ b/automation/dbp-moodle/scripts/hook/moodle-update-preparation.sh @@ -4,16 +4,12 @@ set -o errexit set -o nounset set -o pipefail -health_file="/tmp/healthy" - get_current_deployment_image() { kubectl get "deploy/{{ .Release.Name }}" -n "{{ .Release.Namespace }}" -o jsonpath='{..image}' |\ tr -s '[:space:]' '\n' |\ grep '{{- .Values.moodle.image.repository -}}' } -touch "${health_file}" - printf "Checking if update preparations are needed\n" new_image="{{- .Values.moodle.image.registry -}}/{{- .Values.moodle.image.repository -}}:{{- .Values.moodle.image.tag -}}" diff --git a/automation/dbp-moodle/templates/chart-hooks/moodle-update-preparation-job.yaml b/automation/dbp-moodle/templates/chart-hooks/moodle-update-preparation-job.yaml index 455a7c30a..1294893ac 100644 --- a/automation/dbp-moodle/templates/chart-hooks/moodle-update-preparation-job.yaml +++ b/automation/dbp-moodle/templates/chart-hooks/moodle-update-preparation-job.yaml @@ -1,4 +1,4 @@ -{{ if not .Values.dbpMoodle.restore.enabled }} +{{ if and Values.dbpMoodle.update_migration.enabled (not .Values.dbpMoodle.restore.enabled) }} apiVersion: batch/v1 kind: Job metadata: @@ -24,20 +24,6 @@ spec: - name: script-volume mountPath: /moodle-update-preparation.sh subPath: moodle-update-preparation.sh - livenessProbe: - exec: - command: - - cat - - /tmp/healthy - initialDelaySeconds: 10 - periodSeconds: 10 - readinessProbe: - exec: - command: - - cat - - /tmp/healthy - initialDelaySeconds: 10 - periodSeconds: 10 affinity: {{ .Values.dbpMoodle.moodleUpdatePreparationJob.affinity | toYaml }} tolerations: {{ .Values.dbpMoodle.moodleUpdatePreparationJob.tolerations | toYaml }} serviceAccountName: "{{ .Release.Name }}-moodle-update-preparation-hook-serviceaccount" diff --git a/automation/dbp-moodle/templates/secrets/moodle-secret.yaml b/automation/dbp-moodle/templates/secrets/moodle-secret.yaml index 67a3f4b52..c5fe03839 100644 --- a/automation/dbp-moodle/templates/secrets/moodle-secret.yaml +++ b/automation/dbp-moodle/templates/secrets/moodle-secret.yaml @@ -3,7 +3,7 @@ apiVersion: v1 kind: Secret type: Opaque metadata: - name: "{{ .Release.Name }}" + name: "moodle" namespace: "{{ .Release.Namespace }}" stringData: moodle-password: {{ include "dbpMoodle.secrets.moodle_password" . }}