added repo

This commit is contained in:
Your Name
2026-08-26 03:39:42 +05:30
parent 45c25a95af
commit b8575bb8b9
6889 changed files with 1217125 additions and 0 deletions
@@ -0,0 +1,3 @@
To verify that Temporal has started, run:
kubectl --namespace={{ .Release.Namespace }} get pods -l "app.kubernetes.io/instance={{ .Release.Name }}"
@@ -0,0 +1,97 @@
{{- define "temporal.admintools-env" -}}
{{- $global := index . 0 -}}
{{- $store := index . 1 -}}
{{- $storeConfig := index $global.Values.server.config.persistence $store -}}
{{- $driver := include "temporal.persistence.driver" (list $global $store) -}}
{{- $driverConfig := index $storeConfig $driver }}
{{- if eq $driver "elasticsearch" -}}
{{- $driverConfig = $global.Values.elasticsearch -}}
{{- end -}}
{{- if eq $driver "cassandra" -}}
- name: CASSANDRA_HOST
value: {{ first (splitList "," (include "temporal.persistence.cassandra.hosts" (list $global $store))) }}
- name: CASSANDRA_PORT
value: {{ include "temporal.persistence.cassandra.port" (list $global $store) | quote }}
- name: CASSANDRA_KEYSPACE
value: {{ $driverConfig.keyspace }}
- name: CASSANDRA_USER
value: {{ $driverConfig.user }}
- name: CASSANDRA_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "temporal.persistence.secretName" (list $global $store) }}
key: {{ include "temporal.persistence.secretKey" (list $global $store) }}
{{- with $driverConfig.tls }}
- name: CASSANDRA_ENABLE_TLS
value: {{ .enabled | quote }}
{{- with .caFile }}
- name: CASSANDRA_TLS_CA
value: {{ . }}
{{- end }}
{{- if hasKey . "enableHostVerification" }}
- name: CASSANDRA_TLS_DISABLE_HOST_VERIFICATION
value: {{ not .enableHostVerification | quote }}
{{- end }}
{{- end }}
{{- else if eq $driver "sql" -}}
- name: SQL_PLUGIN
value: {{ include "temporal.persistence.sql.driver" (list $global $store) }}
- name: SQL_HOST
value: {{ include "temporal.persistence.sql.host" (list $global $store) }}
- name: SQL_PORT
value: {{ include "temporal.persistence.sql.port" (list $global $store) | quote }}
- name: SQL_DATABASE
value: {{ include "temporal.persistence.sql.database" (list $global $store) }}
- name: SQL_USER
value: {{ $driverConfig.user }}
- name: SQL_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "temporal.persistence.secretName" (list $global $store) }}
key: {{ include "temporal.persistence.secretKey" (list $global $store) }}
{{- with $driverConfig.connectAttributes }}
- name: SQL_CONNECT_ATTRIBUTES
value: {{ include "temporal.persistence.sql.connectAttributes" (list $global $store) | quote }}
{{- end }}
{{- with $driverConfig.tls }}
- name: SQL_TLS
value: {{ .enabled | quote }}
{{- with .caFile }}
- name: SQL_TLS_CA_FILE
value: {{ . }}
{{- end }}
{{- if and .certFile .keyFile }}
- name: SQL_TLS_CERT_FILE
value: {{ .certFile }}
- name: SQL_TLS_KEY_FILE
value: {{ .keyFile }}
{{- end }}
{{- with .serverName }}
- name: SQL_TLS_SERVER_NAME
value: {{ . }}
{{- end }}
{{- if hasKey . "enableHostVerification" }}
- name: SQL_TLS_DISABLE_HOST_VERIFICATION
value: {{ not .enableHostVerification | quote }}
{{- end }}
{{- end }}
{{- else if eq $driver "elasticsearch" -}}
- name: ES_SCHEME
value: {{ $driverConfig.scheme }}
- name: ES_HOST
value: {{ $driverConfig.host }}
- name: ES_PORT
value: {{ $driverConfig.port | quote }}
- name: ES_USER
value: {{ $driverConfig.username | quote }}
- name: ES_PWD
valueFrom:
secretKeyRef:
name: {{ include "temporal.persistence.secretName" (list $global $store) }}
key: {{ include "temporal.persistence.secretKey" (list $global $store) }}
- name: ES_VERSION
value: {{ $driverConfig.version }}
- name: ES_VISIBILITY_INDEX
value: {{ $driverConfig.visibilityIndex }}
{{- end }}
{{- end -}}
@@ -0,0 +1,453 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "temporal.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "temporal.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "temporal.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create the name of the service account
*/}}
{{- define "temporal.serviceAccountName" -}}
{{- if .Values.serviceAccount.create -}}
{{ default (include "temporal.fullname" .) .Values.serviceAccount.name }}
{{- else -}}
{{ default "default" .Values.serviceAccount.name }}
{{- end -}}
{{- end -}}
{{/*
Define the service account as needed
*/}}
{{- define "temporal.serviceAccount" -}}
serviceAccountName: {{ include "temporal.serviceAccountName" . }}
{{- end -}}
{{/*
Create a default fully qualified component name from the full app name and a component name.
We truncate the full name at 63 - 1 (last dash) - len(component name) chars because some Kubernetes name fields are limited to this (by the DNS naming spec)
and we want to make sure that the component is included in the name.
*/}}
{{- define "temporal.componentname" -}}
{{- $global := index . 0 -}}
{{- $component := index . 1 | trimPrefix "-" -}}
{{- printf "%s-%s" (include "temporal.fullname" $global | trunc (sub 62 (len $component) | int) | trimSuffix "-" ) $component | trimSuffix "-" -}}
{{- end -}}
{{/*
Define the AppVersion
*/}}
{{- define "temporal.appVersion" -}}
{{- if .Chart.AppVersion -}}
{{ .Chart.AppVersion | replace "+" "_" | quote }}
{{- else -}}
{{ include "temporal.chart" $ }}
{{- end -}}
{{- end -}}
{{/*
Create the annotations for all resources
*/}}
{{- define "temporal.resourceAnnotations" -}}
{{- $global := index . 0 -}}
{{- $scope := index . 1 -}}
{{- $resourceType := index . 2 -}}
{{- $component := "server" -}}
{{- if (or (eq $scope "admintools") (eq $scope "web")) -}}
{{- $component = $scope -}}
{{- end -}}
{{- with $resourceType -}}
{{- $resourceTypeKey := printf "%sAnnotations" . -}}
{{- $componentAnnotations := (index $global.Values $component $resourceTypeKey) -}}
{{- $scopeAnnotations := dict -}}
{{- if hasKey (index $global.Values $component) $scope -}}
{{- $scopeAnnotations = (index $global.Values $component $scope $resourceTypeKey) -}}
{{- end -}}
{{- $resourceAnnotations := merge $scopeAnnotations $componentAnnotations -}}
{{- range $annotation_name, $annotation_value := $resourceAnnotations }}
{{ $annotation_name }}: {{ $annotation_value | quote }}
{{- end -}}
{{- end -}}
{{- range $annotation_name, $annotation_value := $global.Values.additionalAnnotations }}
{{ $annotation_name }}: {{ $annotation_value | quote }}
{{- end -}}
{{- end -}}
{{/*
Create the labels for all resources
*/}}
{{- define "temporal.resourceLabels" -}}
{{- $global := index . 0 -}}
{{- $scope := index . 1 -}}
{{- $resourceType := index . 2 -}}
{{- $component := "server" -}}
{{- if (or (eq $scope "admintools") (eq $scope "web")) -}}
{{- $component = $scope -}}
{{- end -}}
{{- with $scope -}}
app.kubernetes.io/component: {{ . }}
{{ end -}}
app.kubernetes.io/name: {{ include "temporal.name" $global }}
helm.sh/chart: {{ include "temporal.chart" $global }}
app.kubernetes.io/managed-by: {{ index $global "Release" "Service" }}
app.kubernetes.io/instance: {{ index $global "Release" "Name" }}
app.kubernetes.io/version: {{ include "temporal.appVersion" $global }}
app.kubernetes.io/part-of: {{ $global.Chart.Name }}
{{- with $resourceType -}}
{{- $resourceTypeKey := printf "%sLabels" . -}}
{{- $componentLabels := (index $global.Values $component $resourceTypeKey) -}}
{{- $scopeLabels := dict -}}
{{- if hasKey (index $global.Values $component) $scope -}}
{{- $scopeLabels = (index $global.Values $component $scope $resourceTypeKey) -}}
{{- end -}}
{{- $resourceLabels := merge $scopeLabels $componentLabels -}}
{{- range $label_name, $label_value := $resourceLabels }}
{{ $label_name}}: {{ $label_value | quote }}
{{- end -}}
{{- end -}}
{{- range $label_name, $label_value := $global.Values.additionalLabels }}
{{ $label_name }}: {{ $label_value | quote }}
{{- end -}}
{{- end -}}
{{/*
Call nested templates.
Source: https://stackoverflow.com/a/52024583/3027614
*/}}
{{- define "call-nested" }}
{{- $dot := index . 0 }}
{{- $subchart := index . 1 }}
{{- $template := index . 2 }}
{{- include $template (dict "Chart" (dict "Name" $subchart) "Values" (index $dot.Values $subchart) "Release" $dot.Release "Capabilities" $dot.Capabilities) }}
{{- end }}
{{- define "temporal.persistence.schema" -}}
{{- if eq . "default" -}}
{{- print "temporal" -}}
{{- else -}}
{{- print . -}}
{{- end -}}
{{- end -}}
{{- define "temporal.persistence.driver" -}}
{{- $global := index . 0 -}}
{{- $store := index . 1 -}}
{{- $storeConfig := index $global.Values.server.config.persistence $store -}}
{{- if and (eq $store "default") $global.Values.cassandra.enabled -}}
{{- print "cassandra" -}}
{{- else if and (eq $store "visibility") (or $global.Values.elasticsearch.enabled $global.Values.elasticsearch.external) -}}
{{- print "elasticsearch" -}}
{{- else if $storeConfig.driver -}}
{{- $storeConfig.driver -}}
{{- else if $global.Values.mysql.enabled -}}
{{- print "sql" -}}
{{- else if $global.Values.postgresql.enabled -}}
{{- print "sql" -}}
{{- else -}}
{{- required (printf "Please specify persistence driver for %s store" $store) $storeConfig.driver -}}
{{- end -}}
{{- end -}}
{{- define "temporal.persistence.cassandra.hosts" -}}
{{- $global := index . 0 -}}
{{- $store := index . 1 -}}
{{- $storeConfig := index $global.Values.server.config.persistence $store -}}
{{- if $storeConfig.cassandra.hosts -}}
{{- $storeConfig.cassandra.hosts | join "," -}}
{{- else if and $global.Values.cassandra.enabled (eq (include "temporal.persistence.driver" (list $global $store)) "cassandra") -}}
{{- include "cassandra.hosts" $global -}}
{{- else -}}
{{- required (printf "Please specify cassandra hosts for %s store" $store) $storeConfig.cassandra.hosts -}}
{{- end -}}
{{- end -}}
{{- define "temporal.persistence.cassandra.port" -}}
{{- $global := index . 0 -}}
{{- $store := index . 1 -}}
{{- $storeConfig := index $global.Values.server.config.persistence $store -}}
{{- if $storeConfig.cassandra.port -}}
{{- $storeConfig.cassandra.port -}}
{{- else if and $global.Values.cassandra.enabled (eq (include "temporal.persistence.driver" (list $global $store)) "cassandra") -}}
{{- $global.Values.cassandra.config.ports.cql -}}
{{- else -}}
{{- required (printf "Please specify cassandra port for %s store" $store) $storeConfig.cassandra.port -}}
{{- end -}}
{{- end -}}
{{- define "temporal.persistence.cassandra.secretName" -}}
{{- $global := index . 0 -}}
{{- $store := index . 1 -}}
{{- $storeConfig := index $global.Values.server.config.persistence $store -}}
{{- $driverConfig := $storeConfig.cassandra -}}
{{- if $driverConfig.existingSecret -}}
{{- $driverConfig.existingSecret -}}
{{- else if $driverConfig.password -}}
{{- include "temporal.componentname" (list $global (printf "%s-store" $store)) -}}
{{- else -}}
{{/* Cassandra password is optional, but we will create an empty secret for it */}}
{{- include "temporal.componentname" (list $global (printf "%s-store" $store)) -}}
{{- end -}}
{{- end -}}
{{- define "temporal.persistence.cassandra.secretKey" -}}
{{- $global := index . 0 -}}
{{- $store := index . 1 -}}
{{- $storeConfig := index $global.Values.server.config.persistence $store -}}
{{- $driverConfig := $storeConfig.cassandra -}}
{{- with $driverConfig.secretKey -}}
{{- print . -}}
{{- else -}}
{{/* Cassandra password is optional, but we will create an empty secret for it */}}
{{- print "password" -}}
{{- end -}}
{{- end -}}
{{- define "temporal.persistence.sql.database" -}}
{{- $global := index . 0 -}}
{{- $store := index . 1 -}}
{{- $storeConfig := index $global.Values.server.config.persistence $store -}}
{{- if $storeConfig.sql.database -}}
{{- $storeConfig.sql.database -}}
{{- else -}}
{{- required (printf "Please specify database for %s store" $store) -}}
{{- end -}}
{{- end -}}
{{- define "temporal.persistence.sql.driver" -}}
{{- $global := index . 0 -}}
{{- $store := index . 1 -}}
{{- $storeConfig := index $global.Values.server.config.persistence $store -}}
{{- if $storeConfig.sql.driver -}}
{{- $storeConfig.sql.driver -}}
{{- else if $global.Values.mysql.enabled -}}
{{- print "mysql" -}}
{{- else if $global.Values.postgresql.enabled -}}
{{- print "postgres" -}}
{{- else -}}
{{- required (printf "Please specify sql driver for %s store" $store) $storeConfig.sql.host -}}
{{- end -}}
{{- end -}}
{{- define "temporal.persistence.sql.host" -}}
{{- $global := index . 0 -}}
{{- $store := index . 1 -}}
{{- $storeConfig := index $global.Values.server.config.persistence $store -}}
{{- if $storeConfig.sql.host -}}
{{- $storeConfig.sql.host -}}
{{- else if and $global.Values.mysql.enabled (and (eq (include "temporal.persistence.driver" (list $global $store)) "sql") (eq (include "temporal.persistence.sql.driver" (list $global $store)) "mysql8")) -}}
{{- include "mysql.host" $global -}}
{{- else if and $global.Values.postgresql.enabled (and (eq (include "temporal.persistence.driver" (list $global $store)) "sql") (eq (include "temporal.persistence.sql.driver" (list $global $store)) "postgres12")) -}}
{{- include "postgresql.host" $global -}}
{{- else -}}
{{- required (printf "Please specify sql host for %s store" $store) $storeConfig.sql.host -}}
{{- end -}}
{{- end -}}
{{- define "temporal.persistence.sql.port" -}}
{{- $global := index . 0 -}}
{{- $store := index . 1 -}}
{{- $storeConfig := index $global.Values.server.config.persistence $store -}}
{{- if $storeConfig.sql.port -}}
{{- $storeConfig.sql.port -}}
{{- else if and $global.Values.mysql.enabled (and (eq (include "temporal.persistence.driver" (list $global $store)) "sql") (eq (include "temporal.persistence.sql.driver" (list $global $store)) "mysql8")) -}}
{{- $global.Values.mysql.service.port -}}
{{- else if and $global.Values.postgresql.enabled (and (eq (include "temporal.persistence.driver" (list $global $store)) "sql") (eq (include "temporal.persistence.sql.driver" (list $global $store)) "postgres12")) -}}
{{- $global.Values.postgresql.service.port -}}
{{- else -}}
{{- required (printf "Please specify sql port for %s store" $store) $storeConfig.sql.port -}}
{{- end -}}
{{- end -}}
{{- define "temporal.persistence.sql.user" -}}
{{- $global := index . 0 -}}
{{- $store := index . 1 -}}
{{- $storeConfig := index $global.Values.server.config.persistence $store -}}
{{- if $storeConfig.sql.user -}}
{{- $storeConfig.sql.user -}}
{{- else if and $global.Values.mysql.enabled (and (eq (include "temporal.persistence.driver" (list $global $store)) "sql") (eq (include "temporal.persistence.sql.driver" (list $global $store)) "mysql8")) -}}
{{- $global.Values.mysql.mysqlUser -}}
{{- else if and $global.Values.postgresql.enabled (and (eq (include "temporal.persistence.driver" (list $global $store)) "sql") (eq (include "temporal.persistence.sql.driver" (list $global $store)) "postgres12")) -}}
{{- $global.Values.postgresql.postgresqlUser -}}
{{- else -}}
{{- required (printf "Please specify sql user for %s store" $store) $storeConfig.sql.user -}}
{{- end -}}
{{- end -}}
{{- define "temporal.persistence.sql.password" -}}
{{- $global := index . 0 -}}
{{- $store := index . 1 -}}
{{- $storeConfig := index $global.Values.server.config.persistence $store -}}
{{- if $storeConfig.sql.password -}}
{{- $storeConfig.sql.password -}}
{{- else if and $global.Values.mysql.enabled (and (eq (include "temporal.persistence.driver" (list $global $store)) "sql") (eq (include "temporal.persistence.sql.driver" (list $global $store)) "mysql8")) -}}
{{- if or $global.Values.schema.setup.enabled $global.Values.schema.update.enabled -}}
{{- required "Please specify password for MySQL chart" $global.Values.mysql.mysqlPassword -}}
{{- else -}}
{{- $global.Values.mysql.mysqlPassword -}}
{{- end -}}
{{- else if and $global.Values.postgresql.enabled (and (eq (include "temporal.persistence.driver" (list $global $store)) "sql") (eq (include "temporal.persistence.sql.driver" (list $global $store)) "postgres12")) -}}
{{- if or $global.Values.schema.setup.enabled $global.Values.schema.update.enabled -}}
{{- required "Please specify password for PostgreSQL chart" $global.Values.postgresql.postgresqlPassword -}}
{{- else -}}
{{- $global.Values.postgresql.postgresqlPassword -}}
{{- end -}}
{{- else -}}
{{- required (printf "Please specify sql password for %s store" $store) $storeConfig.sql.password -}}
{{- end -}}
{{- end -}}
{{- define "temporal.persistence.sql.secretName" -}}
{{- $global := index . 0 -}}
{{- $store := index . 1 -}}
{{- $storeConfig := index $global.Values.server.config.persistence $store -}}
{{- $driverConfig := $storeConfig.sql -}}
{{- if $driverConfig.existingSecret -}}
{{- $driverConfig.existingSecret -}}
{{- else if $driverConfig.secretName -}}
{{- print $driverConfig.secretName -}}
{{- else if $storeConfig.sql.password -}}
{{- include "temporal.componentname" (list $global (printf "%s-store" $store)) -}}
{{- else if and $global.Values.mysql.enabled (and (eq (include "temporal.persistence.driver" (list $global $store)) "sql") (eq (include "temporal.persistence.sql.driver" (list $global $store)) "mysql8")) -}}
{{- include "call-nested" (list $global "mysql" "mysql.secretName") -}}
{{- else if and $global.Values.postgresql.enabled (and (eq (include "temporal.persistence.driver" (list $global $store)) "sql") (eq (include "temporal.persistence.sql.driver" (list $global $store)) "postgres12")) -}}
{{- include "call-nested" (list $global "postgresql" "postgresql.secretName") -}}
{{- else -}}
{{- required (printf "Please specify sql password or existing secret for %s store" $store) $storeConfig.sql.existingSecret -}}
{{- end -}}
{{- end -}}
{{- define "temporal.persistence.sql.secretKey" -}}
{{- $global := index . 0 -}}
{{- $store := index . 1 -}}
{{- $storeConfig := index $global.Values.server.config.persistence $store -}}
{{- $driverConfig := $storeConfig.sql -}}
{{- if $driverConfig.secretKey -}}
{{- print $driverConfig.secretKey -}}
{{- else if or $driverConfig.existingSecret $driverConfig.password -}}
{{- print "password" -}}
{{- else if and $global.Values.mysql.enabled (and (eq (include "temporal.persistence.driver" (list $global $store)) "sql") (eq (include "temporal.persistence.sql.driver" (list $global $store)) "mysql8")) -}}
{{- print "mysql-password" -}}
{{- else if and $global.Values.postgresql.enabled (and (eq (include "temporal.persistence.driver" (list $global $store)) "sql") (eq (include "temporal.persistence.sql.driver" (list $global $store)) "postgres12")) -}}
{{- print "postgresql-password" -}}
{{- else -}}
{{- fail (printf "Please specify sql password or existing secret for %s store" $store) -}}
{{- end -}}
{{- end -}}
{{- define "temporal.persistence.sql.connectAttributes" -}}
{{- $global := index . 0 -}}
{{- $store := index . 1 -}}
{{- $storeConfig := index $global.Values.server.config.persistence $store -}}
{{- $driverConfig := $storeConfig.sql -}}
{{- $result := list -}}
{{- range $key, $value := $driverConfig.connectAttributes -}}
{{- $result = append $result (printf "%s=%v" $key $value) -}}
{{- end -}}
{{- join "&" $result -}}
{{- end -}}
{{- define "temporal.persistence.elasticsearch.secretName" -}}
{{- $global := index . 0 -}}
{{- $store := index . 1 -}}
{{- $driverConfig := $global.Values.elasticsearch -}}
{{- if $driverConfig.existingSecret -}}
{{- print $driverConfig.existingSecret -}}
{{- else if $driverConfig.secretName -}}
{{- print $driverConfig.secretName -}}
{{- else -}}
{{- include "temporal.componentname" (list $global (printf "%s-store" $store)) -}}
{{- end -}}
{{- end -}}
{{- define "temporal.persistence.elasticsearch.secretKey" -}}
{{- $global := index . 0 -}}
{{- $store := index . 1 -}}
{{- $driverConfig := $global.Values.elasticsearch -}}
{{- if $driverConfig.secretKey -}}
{{- print $driverConfig.secretKey -}}
{{- else -}}
{{- "password" -}}
{{- end -}}
{{- end -}}
{{- define "temporal.persistence.secretName" -}}
{{- $global := index . 0 -}}
{{- $store := index . 1 -}}
{{- include (printf "temporal.persistence.%s.secretName" (include "temporal.persistence.driver" (list $global $store))) (list $global $store) -}}
{{- end -}}
{{- define "temporal.persistence.secretKey" -}}
{{- $global := index . 0 -}}
{{- $store := index . 1 -}}
{{- include (printf "temporal.persistence.%s.secretKey" (include "temporal.persistence.driver" (list $global $store))) (list $global $store) -}}
{{- end -}}
{{/*
All Cassandra hosts.
*/}}
{{- define "cassandra.hosts" -}}
{{- range $i := (until (int .Values.cassandra.config.cluster_size)) }}
{{- $cassandraName := include "call-nested" (list $ "cassandra" "cassandra.fullname") -}}
{{- printf "%s.%s," $cassandraName $.Release.Namespace -}}
{{- end }}
{{- end -}}
{{/*
The first Cassandra host in the stateful set.
*/}}
{{- define "cassandra.host" -}}
{{- $cassandraName := include "call-nested" (list . "cassandra" "cassandra.fullname") -}}
{{- printf "%s.%s" $cassandraName .Release.Namespace -}}
{{- end -}}
{{/*
Based on Bitnami charts method
Renders a value that contains template.
Usage:
{{ include "common.tplvalues.render" ( dict "value" .Values.path.to.the.Value "context" $) }}
*/}}
{{- define "common.tplvalues.render" -}}
{{- if typeIs "string" .value }}
{{- tpl .value .context }}
{{- else }}
{{- tpl (.value | toYaml) .context }}
{{- end }}
{{- end -}}
{{/*
To modify camelCase to hyphenated internal-frontend service name
*/}}
{{- define "serviceName" -}}
{{- $service := index . 0 -}}
{{- if eq $service "internalFrontend" }}
{{- print "internal-frontend" }}
{{- else }}
{{- print $service }}
{{- end }}
{{- end -}}
@@ -0,0 +1,98 @@
{{- if $.Values.admintools.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "temporal.componentname" (list $ "admintools") }}
annotations:
{{- include "temporal.resourceAnnotations" (list $ "admintools" "deployment") | nindent 4 }}
labels:
{{- include "temporal.resourceLabels" (list $ "admintools" "deployment") | nindent 4 }}
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: {{ include "temporal.name" $ }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: admintools
template:
metadata:
annotations:
{{- include "temporal.resourceAnnotations" (list $ "admintools" "pod") | nindent 8 }}
labels:
{{- include "temporal.resourceLabels" (list $ "admintools" "pod") | nindent 8 }}
spec:
{{ include "temporal.serviceAccount" $ }}
{{- with $.Values.admintools.additionalInitContainers }}
initContainers:
{{- toYaml .| nindent 8 }}
{{- end }}
containers:
- name: admin-tools
image: "{{ .Values.admintools.image.repository }}:{{ .Values.admintools.image.tag }}"
imagePullPolicy: {{ .Values.admintools.image.pullPolicy }}
env:
# TEMPORAL_CLI_ADDRESS is deprecated, use TEMPORAL_ADDRESS instead
- name: TEMPORAL_CLI_ADDRESS
{{- if and (hasKey .Values.server "internalFrontend") .Values.server.internalFrontend.enabled }}
value: {{ include "temporal.fullname" $ }}-internal-frontend:{{ .Values.server.internalFrontend.service.port }}
{{- else }}
value: {{ include "temporal.fullname" $ }}-frontend:{{ .Values.server.frontend.service.port }}
{{- end }}
- name: TEMPORAL_ADDRESS
{{- if and (hasKey .Values.server "internalFrontend") .Values.server.internalFrontend.enabled }}
value: {{ include "temporal.fullname" $ }}-internal-frontend:{{ .Values.server.internalFrontend.service.port }}
{{- else }}
value: {{ include "temporal.fullname" $ }}-frontend:{{ .Values.server.frontend.service.port }}
{{- end }}
{{- with .Values.admintools.additionalEnv }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.admintools.additionalEnvSecretName }}
envFrom:
- secretRef:
name: {{ . }}
{{- end }}
livenessProbe:
exec:
command:
- ls
- /
initialDelaySeconds: 5
periodSeconds: 5
{{- with $.Values.admintools.additionalVolumeMounts }}
volumeMounts:
{{- toYaml . | nindent 12}}
{{- end }}
{{- with .Values.admintools.resources }}
resources:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.admintools.containerSecurityContext }}
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.admintools.securityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with $.Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with $.Values.admintools.additionalVolumes }}
volumes:
{{- toYaml . | nindent 8}}
{{- end }}
{{- with .Values.admintools.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.admintools.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.admintools.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
@@ -0,0 +1,19 @@
{{- if .Values.externalSecret.enabled }}
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: {{ include "temporal.fullname" $ }}-external-secret
spec:
dataFrom:
- extract:
conversionStrategy: Default
key: {{ .Values.externalSecret.path }}
refreshInterval: {{ .Values.externalSecret.refreshInterval }}
secretStoreRef:
kind: {{ .Values.externalSecret.secretStoreRef.kind }}
name: {{ .Values.externalSecret.secretStoreRef.name }}
target:
creationPolicy: Owner
deletionPolicy: Retain
name: {{ include "temporal.fullname" $ }}-secret
{{- end }}
@@ -0,0 +1,52 @@
{{- if .Values.server.frontend.ingress.enabled -}}
{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1" }}
apiVersion: networking.k8s.io/v1
{{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" }}
apiVersion: networking.k8s.io/v1beta1
{{- else if .Capabilities.APIVersions.Has "extensions/v1beta1" }}
apiVersion: extensions/v1beta1
{{- end }}
kind: Ingress
metadata:
name: {{ include "temporal.componentname" (list $ "frontend") }}
labels:
{{- include "temporal.resourceLabels" (list $ "frontend" "") | nindent 4 }}
{{- with .Values.server.frontend.ingress.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
spec:
{{- with .Values.server.frontend.ingress.className }}
ingressClassName: {{ . | quote }}
{{- end }}
{{- if .Values.server.frontend.ingress.tls }}
tls:
{{- range .Values.server.frontend.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range .Values.server.frontend.ingress.hosts }}
{{- $url := splitList "/" . }}
- host: {{ first $url }}
http:
paths:
- path: /{{ rest $url | join "/" }}
{{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1" }}
pathType: Prefix
backend:
service:
name: {{ include "temporal.fullname" $ }}-frontend
port:
number: {{ $.Values.server.frontend.service.port }}
{{- else if $.Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" }}
backend:
serviceName: {{ include "temporal.fullname" $ }}-frontend
servicePort: {{ $.Values.server.frontend.service.port }}
{{- end }}
{{- end}}
{{- end }}
@@ -0,0 +1,200 @@
{{- if .Values.server.enabled -}}
{{- $server := .Values.server -}}
{{- $elasticsearch := .Values.elasticsearch -}}
apiVersion: v1
kind: ConfigMap
metadata:
name: "{{ include "temporal.fullname" $ }}-config"
labels:
{{- include "temporal.resourceLabels" (list $ "" "") | nindent 4 }}
data:
config_template.yaml: |-
log:
stdout: true
level: {{ $server.config.logLevel | quote }}
persistence:
defaultStore: {{ $server.config.persistence.defaultStore }}
visibilityStore: visibility
numHistoryShards: {{ $server.config.numHistoryShards }}
datastores:
default:
{{- if eq (include "temporal.persistence.driver" (list $ "default")) "cassandra" }}
cassandra:
hosts: "{{ include "temporal.persistence.cassandra.hosts" (list $ "default") }}"
port: {{ include "temporal.persistence.cassandra.port" (list $ "default") }}
password: {{ `{{ .Env.TEMPORAL_STORE_PASSWORD | quote }}` }}
{{- with (omit $server.config.persistence.default.cassandra "hosts" "port" "password" "existingSecret") }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- else if eq (include "temporal.persistence.driver" (list $ "default")) "sql" }}
sql:
pluginName: "{{ include "temporal.persistence.sql.driver" (list $ "default") }}"
driverName: "{{ include "temporal.persistence.sql.driver" (list $ "default") }}"
databaseName: "{{ $server.config.persistence.default.sql.database }}"
connectAddr: "{{ include "temporal.persistence.sql.host" (list $ "default") }}:{{ include "temporal.persistence.sql.port" (list $ "default") }}"
connectProtocol: "tcp"
user: {{ include "temporal.persistence.sql.user" (list $ "default") }}
password: {{ `{{ .Env.TEMPORAL_STORE_PASSWORD | quote }}` }}
{{- with (omit $server.config.persistence.default.sql "driver" "driverName" "host" "port" "connectAddr" "connectProtocol" "database" "databaseName" "user" "password" "existingSecret") }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- end }}
{{- with $server.config.persistence.default.faultInjection}}
faultInjection:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with $server.config.persistence.additionalStores }}
{{- toYaml . | nindent 8 }}
{{- end }}
visibility:
{{- if or $elasticsearch.enabled $elasticsearch.external }}
elasticsearch:
version: "{{ $elasticsearch.version }}"
url:
scheme: "{{ $elasticsearch.scheme }}"
host: "{{ $elasticsearch.host }}:{{ $elasticsearch.port }}"
username: "{{ $elasticsearch.username }}"
password: {{ `{{ .Env.TEMPORAL_VISIBILITY_STORE_PASSWORD | quote }}` }}
logLevel: "{{ $elasticsearch.logLevel }}"
indices:
visibility: "{{ $elasticsearch.visibilityIndex }}"
{{- with $elasticsearch.tls }}
tls:
{{- toYaml . | nindent 16 }}
{{- end }}
{{- else if eq (include "temporal.persistence.driver" (list $ "visibility")) "sql" }}
sql:
pluginName: "{{ include "temporal.persistence.sql.driver" (list $ "visibility") }}"
driverName: "{{ include "temporal.persistence.sql.driver" (list $ "visibility") }}"
databaseName: "{{ $server.config.persistence.visibility.sql.database }}"
connectAddr: "{{ include "temporal.persistence.sql.host" (list $ "visibility") }}:{{ include "temporal.persistence.sql.port" (list $ "visibility") }}"
connectProtocol: "tcp"
user: "{{ include "temporal.persistence.sql.user" (list $ "visibility") }}"
password: {{ `{{ .Env.TEMPORAL_VISIBILITY_STORE_PASSWORD | quote }}` }}
{{- with (omit $server.config.persistence.visibility.sql "driver" "driverName" "host" "port" "connectAddr" "connectProtocol" "database" "databaseName" "user" "password" "existingSecret") }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- end }}
global:
membership:
name: temporal
maxJoinDuration: 30s
broadcastAddress: {{ `{{ default .Env.POD_IP "0.0.0.0" }}` }}
pprof:
port: 7936
metrics:
tags:
type: {{ `{{ .Env.SERVICES }}` }}
{{- with $server.metrics.tags }}
{{- toYaml . | nindent 10 }}
{{- end }}
{{- with $server.metrics.excludeTags }}
excludeTags:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- with $server.metrics.prefix }}
prefix: "{{- . }}"
{{- end }}
{{- with $server.config.prometheus }}
prometheus:
{{- toYaml . | nindent 10 }}
{{- else }}
prometheus:
timerType: histogram
listenAddress: "0.0.0.0:9090"
{{- end }}
{{- with $server.config.tls }}
tls:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- with $server.config.authorization }}
authorization:
{{- toYaml . | nindent 10 }}
{{- end }}
services:
frontend:
rpc:
grpcPort: {{ $server.frontend.service.port }}
httpPort: {{ $server.frontend.service.httpPort }}
membershipPort: {{ $server.frontend.service.membershipPort }}
bindOnIP: "0.0.0.0"
{{- if and (hasKey .Values.server "internalFrontend") .Values.server.internalFrontend.enabled }}
internal-frontend:
rpc:
grpcPort: {{ $server.internalFrontend.service.port }}
httpPort: {{ $server.internalFrontend.service.httpPort }}
membershipPort: {{ $server.internalFrontend.service.membershipPort }}
bindOnIP: "0.0.0.0"
{{- end }}
history:
rpc:
grpcPort: {{ $server.history.service.port }}
membershipPort: {{ $server.history.service.membershipPort }}
bindOnIP: "0.0.0.0"
matching:
rpc:
grpcPort: {{ $server.matching.service.port }}
membershipPort: {{ $server.matching.service.membershipPort }}
bindOnIP: "0.0.0.0"
worker:
rpc:
membershipPort: {{ $server.worker.service.membershipPort }}
bindOnIP: "0.0.0.0"
clusterMetadata:
{{- with $server.config.clusterMetadata }}
{{- toYaml . | nindent 8 }}
{{- else }}
enableGlobalDomain: false
failoverVersionIncrement: 10
masterClusterName: "active"
currentClusterName: "active"
clusterInformation:
active:
enabled: true
initialFailoverVersion: 1
rpcName: "temporal-frontend"
rpcAddress: "127.0.0.1:{{ $server.frontend.service.port }}"
httpAddress: "127.0.0.1:{{ $server.frontend.service.httpPort }}"
{{- end }}
dcRedirectionPolicy:
{{- with $server.config.dcRedirectionPolicy }}
{{- toYaml . | nindent 8 }}
{{- else }}
policy: "noop"
toDC: ""
{{- end }}
archival:
{{- with $server.archival }}
{{- toYaml . | nindent 6 }}
{{- else }}
status: "disabled"
{{- end }}
{{- with $server.namespaceDefaults }}
namespaceDefaults:
{{- toYaml . | nindent 6 }}
{{- end }}
{{- if not (and (hasKey .Values.server "internalFrontend") .Values.server.internalFrontend.enabled) }}
publicClient:
hostPort: "{{ include "temporal.componentname" (list $ "frontend") }}:{{ $server.frontend.service.port }}"
{{- end }}
dynamicConfigClient:
filepath: "/etc/temporal/dynamic_config/dynamic_config.yaml"
pollInterval: "10s"
{{- end }}
@@ -0,0 +1,190 @@
{{- if $.Values.server.enabled }}
{{- range $rawService := (list "frontend" "internalFrontend" "history" "matching" "worker") }}
{{- $service := include "serviceName" (list $rawService) }}
{{- $serviceValues := index $.Values.server $rawService }}
{{- if or (not (hasKey $serviceValues "enabled")) $serviceValues.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "temporal.componentname" (list $ $service) }}
annotations:
{{- include "temporal.resourceAnnotations" (list $ $service "deployment") | nindent 4 }}
labels:
{{- include "temporal.resourceLabels" (list $ $service "deployment") | nindent 4 }}
spec:
replicas: {{ default $.Values.server.replicaCount $serviceValues.replicaCount }}
selector:
matchLabels:
app.kubernetes.io/name: {{ include "temporal.name" $ }}
app.kubernetes.io/instance: {{ $.Release.Name }}
app.kubernetes.io/component: {{ $service }}
template:
metadata:
annotations:
checksum/config: {{ include (print $.Template.BasePath "/server-configmap.yaml") $ | sha256sum }}
{{- if (dig "metrics" "annotations" "enabled" $.Values.server.metrics.annotations.enabled $serviceValues) }}
prometheus.io/job: {{ $.Chart.Name }}-{{ $service }}
prometheus.io/scrape: 'true'
prometheus.io/port: '9090'
{{- end }}
{{- include "temporal.resourceAnnotations" (list $ $service "pod") | nindent 8 }}
labels:
{{- include "temporal.resourceLabels" (list $ $service "pod") | nindent 8 }}
spec:
{{ include "temporal.serviceAccount" $ }}
{{- if semverCompare ">=1.13.0" $.Chart.AppVersion}}
{{- with $.Values.server.securityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- if or (or $.Values.server.additionalInitContainers $.Values.cassandra.enabled) (or $.Values.elasticsearch.enabled $.Values.elasticsearch.external)}}
initContainers:
{{- with $.Values.server.additionalInitContainers }}
{{- toYaml . | nindent 8}}
{{- end }}
{{- if $.Values.cassandra.enabled }}
- name: check-cassandra
image: "{{ $.Values.cassandra.image.repo }}:{{ $.Values.cassandra.image.tag }}"
imagePullPolicy: {{ $.Values.cassandra.image.pullPolicy }}
command: ['sh', '-c', 'until cqlsh {{ include "cassandra.host" $ }} {{ $.Values.cassandra.config.ports.cql }} -e "SHOW VERSION"; do echo waiting for cassandra to start; sleep 1; done;']
{{- with $serviceValues.containerSecurityContext }}
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
- name: check-cassandra-temporal-schema
image: "{{ $.Values.cassandra.image.repo }}:{{ $.Values.cassandra.image.tag }}"
imagePullPolicy: {{ $.Values.cassandra.image.pullPolicy }}
command: ['sh', '-c', 'until cqlsh {{ include "cassandra.host" $ }} {{ $.Values.cassandra.config.ports.cql }} -e "SELECT keyspace_name FROM system_schema.keyspaces" | grep {{ $.Values.server.config.persistence.default.cassandra.keyspace }}$; do echo waiting for default keyspace to become ready; sleep 1; done;']
{{- with $serviceValues.containerSecurityContext }}
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- end }}
{{- if or $.Values.elasticsearch.enabled $.Values.elasticsearch.external }}
- name: check-elasticsearch-index
image: "{{ $.Values.admintools.image.repository }}:{{ $.Values.admintools.image.tag }}"
imagePullPolicy: {{ $.Values.admintools.image.pullPolicy }}
command: ['sh', '-c', 'until curl --silent --fail --user "$ES_USER:$ES_PWD" $ES_SCHEME://$ES_HOST:$ES_PORT/$ES_VISIBILITY_INDEX 2>&1 > /dev/null; do echo waiting for elasticsearch index to become ready; sleep 1; done;']
env:
{{- include "temporal.admintools-env" (list $ "visibility") | nindent 12 }}
{{- with $serviceValues.containerSecurityContext }}
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- end }}
{{- end }}
containers:
- name: {{ $.Chart.Name }}-{{ $service }}
image: "{{ $.Values.server.image.repository }}:{{ $.Values.server.image.tag }}"
imagePullPolicy: {{ $.Values.server.image.pullPolicy }}
env:
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: SERVICES
value: {{ $service }}
- name: TEMPORAL_STORE_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "temporal.persistence.secretName" (list $ "default") }}
key: {{ include "temporal.persistence.secretKey" (list $ "default") }}
- name: TEMPORAL_VISIBILITY_STORE_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "temporal.persistence.secretName" (list $ "visibility") }}
key: {{ include "temporal.persistence.secretKey" (list $ "visibility") }}
{{- if and (hasKey $.Values.server "internalFrontend") $.Values.server.internalFrontend.enabled }}
- name: USE_INTERNAL_FRONTEND
value: "1"
{{- end }}
{{- if $.Values.server.versionCheckDisabled }}
- name: TEMPORAL_VERSION_CHECK_DISABLED
value: "1"
{{- end }}
{{- if or $.Values.server.additionalEnv $serviceValues.additionalEnv }}
{{- toYaml (default $.Values.server.additionalEnv $serviceValues.additionalEnv) | nindent 12 }}
{{- end }}
{{- if $.Values.server.additionalEnvSecretName }}
envFrom:
- secretRef:
name: {{ $.Values.server.additionalEnvSecretName }}
{{- end }}
# For Istio service mesh - make sure ports are defined here and in the headless service, see:
# https://istio.io/latest/docs/ops/configuration/traffic-management/traffic-routing/#headless-services
ports:
{{- if ne $service "worker" }}
- name: rpc
containerPort: {{ $serviceValues.service.port }}
protocol: TCP
{{- end }}
- name: membership
containerPort: {{ $serviceValues.service.membershipPort }}
protocol: TCP
{{- if or (eq $service "frontend") (eq $service "internal-frontend") }}
- name: http
containerPort: {{ $serviceValues.service.httpPort }}
protocol: TCP
{{- end }}
- name: metrics
containerPort: 9090
protocol: TCP
{{- if ne $service "worker" }}
livenessProbe:
initialDelaySeconds: 150
tcpSocket:
port: rpc
{{- end }}
volumeMounts:
- name: config
mountPath: /etc/temporal/config/config_template.yaml
subPath: config_template.yaml
- name: dynamic-config
mountPath: /etc/temporal/dynamic_config
{{- if $.Values.server.additionalVolumeMounts }}
{{- toYaml $.Values.server.additionalVolumeMounts | nindent 12}}
{{- end }}
resources:
{{- toYaml (default $.Values.server.resources $serviceValues.resources) | nindent 12 }}
{{- with $serviceValues.containerSecurityContext }}
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with $.Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
volumes:
- name: config
configMap:
name: "{{ include "temporal.fullname" $ }}-config"
- name: dynamic-config
configMap:
name: "{{ include "temporal.fullname" $ }}-dynamic-config"
items:
- key: dynamic_config.yaml
path: dynamic_config.yaml
{{- if $.Values.server.additionalVolumes }}
{{- toYaml $.Values.server.additionalVolumes | nindent 8}}
{{- end }}
{{- with (default $.Values.server.nodeSelector $serviceValues.nodeSelector) }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with (default $.Values.server.affinity $serviceValues.affinity) }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with (default $.Values.server.tolerations $serviceValues.tolerations) }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with $serviceValues.topologySpreadConstraints }}
topologySpreadConstraints:
{{- toYaml . | nindent 8 }}
{{- end }}
---
{{- end }}
{{- end }}
{{- end }}
@@ -0,0 +1,13 @@
{{- if $.Values.server.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
name: "{{ include "temporal.fullname" $ }}-dynamic-config"
labels:
{{- include "temporal.resourceLabels" (list $ "" "") | nindent 4 }}
data:
dynamic_config.yaml: |-
{{- if $.Values.server.dynamicConfig }}
{{- toYaml .Values.server.dynamicConfig | nindent 4 }}
{{- end }}
{{- end }}
@@ -0,0 +1,218 @@
{{- if or $.Values.schema.createDatabase.enabled $.Values.schema.setup.enabled $.Values.schema.update.enabled }}
apiVersion: batch/v1
kind: Job
metadata:
name: {{ include "temporal.componentname" (list $ (printf "schema-%d" .Release.Revision | replace "." "-")) }}
labels:
{{- include "temporal.resourceLabels" (list $ "database" "") | nindent 4 }}
spec:
backoffLimit: {{ $.Values.schema.setup.backoffLimit }}
ttlSecondsAfterFinished: 86400
template:
metadata:
name: {{ include "temporal.componentname" (list $ (printf "schema-%d" .Release.Revision | replace "." "-")) }}
labels:
{{- include "temporal.resourceLabels" (list $ "database" "") | nindent 8 }}
{{- with $.Values.schema.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with $.Values.schema.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{ include "temporal.serviceAccount" $ }}
restartPolicy: OnFailure
initContainers:
{{- with $.Values.admintools.additionalInitContainers }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if $.Values.cassandra.enabled }}
- name: check-cassandra
image: "{{ $.Values.cassandra.image.repo }}:{{ $.Values.cassandra.image.tag }}"
imagePullPolicy: {{ $.Values.cassandra.image.pullPolicy }}
command: ['sh', '-c', 'until cqlsh {{ include "cassandra.host" $ }} {{ $.Values.cassandra.config.ports.cql }} -e "SHOW VERSION"; do echo waiting for cassandra to start; sleep 1; done;']
{{- with $.Values.schema.containerSecurityContext }}
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- end }}
{{- if or $.Values.elasticsearch.enabled }}
- name: check-elasticsearch
image: "{{ $.Values.admintools.image.repository }}:{{ $.Values.admintools.image.tag }}"
imagePullPolicy: {{ $.Values.admintools.image.pullPolicy }}
command: ['sh', '-c', 'until curl --silent --fail --user "$ES_USER:$ES_PWD" $ES_SCHEME://$ES_HOST:$ES_PORT 2>&1 > /dev/null; do echo waiting for elasticsearch to start; sleep 1; done;']
env:
{{- include "temporal.admintools-env" (list $ "visibility") | nindent 12 }}
{{- with $.Values.schema.containerSecurityContext }}
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- end }}
{{- if $.Values.schema.createDatabase.enabled }}
{{- range $store := (list "default" "visibility") }}
{{- $storeConfig := index $.Values.server.config.persistence $store }}
{{- $driver := include "temporal.persistence.driver" (list $ $store) }}
{{- if ne $driver "elasticsearch" }}
- name: create-{{ $store }}-store
image: "{{ $.Values.admintools.image.repository }}:{{ $.Values.admintools.image.tag }}"
imagePullPolicy: {{ $.Values.admintools.image.pullPolicy }}
{{- if eq $driver "cassandra" }}
command: ['temporal-cassandra-tool', 'create', '-k', '{{ $storeConfig.cassandra.keyspace }}', '--replication-factor', '{{ $storeConfig.cassandra.replicationFactor }}']
{{- else if eq $driver "sql" }}
command: ['temporal-sql-tool', 'create-database']
{{- end }}
env:
{{- include "temporal.admintools-env" (list $ $store) | nindent 12 }}
{{- with $.Values.admintools.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 }}
{{- if $.Values.schema.setup.enabled }}
{{- range $store := (list "default" "visibility") }}
{{- $storeConfig := index $.Values.server.config.persistence $store }}
{{- $driver := include "temporal.persistence.driver" (list $ $store) }}
- name: setup-{{ $store }}-store
image: "{{ $.Values.admintools.image.repository }}:{{ $.Values.admintools.image.tag }}"
imagePullPolicy: {{ $.Values.admintools.image.pullPolicy }}
{{- if eq $driver "cassandra" }}
command: ['temporal-cassandra-tool', 'setup-schema', '-v', '0.0']
{{- else if eq $driver "sql" }}
command: ['temporal-sql-tool', 'setup-schema', '-v', '0.0']
{{- else if eq $driver "elasticsearch" }}
command: ['sh', '-c']
args:
- 'curl -X PUT --fail --user "$ES_USER:$ES_PWD" $ES_SCHEME://$ES_HOST:$ES_PORT/_template/temporal_visibility_v1_template -H "Content-Type: application/json" --data-binary "@schema/elasticsearch/visibility/index_template_$ES_VERSION.json" 2>&1 &&
curl --head --fail --user "$ES_USER:$ES_PWD" $ES_SCHEME://$ES_HOST:$ES_PORT/$ES_VISIBILITY_INDEX 2>&1 ||
curl -X PUT --fail --user "$ES_USER:$ES_PWD" $ES_SCHEME://$ES_HOST:$ES_PORT/$ES_VISIBILITY_INDEX 2>&1'
{{- end }}
env:
{{- include "temporal.admintools-env" (list $ $store) | nindent 12 }}
{{- with $.Values.admintools.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 }}
{{- if $.Values.schema.update.enabled }}
{{- range $store := (list "default" "visibility") }}
{{- $storeConfig := index $.Values.server.config.persistence $store }}
{{- $driver := include "temporal.persistence.driver" (list $ $store) }}
{{- $schema := include "temporal.persistence.schema" $store }}
{{- if ne $driver "elasticsearch" }}
- name: update-{{ $store }}-store
image: "{{ $.Values.admintools.image.repository }}:{{ $.Values.admintools.image.tag }}"
imagePullPolicy: {{ $.Values.admintools.image.pullPolicy }}
{{- if eq $driver "cassandra" }}
command: ['temporal-cassandra-tool', 'update-schema', '--schema-dir', '/etc/temporal/schema/cassandra/{{ $schema }}/versioned']
{{- else if eq $driver "sql" }}
{{- $plugin := include "temporal.persistence.sql.driver" (list $ $store) }}
{{- if eq $plugin "mysql8" }}
command: ['temporal-sql-tool', 'update-schema', '--schema-dir', '/etc/temporal/schema/mysql/v8/{{ $schema }}/versioned']
{{- else if or (eq $plugin "postgres12") (eq $plugin "postgres12_pgx") }}
command: ['temporal-sql-tool', 'update-schema', '--schema-dir', '/etc/temporal/schema/postgresql/v12/{{ $schema }}/versioned']
{{- end }}
{{- end }}
env:
{{- include "temporal.admintools-env" (list $ $store) | nindent 12 }}
{{- with $.Values.admintools.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 }}
{{- if $.Values.server.config.namespaces.create }}
{{- range $namespace := $.Values.server.config.namespaces.namespace }}
- name: create-{{ $namespace.name }}-namespace
image: "{{ $.Values.admintools.image.repository }}:{{ $.Values.admintools.image.tag }}"
imagePullPolicy: {{ $.Values.admintools.image.pullPolicy }}
command: ['/bin/sh','-c']
args: ['temporal operator namespace describe -n {{ $namespace.name }} || temporal operator namespace create -n {{ $namespace.name }}{{- if hasKey $namespace "retention" }} --retention {{ $namespace.retention }}{{- end }}']
env:
- name: TEMPORAL_ADDRESS
{{- if and (hasKey $.Values.server "internalFrontend") $.Values.server.internalFrontend.enabled }}
value: {{ include "temporal.fullname" $ }}-internal-frontend.{{ $.Release.Namespace }}.svc:{{ $.Values.server.internalFrontend.service.port }}
{{- else if $.Values.server.frontend.ingress.enabled }}
value: "{{ index $.Values.server.frontend.ingress.hosts 0 }}"
{{- else }}
value: "{{ include "temporal.fullname" $ }}-frontend.{{ $.Release.Namespace }}.svc:{{ $.Values.server.frontend.service.port }}"
{{- end }}
{{- with $.Values.admintools.additionalEnv }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with $.Values.admintools.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 }}
containers:
- name: done
image: "{{ $.Values.admintools.image.repository }}:{{ $.Values.admintools.image.tag }}"
imagePullPolicy: {{ $.Values.admintools.image.pullPolicy }}
command: ['sh', '-c', 'echo "Store setup completed"']
{{- with $.Values.schema.resources }}
resources:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with $.Values.schema.containerSecurityContext }}
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with $.Values.schema.securityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with $.Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with $.Values.admintools.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with $.Values.admintools.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with $.Values.admintools.additionalVolumes }}
volumes:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end -}}
@@ -0,0 +1,24 @@
{{- if $.Values.server.enabled }}
{{- range $rawService := (list "frontend" "internalFrontend" "history" "matching" "worker") }}
{{- $service := include "serviceName" (list $rawService) }}
{{- $serviceValues := index $.Values.server $rawService }}
{{- if or (not (hasKey $serviceValues "enabled")) $serviceValues.enabled }}
{{- if and (gt ($serviceValues.replicaCount | int) 1) ($serviceValues.podDisruptionBudget) }}
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: {{ include "temporal.componentname" (list $ $service) }}-pdb
labels:
{{- include "temporal.resourceLabels" (list $ $service "") | nindent 4 }}
spec:
{{ toYaml $serviceValues.podDisruptionBudget }}
selector:
matchLabels:
app.kubernetes.io/name: {{ include "temporal.name" $ }}
app.kubernetes.io/instance: {{ $.Release.Name }}
app.kubernetes.io/component: {{ $service }}
{{- end }}
---
{{- end }}
{{- end }}
{{- end }}
@@ -0,0 +1,33 @@
{{- if or $.Values.server.enabled $.Values.schema.createDatabase.enabled $.Values.schema.setup.enabled $.Values.schema.update.enabled }}
{{- range $store := (list "default" "visibility") }}
{{- $storeConfig := index $.Values.server.config.persistence $store }}
{{- $driver := include "temporal.persistence.driver" (list $ $store) -}}
{{- $driverConfig := index $storeConfig $driver }}
{{- if eq $driver "elasticsearch" -}}
{{- $driverConfig = $.Values.elasticsearch -}}
{{- end -}}
{{- $secretName := include "temporal.componentname" (list $ (printf "%s-store" $store)) }}
{{- if and (not $driverConfig.existingSecret) (eq (include "temporal.persistence.secretName" (list $ $store)) $secretName) }}
apiVersion: v1
kind: Secret
metadata:
name: {{ $secretName }}
labels:
{{- include "temporal.resourceLabels" (list $ "" "secret") | nindent 4 }}
{{- with $.Values.server.secretAnnotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
type: Opaque
data:
{{- if eq $driver "cassandra" }}
password: {{ $driverConfig.password | b64enc | quote }}
{{- else if eq $driver "sql" }}
password: {{ include "temporal.persistence.sql.password" (list $ $store) | b64enc | quote }}
{{- else if eq $driver "elasticsearch" }}
password: {{ $driverConfig.password | b64enc | quote }}
{{- end }}
---
{{- end }}
{{- end }}
{{- end }}
@@ -0,0 +1,38 @@
{{- if $.Values.server.enabled }}
{{- range $rawService := (list "frontend" "internalFrontend" "matching" "history" "worker") }}
{{- $service := include "serviceName" (list $rawService) }}
{{- $serviceValues := index $.Values.server $rawService }}
{{- if or (not (hasKey $serviceValues "enabled")) $serviceValues.enabled }}
{{- if (default $.Values.server.metrics.serviceMonitor.enabled $serviceValues.metrics.serviceMonitor.enabled) }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ include "temporal.componentname" (list $ $service) }}
labels:
{{- include "temporal.resourceLabels" (list $ $service "") | nindent 4 }}
{{- with (default $.Values.server.metrics.serviceMonitor.additionalLabels $serviceValues.metrics.serviceMonitor.additionalLabels) }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
endpoints:
- port: metrics
interval: {{ default $.Values.server.metrics.serviceMonitor.interval $serviceValues.metrics.serviceMonitor.interval }}
{{- with (default $.Values.server.metrics.serviceMonitor.metricRelabelings $serviceValues.metrics.serviceMonitor.metricRelabelings) }}
metricRelabelings:
{{- toYaml . | nindent 4 }}
{{- end }}
jobLabel: {{ include "temporal.componentname" (list $ $service) }}
namespaceSelector:
matchNames:
- "{{ $.Release.Namespace }}"
selector:
matchLabels:
app.kubernetes.io/name: {{ include "temporal.name" $ }}
app.kubernetes.io/instance: {{ $.Release.Name }}
app.kubernetes.io/component: {{ $service }}
app.kubernetes.io/headless: 'true'
---
{{- end }}
{{- end }}
{{- end }}
{{- end }}
@@ -0,0 +1,98 @@
{{- if $.Values.server.enabled }}
{{- range $rawService := (list "frontend" "internalFrontend") }}
{{- $service := include "serviceName" (list $rawService) }}
{{- $serviceValues := index $.Values.server $rawService }}
apiVersion: v1
kind: Service
metadata:
name: {{ include "temporal.componentname" (list $ $service) }}
labels:
{{- include "temporal.resourceLabels" (list $ $service "") | nindent 4 }}
{{- if $serviceValues.service.annotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $serviceValues.service.annotations "context" $) | nindent 4 }}
{{- end }}
spec:
type: {{ $serviceValues.service.type }}
ports:
- port: {{ $serviceValues.service.port }}
targetPort: rpc
protocol: TCP
name: grpc-rpc
{{- if hasKey $serviceValues.service "nodePort" }}
nodePort: {{ $serviceValues.service.nodePort }}
{{- end }}
- port: {{ $serviceValues.service.httpPort }}
targetPort: http
protocol: TCP
name: http
# TODO: Allow customizing the node HTTP port
selector:
app.kubernetes.io/name: {{ include "temporal.name" $ }}
app.kubernetes.io/instance: {{ $.Release.Name }}
app.kubernetes.io/component: {{ $service }}
---
{{- end }}
{{- end }}
{{- if $.Values.server.enabled }}
{{- range $rawService := (list "frontend" "internalFrontend" "matching" "history" "worker") }}
{{- $service := include "serviceName" (list $rawService) }}
{{- $serviceValues := index $.Values.server $rawService }}
{{- if or (not (hasKey $serviceValues "enabled")) $serviceValues.enabled }}
apiVersion: v1
kind: Service
metadata:
name: {{ include "temporal.componentname" (list $ (printf "%s-headless" $service)) }}
labels:
{{- include "temporal.resourceLabels" (list $ $service "") | nindent 4 }}
app.kubernetes.io/headless: 'true'
annotations:
# Use this annotation in addition to the actual field below because the
# annotation will stop being respected soon but the field is broken in
# some versions of Kubernetes:
# https://github.com/kubernetes/kubernetes/issues/58662
service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
{{- if (dig "metrics" "annotations" "enabled" $.Values.server.metrics.annotations.enabled $serviceValues) }}
prometheus.io/job: {{ $.Chart.Name }}-{{ $service }}
prometheus.io/scrape: 'true'
prometheus.io/scheme: http
prometheus.io/port: "9090"
{{- end }}
spec:
type: ClusterIP
clusterIP: None
publishNotReadyAddresses: true
# For Istio service mesh - make sure all ports are defined here and in the deployment:
# https://istio.io/latest/docs/ops/configuration/traffic-management/traffic-routing/#headless-services
# Also for Istio - make sure to set the `appProtocol` property, see:
# https://istio.io/latest/docs/ops/configuration/traffic-management/protocol-selection/#explicit-protocol-selection
# Note that only the monitoring port is used for discovery (by prometheus).
# The other ports are listed here solely to allow Istio to configure itself to intercept traffic.
# https://istio.io/latest/docs/ops/configuration/traffic-management/traffic-routing/#headless-services
ports:
- port: {{ $serviceValues.service.port }}
targetPort: rpc
appProtocol: tcp
protocol: TCP
name: grpc-rpc
- port: {{ $serviceValues.service.membershipPort }}
targetPort: membership
appProtocol: tcp
protocol: TCP
name: grpc-membership
- port: 9090
targetPort: metrics
appProtocol: http
protocol: TCP
name: metrics
selector:
app.kubernetes.io/name: {{ include "temporal.name" $ }}
app.kubernetes.io/instance: {{ $.Release.Name }}
app.kubernetes.io/component: {{ $service }}
---
{{- end }}
{{- end }}
{{- end }}
@@ -0,0 +1,14 @@
{{- if .Values.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "temporal.serviceAccountName" $ }}
labels:
{{- include "temporal.resourceLabels" (list $ "" "") | nindent 4 }}
annotations:
helm.sh/hook: pre-install, pre-upgrade
helm.sh/hook-weight: "-10"
{{- with .Values.serviceAccount.extraAnnotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end -}}
@@ -0,0 +1,90 @@
{{- if .Values.web.enabled -}}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "temporal.componentname" (list $ "web") }}
annotations:
{{- include "temporal.resourceAnnotations" (list $ "web" "deployment") | nindent 4 }}
labels:
{{- include "temporal.resourceLabels" (list $ "web" "deployment") | nindent 4 }}
spec:
replicas: {{ .Values.web.replicaCount }}
selector:
matchLabels:
app.kubernetes.io/name: {{ include "temporal.name" $ }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: web
template:
metadata:
annotations:
{{- include "temporal.resourceAnnotations" (list $ "web" "pod") | nindent 8 }}
labels:
{{- include "temporal.resourceLabels" (list $ "web" "pod") | nindent 8 }}
spec:
{{- with .Values.web.additionalInitContainers }}
initContainers:
{{- toYaml . | nindent 8 }}
{{- end }}
{{ include "temporal.serviceAccount" $ }}
{{- if .Values.web.additionalVolumes }}
volumes:
{{- toYaml .Values.web.additionalVolumes | nindent 8 }}
{{- end }}
containers:
- name: {{ .Chart.Name }}-web
image: "{{ .Values.web.image.repository }}:{{ .Values.web.image.tag }}"
imagePullPolicy: {{ .Values.web.image.pullPolicy }}
env:
- name: TEMPORAL_ADDRESS
value: "{{ include "temporal.fullname" $ }}-frontend.{{ .Release.Namespace }}.svc:{{ .Values.server.frontend.service.port }}"
{{- if .Values.web.additionalEnv }}
{{- toYaml .Values.web.additionalEnv | nindent 12 }}
{{- end }}
{{- if .Values.web.additionalEnvSecretName }}
envFrom:
- secretRef:
name: {{ .Values.web.additionalEnvSecretName }}
{{- end }}
livenessProbe:
initialDelaySeconds: 10
tcpSocket:
port: http
ports:
- name: http
containerPort: 8080
protocol: TCP
resources:
{{- toYaml .Values.web.resources | nindent 12 }}
{{- with .Values.web.containerSecurityContext }}
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.web.additionalVolumeMounts }}
volumeMounts:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.web.securityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with $.Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.web.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.web.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.web.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.web.topologySpreadConstraints }}
topologySpreadConstraints:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
@@ -0,0 +1,52 @@
{{- if .Values.web.ingress.enabled -}}
{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1" }}
apiVersion: networking.k8s.io/v1
{{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" }}
apiVersion: networking.k8s.io/v1beta1
{{- else if .Capabilities.APIVersions.Has "extensions/v1beta1" }}
apiVersion: extensions/v1beta1
{{- end }}
kind: Ingress
metadata:
name: {{ include "temporal.componentname" (list $ "web") }}
labels:
{{- include "temporal.resourceLabels" (list $ "web" "") | nindent 4 }}
{{- with .Values.web.ingress.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
spec:
{{- with .Values.web.ingress.className }}
ingressClassName: {{ . | quote }}
{{- end }}
{{- if .Values.web.ingress.tls }}
tls:
{{- range .Values.web.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range .Values.web.ingress.hosts }}
{{- $url := splitList "/" . }}
- host: {{ first $url }}
http:
paths:
- path: /{{ rest $url | join "/" }}
{{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1" }}
pathType: Prefix
backend:
service:
name: {{ include "temporal.fullname" $ }}-web
port:
number: {{ $.Values.web.service.port }}
{{- else if $.Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" }}
backend:
serviceName: {{ include "temporal.fullname" $ }}-web
servicePort: {{ $.Values.web.service.port }}
{{- end }}
{{- end}}
{{- end }}
@@ -0,0 +1,17 @@
{{- if $.Values.web.enabled }}
{{- if $.Values.web.podDisruptionBudget }}
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: {{ include "temporal.componentname" (list $ "web") }}-pdb
labels:
{{- include "temporal.resourceLabels" (list $ "web" "") | nindent 4 }}
spec:
{{ toYaml $.Values.web.podDisruptionBudget }}
selector:
matchLabels:
app.kubernetes.io/name: {{ include "temporal.name" $ }}
app.kubernetes.io/instance: {{ $.Release.Name }}
app.kubernetes.io/component: web
{{- end }}
{{- end }}
@@ -0,0 +1,31 @@
{{- if .Values.web.enabled -}}
apiVersion: v1
kind: Service
metadata:
name: {{ include "temporal.componentname" (list $ "web") }}
labels:
{{- include "temporal.resourceLabels" (list $ "web" "") | nindent 4 }}
{{- if .Values.web.service.annotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.web.service.annotations "context" $) | nindent 4 }}
{{- end }}
spec:
{{- with .Values.web.service.loadBalancerIP }}
loadBalancerIP: {{.}}
{{- end }}
type: {{ .Values.web.service.type }}
{{- with .Values.web.service.clusterIP }}
clusterIP: {{.}}
{{- end }}
ports:
- port: {{ .Values.web.service.port }}
targetPort: http
protocol: TCP
name: http
{{- if hasKey .Values.web.service "nodePort" }}
nodePort: {{ .Values.web.service.nodePort }}
{{- end }}
selector:
app.kubernetes.io/name: {{ include "temporal.name" $ }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: web
{{- end }}