From 33ee00505ba9c642042648f45fcedbdbb979fe1a Mon Sep 17 00:00:00 2001 From: Dariusch Ochlast Date: Mon, 4 Nov 2024 11:38:16 +0100 Subject: [PATCH] add support for namespace search-attributes Signed-off-by: Dariusch Ochlast --- charts/temporal/templates/server-job.yaml | 24 ++++++++++++++++++++++- charts/temporal/values.yaml | 5 +++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/charts/temporal/templates/server-job.yaml b/charts/temporal/templates/server-job.yaml index e1aec9c1..7d59bd6b 100644 --- a/charts/temporal/templates/server-job.yaml +++ b/charts/temporal/templates/server-job.yaml @@ -155,6 +155,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: @@ -194,4 +216,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 a5f35944..c68c3c6a 100644 --- a/charts/temporal/values.yaml +++ b/charts/temporal/values.yaml @@ -200,6 +200,11 @@ server: namespace: - name: default retention: 3d + searchAttributes: [] + # - name: my_keyword + # type: Keyword + # - name: my_keyword2 + # type: Keyword frontend: service: # Evaluated as template