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

BREAKING: Consolidate configuration for migrations in values.yaml #160

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion charts/openfga/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ spec:

{{- if .Values.grpc.tls.enabled }}
- name: OPENFGA_GRPC_TLS_ENABLED
value: {{ .Values.grpc.tls.enabled }}
value: "{{ .Values.grpc.tls.enabled }}"
marlenekoh marked this conversation as resolved.
Show resolved Hide resolved

- name: OPENFGA_GRPC_TLS_CERT
value: {{ .Values.grpc.tls.cert }}
Expand Down
20 changes: 10 additions & 10 deletions charts/openfga/templates/job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@ metadata:
name: {{ include "openfga.fullname" . }}-migrate
labels:
{{- include "openfga.labels" . | nindent 4 }}
{{- with .Values.migrate.labels }}
{{- with .Values.datastore.migrations.labels }}
{{- toYaml . | nindent 4}}
{{- end}}
{{- with .Values.migrate.annotations }}
{{- with .Values.datastore.migrations.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
template:
metadata:
{{- with .Values.migrate.annotations }}
{{- with .Values.datastore.migrations.annotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.migrate.labels }}
{{- with .Values.datastore.migrations.labels }}
labels:
{{- toYaml . | nindent 8 }}
{{- end }}
Expand Down Expand Up @@ -52,9 +52,9 @@ spec:
key: "uri"
{{- end }}

{{- if .Values.migrate.timeout }}
{{- if .Values.datastore.migrations.timeout }}
- name: OPENFGA_TIMEOUT
value: "{{ .Values.migrate.timeout }}"
value: "{{ .Values.datastore.migrations.timeout }}"
{{- end }}

{{- with .Values.extraEnvVars }}
Expand All @@ -63,15 +63,15 @@ spec:

resources:
{{- toYaml .Values.datastore.migrations.resources | nindent 12 }}
{{- with .Values.migrate.extraVolumeMounts }}
{{- with .Values.datastore.migrations.extraVolumeMounts }}
volumeMounts:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- if .Values.migrate.sidecars }}
{{- include "common.tplvalues.render" ( dict "value" .Values.migrate.sidecars "context" $) | nindent 8 }}
{{- if .Values.datastore.migrations.sidecars }}
{{- include "common.tplvalues.render" ( dict "value" .Values.datastore.migrations.sidecars "context" $) | nindent 8 }}
{{- end }}
restartPolicy: Never
{{- with .Values.migrate.extraVolumes }}
{{- with .Values.datastore.migrations.extraVolumes }}
volumes:
{{- toYaml . | nindent 8 }}
{{- end }}
Expand Down
20 changes: 10 additions & 10 deletions charts/openfga/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,16 @@ datastore:
repository: groundnuty/k8s-wait-for
pullPolicy: Always
tag: "v2.0"
extraVolumes: []
extraVolumeMounts: []
sidecars: []
annotations:
helm.sh/hook: "post-install, post-upgrade, post-rollback, post-delete"
helm.sh/hook-weight: "-5"
helm.sh/hook-delete-policy: "before-hook-creation"
labels: {}
timeout:


postgresql:
## @param postgresql.enabled enable the bitnami/postgresql subchart and deploy Postgres
Expand Down Expand Up @@ -318,16 +328,6 @@ affinity: {}
# - name: portname
# containerPort: 1234
sidecars: []
migrate:
extraVolumes: []
extraVolumeMounts: []
sidecars: []
annotations:
helm.sh/hook: "post-install, post-upgrade, post-rollback, post-delete"
helm.sh/hook-weight: "-5"
helm.sh/hook-delete-policy: "before-hook-creation"
labels: {}
timeout:

# -- Array of extra K8s manifests to deploy
## Note: Supports use of custom Helm templates
Expand Down