Skip to content

Commit

Permalink
support vault init jobs
Browse files Browse the repository at this point in the history
Signed-off-by: ericsyh <[email protected]>
  • Loading branch information
ericsyh committed Nov 26, 2024
1 parent d559dee commit 53402f7
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,19 @@ spec:
{{- end }}
spec:
serviceAccountName: {{ template "pulsar.vault.serviceAccount" . }}
{{- if .Values.global.imagePullSecrets }}
imagePullSecrets: {{- toYaml .Values.global.imagePullSecrets | nindent 8 }}
{{- end }}
{{- if .Values.vault.tolerations }}
tolerations:
{{ toYaml .Values.vault.tolerations | indent 8 }}
{{- end }}
{{- if .Values.vault.nodeSelector }}
nodeSelector:
{{ toYaml .Values.vault.nodeSelector | indent 8 }}
{{- end }}
affinity:
{{- include "pulsar.antiAffinityRules" (dict "Values" .Values "thisAffinity" .Values.vault.affinity "Component" .Values.vault.component "Release" .Release "Chart" .Chart) | indent 8 }}
containers:
- name: "{{ template "pulsar.fullname" . }}-{{ .Values.vault.component }}-init"
image: "{{ .Values.images.vault_init.repository }}:{{ .Values.images.vault_init.tag }}"
Expand Down
10 changes: 10 additions & 0 deletions charts/sn-platform/templates/vault/vault-initialize.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,16 @@ spec:
{{- if .Values.global.imagePullSecrets }}
imagePullSecrets: {{- toYaml .Values.global.imagePullSecrets | nindent 8 }}
{{- end }}
{{- if .Values.vault.tolerations }}
tolerations:
{{ toYaml .Values.vault.tolerations | indent 8 }}
{{- end }}
{{- if .Values.vault.nodeSelector }}
nodeSelector:
{{ toYaml .Values.vault.nodeSelector | indent 8 }}
{{- end }}
affinity:
{{- include "pulsar.antiAffinityRules" (dict "Values" .Values "thisAffinity" .Values.vault.affinity "Component" .Values.vault.component "Release" .Release "Chart" .Chart) | indent 8 }}
containers:
- name: "{{ template "pulsar.fullname" . }}-{{ .Values.vault.component }}-init"
image: "{{ .Values.images.vault_init.repository }}:{{ .Values.images.vault_init.tag }}"
Expand Down

0 comments on commit 53402f7

Please sign in to comment.