Skip to content

Commit

Permalink
fix: add missing values to keto (#410)
Browse files Browse the repository at this point in the history
  • Loading branch information
Demonsthere committed Mar 8, 2022
1 parent 90216c7 commit c93a5a1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
18 changes: 11 additions & 7 deletions helm/charts/keto/templates/job-migration.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{{- if .Values.keto.autoMigrate }}
{{- $extraLabels := ternary .Values.deployment.extraLabels .Values.extraLabels (not (empty .Values.deployment.extraLabels )) -}}
{{- $extraVolumeMounts := ternary .Values.deployment.extraVolumeMounts .Values.extraVolumeMounts (not (empty .Values.deployment.extraVolumeMounts )) -}}
{{- $extraEnv := ternary .Values.deployment.extraEnv .Values.extraEnv (not (empty .Values.deployment.extraEnv )) -}}
{{- $extraVolumes := ternary .Values.deployment.extraVolumes .Values.extraVolumes (not (empty .Values.deployment.extraVolumes )) -}}
---
apiVersion: batch/v1
kind: Job
Expand All @@ -9,16 +13,13 @@ metadata:
{{- end }}
labels:
{{ include "keto.labels" . | indent 4 }}
{{- with .Values.extraLabels }}
{{- with $extraLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
annotations:
{{- with .Values.job.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
helm.sh/hook-weight: "1"
helm.sh/hook: "pre-install, pre-upgrade"
helm.sh/hook-delete-policy: "before-hook-creation,hook-succeeded"
spec:
template:
metadata:
Expand All @@ -27,7 +28,7 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- with .Values.extraLabels }}
{{- with $extraLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
Expand All @@ -50,7 +51,7 @@ spec:
- name: {{ include "keto.name" . }}-config-volume
mountPath: /etc/config
readOnly: true
{{- with .Values.extraVolumeMounts }}
{{- with $extraVolumeMounts }}
{{- toYaml . | nindent 10 }}
{{- end }}
env:
Expand All @@ -59,6 +60,9 @@ spec:
secretKeyRef:
name: {{ include "keto.secretname" . }}
key: dsn
{{- with $extraEnv }}
{{- toYaml . | nindent 10 }}
{{- end }}
securityContext:
{{- toYaml .Values.securityContext | nindent 10 }}
{{- if .Values.job.extraContainers }}
Expand All @@ -69,7 +73,7 @@ spec:
- name: {{ include "keto.name" . }}-config-volume
configMap:
name: {{ include "keto.fullname" . }}-migrate
{{- with .Values.extraVolumes }}
{{- with $extraVolumes }}
{{- toYaml . | nindent 8 }}
{{- end }}
shareProcessNamespace: {{ .Values.job.shareProcessNamespace }}
Expand Down
5 changes: 4 additions & 1 deletion helm/charts/keto/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ securityContext:
job:
# -- If you do want to specify annotations, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'annotations:'.
annotations: {}
annotations:
helm.sh/hook-weight: "1"
helm.sh/hook: "pre-install, pre-upgrade"
helm.sh/hook-delete-policy: "before-hook-creation,hook-succeeded"
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"

Expand Down

0 comments on commit c93a5a1

Please sign in to comment.