Skip to content

Commit

Permalink
v0.27.12: migration scripts in the image itself
Browse files Browse the repository at this point in the history
  • Loading branch information
zaychenko-sergei committed Jul 2, 2024
1 parent 5018c2c commit d1830bc
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 68 deletions.
2 changes: 1 addition & 1 deletion charts/kamu-api-server/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: kamu-api-server
description: API server component of the Kamu Compute Node
type: application
version: 0.27.11
version: 0.27.12
appVersion: "0.27.1"
home: https://kamu.dev
icon: https://www.kamu.dev/images/kamu_logo_icon_bg_square.png
Expand Down
20 changes: 0 additions & 20 deletions charts/kamu-api-server/scripts/fetch-db-secret.sh

This file was deleted.

15 changes: 0 additions & 15 deletions charts/kamu-api-server/scripts/run-db-migrations.sh

This file was deleted.

11 changes: 0 additions & 11 deletions charts/kamu-api-server/templates/configmap-db-scripts.yaml

This file was deleted.

23 changes: 2 additions & 21 deletions charts/kamu-api-server/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ spec:
- "/bin/sh"
- "-c"
- |
/bin/sh /fetch-db-secret.sh {{ .Values.imageMigrations.databaseSecretName }} $AWS_REGION {{ .Values.imageMigrations.databaseHost }} {{ .Values.imageMigrations.databasePort }} {{ .Values.imageMigrations.databaseName }} &&
/bin/sh /run-db-migrations.sh {{ .Values.imageMigrations.migrationsPath }}
/scripts/fetch-db-secret.sh {{ .Values.imageMigrations.databaseSecretName }} $AWS_REGION {{ .Values.imageMigrations.databaseProvider }} {{ .Values.imageMigrations.databaseHost }} {{ .Values.imageMigrations.databasePort }} {{ .Values.imageMigrations.databaseName }} &&
/scripts/run-db-migrations.sh {{ .Values.imageMigrations.migrationsPath }}
env:
- name: RUST_BACKTRACE
value: "1"
Expand Down Expand Up @@ -69,13 +69,6 @@ spec:
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumeMounts:
- name: fetch-db-secret
mountPath: /fetch-db-secret.sh
subPath: fetch-db-secret.sh
- name: run-db-migrations
mountPath: /run-db-migrations.sh
subPath: run-db-migrations.sh
containers:
- name: {{ .Chart.Name }}
securityContext:
Expand Down Expand Up @@ -144,18 +137,6 @@ spec:
- name: configs
configMap:
name: {{ include "kamu-api-server.fullname" . }}-{{ template "kamu-api-server.config.sha" . }}
- name: fetch-db-secret
configMap:
name: db-scripts
items:
- key: fetch-db-secret.sh
path: fetch-db-secret.sh
- name: run-db-migrations
configMap:
name: db-scripts
items:
- key: run-db-migrations.sh
path: run-db-migrations.sh
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
1 change: 1 addition & 0 deletions charts/kamu-api-server/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ imageMigrations:
tag: ""
migrationsPath: ""
databaseSecretName: ""
databaseProvider: postgresql
databaseHost: ""
databasePort: 5432
databaseName: ""
Expand Down

0 comments on commit d1830bc

Please sign in to comment.