{{- if $.Values.server.enabled }} {{- range $service := (list "frontend" "history" "matching" "worker") }} apiVersion: v1 kind: ConfigMap metadata: name: "{{ include "temporal.componentname" (list $ $service) }}-config" labels: app.kubernetes.io/name: {{ include "temporal.name" $ }} helm.sh/chart: {{ include "temporal.chart" $ }} app.kubernetes.io/managed-by: {{ $.Release.Service }} app.kubernetes.io/instance: {{ $.Release.Name }} app.kubernetes.io/version: {{ $.Chart.AppVersion | replace "+" "_" }} app.kubernetes.io/part-of: {{ $.Chart.Name }} data: config_template.yaml: |- log: stdout: true level: {{ $.Values.server.config.logLevel | quote }} persistence: defaultStore: {{ $.Values.server.config.persistence.defaultStore }} {{- if or $.Values.elasticsearch.enabled $.Values.elasticsearch.external }} visibilityStore: es-visibility {{- else }} visibilityStore: visibility {{- end }} numHistoryShards: {{ $.Values.server.config.numHistoryShards }} datastores: {{- with $.Values.server.config.persistence.additionalStores }} {{- toYaml . | nindent 8 }} {{- end }} 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 }}` }}" {{- with (omit $.Values.server.config.persistence.default.cassandra "hosts" "port" "password" "existingSecret") }} {{- toYaml . | nindent 12 }} {{- end }} {{- end }} {{- with $.Values.server.config.persistence.default.faultInjection}} faultInjection: {{- toYaml . | nindent 12 }} {{- end }} {{- 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: "{{ $.Values.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 }}` }}" {{- with (omit $.Values.server.config.persistence.default.sql "driver" "driverName" "host" "port" "connectAddr" "connectProtocol" "database" "databaseName" "user" "password" "existingSecret") }} {{- toYaml . | nindent 12 }} {{- end }} {{- end }} visibility: {{- if eq (include "temporal.persistence.driver" (list $ "default")) "sql" }} sql: pluginName: "{{ include "temporal.persistence.sql.driver" (list $ "visibility") }}" driverName: "{{ include "temporal.persistence.sql.driver" (list $ "visibility") }}" databaseName: "{{ $.Values.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 }}` }}" {{- with (omit $.Values.server.config.persistence.visibility.sql "driver" "driverName" "host" "port" "connectAddr" "connectProtocol" "database" "databaseName" "user" "password" "existingSecret") }} {{- toYaml . | nindent 12 }} {{- end }} {{- end }} {{- if or $.Values.elasticsearch.enabled $.Values.elasticsearch.external }} es-visibility: elasticsearch: version: "{{ $.Values.elasticsearch.version }}" url: scheme: "{{ $.Values.elasticsearch.scheme }}" host: "{{ $.Values.elasticsearch.host }}:{{ $.Values.elasticsearch.port }}" username: "{{ $.Values.elasticsearch.username }}" password: "{{ $.Values.elasticsearch.password }}" logLevel: "{{ $.Values.elasticsearch.logLevel }}" indices: visibility: "{{ $.Values.elasticsearch.visibilityIndex }}" {{- end }} global: membership: name: temporal maxJoinDuration: 30s broadcastAddress: {{ `{{ default .Env.POD_IP "0.0.0.0" }}` }} pprof: port: 7936 metrics: tags: type: {{ $service }} {{- with $.Values.server.metrics.tags }} {{- toYaml . | nindent 10 }} {{- end }} {{- if $.Values.server.config.prometheus }} prometheus: {{- with $.Values.server.config.prometheus }} {{- toYaml . | nindent 10 }} {{- end }} {{- else }} prometheus: timerType: histogram listenAddress: "0.0.0.0:9090" {{- end }} {{- if $.Values.server.config.tls }} tls: {{- with $.Values.server.config.tls }} {{- toYaml . | nindent 10 }} {{- end }} {{- end }} services: frontend: rpc: grpcPort: {{ include "temporal.frontend.grpcPort" $ }} membershipPort: {{ include "temporal.frontend.membershipPort" $ }} bindOnIP: "0.0.0.0" history: rpc: grpcPort: {{ include "temporal.history.grpcPort" $ }} membershipPort: {{ include "temporal.history.membershipPort" $ }} bindOnIP: "0.0.0.0" matching: rpc: grpcPort: {{ include "temporal.matching.grpcPort" $ }} membershipPort: {{ include "temporal.matching.membershipPort" $ }} bindOnIP: "0.0.0.0" worker: rpc: grpcPort: {{ include "temporal.worker.grpcPort" $ }} membershipPort: {{ include "temporal.worker.membershipPort" $ }} bindOnIP: "0.0.0.0" {{- if $.Values.server.config.clusterMetadata }} clusterMetadata: {{- with $.Values.server.config.clusterMetadata }} {{- toYaml . | nindent 8 }} {{- end }} {{- else }} clusterMetadata: enableGlobalDomain: false failoverVersionIncrement: 10 masterClusterName: "active" currentClusterName: "active" clusterInformation: active: enabled: true initialFailoverVersion: 1 rpcName: "temporal-frontend" rpcAddress: "127.0.0.1:7933" {{- end }} {{- if $.Values.server.config.dcRedirectionPolicy }} dcRedirectionPolicy: {{- with $.Values.server.config.dcRedirectionPolicy }} {{- toYaml . | nindent 8 }} {{- end }} {{- else }} dcRedirectionPolicy: policy: "noop" toDC: "" {{- end }} {{- if $.Values.server.archival }} archival: {{- with $.Values.server.archival }} {{- toYaml . | nindent 6 }} {{- end }} {{- else }} archival: status: "disabled" {{- end }} {{- if $.Values.server.namespaceDefaults }} namespaceDefaults: {{- with $.Values.server.namespaceDefaults }} {{- toYaml . | nindent 6 }} {{- end }} {{- else }} {{- end }} publicClient: hostPort: "{{ include "temporal.componentname" (list $ "frontend") }}:{{ $.Values.server.frontend.service.port }}" dynamicConfigClient: filepath: "/etc/temporal/dynamic_config/dynamic_config.yaml" pollInterval: "10s" --- {{- end }} {{- end }}