Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENH] Run the sysdb migration in sh so we can do env var substitition #1887

Merged
merged 1 commit into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading