Skip to content

Commit

Permalink
fix(openfga): allow migration without embedded db (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pedro Arvela authored Jun 6, 2023
1 parent c6cf203 commit 44c6aff
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/openfga/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: openfga
description: A Kubernetes Helm chart for the OpenFGA project.

type: application
version: 0.1.14
version: 0.1.15
appVersion: "v1.0.1"

home: "https://openfga.github.io/helm-charts/charts/openfga"
Expand Down
2 changes: 1 addition & 1 deletion charts/openfga/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ spec:
serviceAccountName: {{ include "openfga.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- if or .Values.postgres.enabled .Values.mysql.enabled }}
{{- if and (has .Values.datastore.engine (list "postgres" "mysql")) .Values.datastore.applyMigrations }}
initContainers:
- name: wait-for-migration
image: groundnuty/k8s-wait-for:v1.6
Expand Down
2 changes: 1 addition & 1 deletion charts/openfga/templates/job.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if or .Values.postgres.enabled .Values.mysql.enabled -}}
{{- if and (has .Values.datastore.engine (list "postgres" "mysql")) .Values.datastore.applyMigrations -}}
apiVersion: batch/v1
kind: Job
metadata:
Expand Down
5 changes: 5 additions & 0 deletions charts/openfga/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@
"description": "the maximum amount of time (as a duration) a connection to the datastore may be reused",
"format": "duration",
"examples": ["30s", "1m", "200ms"]
},
"applyMigrations": {
"type": "boolean",
"description": "enable/disable the job that runs migrations in the datastore",
"default": false
}
}
},
Expand Down
1 change: 1 addition & 0 deletions charts/openfga/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ datastore:
maxIdleConns:
connMaxIdleTime:
connMaxLifetime:
applyMigrations: false

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

0 comments on commit 44c6aff

Please sign in to comment.