Skip to content

Commit

Permalink
Draft migrations task
Browse files Browse the repository at this point in the history
  • Loading branch information
zaychenko-sergei committed Jun 26, 2024
1 parent d8350b6 commit a8aa3b0
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
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.26.6
version: 0.26.7
appVersion: "0.26.4"
home: https://kamu.dev
icon: https://www.kamu.dev/images/kamu_logo_icon_bg_square.png
Expand Down
18 changes: 18 additions & 0 deletions charts/kamu-api-server/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,24 @@ spec:
serviceAccountName: {{ include "kamu-api-server.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
initContainers:
- name: database-migrations
image: "{{ .Values.imageMigrations.repository }}:{{ .Values.imageMigrations.tag }}"
imagePullPolicy: {{ .Values.imageMigrations.pullPolicy }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
args:
- "migrate"
- "run"
- "--source"
- {{ .Values.imageMigrations.baseMigrationsPath }}:{{ .Values.imageMigrations.databaseProvider }}
- "--database-url"
- {{ .Values.imageMigrations.databaseConnectionString }}
env:
- name: RUST_BACKTRACE
value: "1"
resources:
{{- toYaml .Values.resources | nindent 12 }}
containers:
- name: {{ .Chart.Name }}
securityContext:
Expand Down
8 changes: 8 additions & 0 deletions charts/kamu-api-server/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ image:
# Overrides the image tag whose default is the chart appVersion.
tag: ""

imageMigrations:
repository: ghcr.io/kamu-data/sqlx-cli-with-migrations
pullPolicy: IfNotPresent
tag: ""
baseMigrationsPath: "./migrations/"
databaseProvider: ""
databaseConnectionString: ""

imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
Expand Down

0 comments on commit a8aa3b0

Please sign in to comment.