Skip to content

Commit

Permalink
feat(openfga): allow extraInitContainers for the openfga deployment (
Browse files Browse the repository at this point in the history
…#104)

---------

Signed-off-by: aaronschweig <[email protected]>
Co-authored-by: Adrian Tam <[email protected]>
Co-authored-by: Raghd Hamzeh <[email protected]>
  • Loading branch information
3 people authored Jun 3, 2024
1 parent 936f59e commit 3564ad8
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
7 changes: 6 additions & 1 deletion charts/openfga/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ spec:
serviceAccountName: {{ include "openfga.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- if and (has .Values.datastore.engine (list "postgres" "mysql")) .Values.datastore.applyMigrations .Values.datastore.waitForMigrations }}
{{ if or (and (has .Values.datastore.engine (list "postgres" "mysql")) .Values.datastore.applyMigrations .Values.datastore.waitForMigrations) .Values.extraInitContainers }}
initContainers:
{{- if and (has .Values.datastore.engine (list "postgres" "mysql")) .Values.datastore.applyMigrations .Values.datastore.waitForMigration }}
- name: wait-for-migration
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
Expand All @@ -44,6 +45,10 @@ spec:
args: ["job", '{{ include "openfga.fullname" . }}-migrate']
resources:
{{- toYaml .Values.datastore.migrations.resources | nindent 12 }}
{{- end }}
{{- with .Values.extraInitContainers }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
Expand Down
8 changes: 8 additions & 0 deletions charts/openfga/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -959,6 +959,14 @@
},
"default": []
},
"extraInitContainers": {
"type": "array",
"description": "List of additional initContainers to add to the deployment",
"items": {
"type": "object"
},
"default": []
},
"initContainer": {
"type": "object",
"description": "",
Expand Down
1 change: 1 addition & 0 deletions charts/openfga/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ podAnnotations: {}
extraEnvVars: []
extraVolumes: []
extraVolumeMounts: []
extraInitContainers: []

podSecurityContext:
{}
Expand Down

0 comments on commit 3564ad8

Please sign in to comment.