From 4f5ea9c06add9d3f6c9a565d896d2f44716a3b9d Mon Sep 17 00:00:00 2001 From: Miguel Martinez Trivino Date: Mon, 11 Sep 2023 14:25:20 +0200 Subject: [PATCH] chore: rebase Signed-off-by: Miguel Martinez Trivino --- deployment/chainloop/Chart.yaml | 2 +- .../templates/controlplane/deployment.yaml | 11 ++++++ .../templates/controlplane/migrate-job.yaml | 34 ------------------- 3 files changed, 12 insertions(+), 35 deletions(-) delete mode 100644 deployment/chainloop/templates/controlplane/migrate-job.yaml diff --git a/deployment/chainloop/Chart.yaml b/deployment/chainloop/Chart.yaml index f4f5cf6a5..1fe8b3c53 100644 --- a/deployment/chainloop/Chart.yaml +++ b/deployment/chainloop/Chart.yaml @@ -4,7 +4,7 @@ description: Chainloop is an open source software supply chain control plane, a type: application # Bump the patch (not minor, not major) version on each change in the Chart Source code -version: 1.15.0 +version: 1.15.1 # Do not update appVersion, this is handled automatically by the release process appVersion: v0.17.1 diff --git a/deployment/chainloop/templates/controlplane/deployment.yaml b/deployment/chainloop/templates/controlplane/deployment.yaml index 765e2afe4..2991848e7 100644 --- a/deployment/chainloop/templates/controlplane/deployment.yaml +++ b/deployment/chainloop/templates/controlplane/deployment.yaml @@ -28,6 +28,17 @@ spec: serviceAccountName: {{ include "controlplane.serviceAccountName" . }} securityContext: {{- toYaml .Values.controlplane.podSecurityContext | nindent 8 }} + initContainers: + - name: migrate + image: "{{ .Values.controlplane.migration.image.repository }}:{{ .Values.controlplane.migration.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.controlplane.image.pullPolicy }} + args: + - migrate + - apply + - --url + - "{{include "controlplane.database.atlas_connection_string" . }}" + - --dir + - file:///migrations containers: - name: {{ .Chart.Name }} securityContext: diff --git a/deployment/chainloop/templates/controlplane/migrate-job.yaml b/deployment/chainloop/templates/controlplane/migrate-job.yaml deleted file mode 100644 index 35a2b932c..000000000 --- a/deployment/chainloop/templates/controlplane/migrate-job.yaml +++ /dev/null @@ -1,34 +0,0 @@ -apiVersion: batch/v1 -kind: Job -metadata: - name: {{ include "chainloop.controlplane.fullname" . }}-migrate - labels: - {{- include "chainloop.controlplane.migration.labels" . | nindent 4 }} - annotations: - "helm.sh/hook": post-install,pre-upgrade - "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded -spec: - template: - metadata: - labels: - {{- include "chainloop.controlplane.migration.labels" . | nindent 8 }} - spec: - {{- with .Values.controlplane.image.pullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - restartPolicy: OnFailure - serviceAccountName: {{ include "controlplane.serviceAccountName" . }} - securityContext: - {{- toYaml .Values.controlplane.podSecurityContext | nindent 8 }} - containers: - - name: migrate - image: "{{ .Values.controlplane.migration.image.repository }}:{{ .Values.controlplane.migration.image.tag | default .Chart.AppVersion }}" - imagePullPolicy: {{ .Values.controlplane.image.pullPolicy }} - args: - - migrate - - apply - - --url - - "{{include "controlplane.database.atlas_connection_string" . }}" - - --dir - - file:///migrations \ No newline at end of file