Skip to content

Commit

Permalink
[ENH] Run the sysdb migration in sh so we can do env var substitition
Browse files Browse the repository at this point in the history
  • Loading branch information
beggers committed Mar 18, 2024
1 parent 2829c57 commit 2053afc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
9 changes: 7 additions & 2 deletions go/Dockerfile.migration
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
FROM arigaio/atlas:latest
workdir /app
FROM debian:bookworm-slim

RUN apt update
RUN apt upgrade -y
RUN apt install -y curl
RUN curl -sSf https://atlasgo.sh | sh -s -- --community

COPY ./go/migrations migrations
COPY ./go/atlas.hcl atlas.hcl
9 changes: 4 additions & 5 deletions k8s/distributed-chroma/templates/sysdb-migration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@ spec:
spec:
restartPolicy: OnFailure
containers:
- args:
- 'migrate'
- 'apply'
- '--url'
- "postgres://{{ .Values.sysdbMigration.username }}:{{ .Values.sysdbMigration.password }}@{{ .Values.sysdbMigration.netloc }}:{{ .Values.sysdbMigration.port }}/{{ .Values.sysdbMigration.dbName }}?sslmode={{ .Values.sysdbMigration.sslmode }}"
- command:
- "/bin/sh"
- "-c"
- "atlas migrate apply --url postgres://{{ .Values.sysdbMigration.username }}:{{ .Values.sysdbMigration.password }}@{{ .Values.sysdbMigration.netloc }}:{{ .Values.sysdbMigration.port }}/{{ .Values.sysdbMigration.dbName }}?sslmode={{ .Values.sysdbMigration.sslmode }}"
image: "{{ .Values.sysdbMigration.image.repository }}:{{ .Values.sysdbMigration.image.tag }}"
imagePullPolicy: IfNotPresent
name: migration
Expand Down

0 comments on commit 2053afc

Please sign in to comment.