Skip to content

Commit

Permalink
feat: support atlas migration, issueref kusaridev#56
Browse files Browse the repository at this point in the history
  • Loading branch information
shreyasHpandya committed Nov 20, 2024
1 parent e1a0bdd commit d74176c
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
12 changes: 12 additions & 0 deletions charts/guac/templates/graphql-server-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,18 @@ spec:
app.kubernetes.io/component: {{ .Values.guac.graphqlServer.name }}
spec:
serviceAccountName: {{ .Values.guac.graphqlServer.name }}
{{- if .Values.atlas.enabled }}
initContainers:
- name: {{ .Values.atlas.name }}
{{- if .Values.atlas.image.digest }}
image: "{{ .Values.image.repository | default .Values.guac.guacImage.repository }}@{{ .Values.atlas.image.digest }}"
{{- else }}
image: "{{ .Values.atlas.image.repository | default .Values.guac.guacImage.repository }}:{{ .Values.atlas.image.tag | default .Values.guac.guacImage.tag | default .Chart.AppVersion}}"
{{- end }}
imagePullPolicy: "{{ .Values.atlas.image.pullPolicy }}"
command:
{{ toYaml .Values.atlas.command | indent 10 }}
{{- end }}
containers:
- name: {{ .Values.guac.graphqlServer.name }}
{{- if .Values.guac.guacImage.digest }}
Expand Down
21 changes: 21 additions & 0 deletions charts/guac/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -522,3 +522,24 @@ minio:
- accessKey: accessKey
secretKey: secretKey
policy: readwrite

atlas:
enabled: true
image:
repository: ghcr.io/guacsec/guac
# if not set appVersion field from Chart.yaml is used
# tag:
# When digest is set to a non-empty value, images will be pulled by digest (regardless of tag value).
digest: ""
pullPolicy: IfNotPresent

dbAddress: ""
name: atlas-migration
command:
[
"atlas",
"migrate",
"apply",
"--dir file:///app/migrations",
"--url 'postgress://host:port/dbname?sslmode=false'",
]

0 comments on commit d74176c

Please sign in to comment.