Skip to content

Commit

Permalink
feat: add resources for migration containers (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
marlenekoh authored Nov 4, 2023
1 parent 628787d commit 7b394d7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions charts/openfga/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ spec:
{{- toYaml .Values.securityContext | nindent 12 }}
image: groundnuty/k8s-wait-for:v1.6
args: ["job", '{{ include "openfga.fullname" . }}-migrate']
resources:
{{- toYaml .Values.datastore.migrations.resources | nindent 12 }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
Expand Down
4 changes: 3 additions & 1 deletion charts/openfga/templates/job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ spec:
name: "{{ .Values.datastore.uriSecret }}"
key: "uri"
{{- end }}
resources:
{{- toYaml .Values.datastore.migrations.resources | nindent 12 }}
{{- if .Values.migrate.sidecars }}
{{- include "common.tplvalues.render" ( dict "value" .Values.sidecars "context" $) | nindent 8 }}
{{- end }}
Expand All @@ -57,4 +59,4 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
backoffLimit: 1
{{- end }}
{{- end }}
2 changes: 2 additions & 0 deletions charts/openfga/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ datastore:
connMaxIdleTime:
connMaxLifetime:
applyMigrations: true
migrations:
resources: {}

postgres:
## @param postgres.enabled enable the bitnami/postgresql subchart and deploy Postgres
Expand Down

0 comments on commit 7b394d7

Please sign in to comment.