diff --git a/charts/temporal/templates/server-job.yaml b/charts/temporal/templates/server-job.yaml index 3894bc0a..71073a43 100644 --- a/charts/temporal/templates/server-job.yaml +++ b/charts/temporal/templates/server-job.yaml @@ -158,6 +158,28 @@ spec: securityContext: {{- toYaml . | nindent 12 }} {{- end }} + {{- if $namespace.searchAttributes }} + - name: create-{{ $namespace.name }}-search-attributes + image: "{{ $.Values.admintools.image.repository }}:{{ $.Values.admintools.image.tag }}" + imagePullPolicy: {{ $.Values.admintools.image.pullPolicy }} + command: ['/bin/sh','-c'] + args: ['temporal operator search-attribute create --namespace {{ $namespace.name }} {{- range $attr := $namespace.searchAttributes }} --name {{ $attr.name }} --type {{ $attr.type }}{{- end }}'] + env: + - name: TEMPORAL_ADDRESS + value: "{{ include "temporal.fullname" $ }}-frontend.{{ $.Release.Namespace }}.svc:{{ $.Values.server.frontend.service.port }}" + {{- with $.Values.server.additionalVolumeMounts }} + volumeMounts: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with $.Values.schema.resources }} + resources: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with $.Values.schema.containerSecurityContext }} + securityContext: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- end }} {{- end }} {{- end }} containers: @@ -193,4 +215,4 @@ spec: volumes: {{- toYaml . | nindent 8 }} {{- end }} -{{- end -}}{{- end -}} \ No newline at end of file +{{- end -}}{{- end -}} diff --git a/charts/temporal/values.yaml b/charts/temporal/values.yaml index 3fb59ef3..3c063984 100644 --- a/charts/temporal/values.yaml +++ b/charts/temporal/values.yaml @@ -201,6 +201,11 @@ server: namespace: - name: default retention: 3d + searchAttributes: [] + # - name: my_keyword + # type: Keyword + # - name: my_keyword2 + # type: Keyword frontend: service: # Evaluated as template