Skip to content

Commit

Permalink
Merge branch 'temporalio:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Dariusch authored Jan 16, 2025
2 parents 6157dd3 + 81cc46d commit 467f30b
Show file tree
Hide file tree
Showing 11 changed files with 123 additions and 26 deletions.
4 changes: 2 additions & 2 deletions charts/temporal/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ dependencies:
type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 0.52.0
version: 0.54.0
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: 1.25.2
appVersion: 1.26.2
14 changes: 13 additions & 1 deletion charts/temporal/templates/_admintools-env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,18 @@
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) }}
Expand Down Expand Up @@ -82,4 +94,4 @@
- name: ES_VISIBILITY_INDEX
value: {{ $driverConfig.visibilityIndex }}
{{- end }}
{{- end -}}
{{- end -}}
12 changes: 12 additions & 0 deletions charts/temporal/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -439,3 +439,15 @@ Usage:
{{- 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 -}}
8 changes: 8 additions & 0 deletions charts/temporal/templates/admintools-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,17 @@ spec:
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 }}
{{- if .Values.admintools.additionalEnv }}
{{- toYaml .Values.admintools.additionalEnv | nindent 12 }}
{{- end }}
Expand Down
11 changes: 11 additions & 0 deletions charts/temporal/templates/server-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,15 @@ data:
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 }}
Expand Down Expand Up @@ -177,8 +186,10 @@ data:
{{- 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"
Expand Down
13 changes: 10 additions & 3 deletions charts/temporal/templates/server-deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{{- if $.Values.server.enabled }}
{{- range $service := (list "frontend" "history" "matching" "worker") }}
{{ $serviceValues := index $.Values.server $service }}
{{- 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:
Expand Down Expand Up @@ -84,6 +86,10 @@ spec:
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"
Expand All @@ -102,7 +108,7 @@ spec:
containerPort: {{ $serviceValues.service.port }}
protocol: TCP
{{- end }}
{{- if eq $service "frontend" }}
{{- if or (eq $service "frontend") (eq $service "internal-frontend") }}
- name: http
containerPort: {{ $serviceValues.service.httpPort }}
protocol: TCP
Expand Down Expand Up @@ -170,3 +176,4 @@ spec:
---
{{- end }}
{{- end }}
{{- end }}
4 changes: 4 additions & 0 deletions charts/temporal/templates/server-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,11 @@ spec:
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 }}
value: "{{ include "temporal.fullname" $ }}-frontend.{{ $.Release.Namespace }}.svc:{{ $.Values.server.frontend.service.port }}"
{{- end }}
{{- with $.Values.admintools.additionalVolumeMounts }}
volumeMounts:
{{- toYaml . | nindent 12 }}
Expand Down
7 changes: 5 additions & 2 deletions charts/temporal/templates/server-pdb.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{{- if $.Values.server.enabled }}
{{- range $service := (list "frontend" "history" "matching" "worker") }}
{{- $serviceValues := index $.Values.server $service -}}
{{- 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
Expand All @@ -19,3 +21,4 @@ spec:
---
{{- end }}
{{- end }}
{{- end }}
7 changes: 5 additions & 2 deletions charts/temporal/templates/server-service-monitor.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{{- if $.Values.server.enabled }}
{{- range $service := (list "frontend" "matching" "history" "worker") }}
{{- $serviceValues := index $.Values.server $service -}}
{{- 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
Expand Down Expand Up @@ -33,3 +35,4 @@ spec:
{{- end }}
{{- end }}
{{- end }}
{{- end }}
34 changes: 21 additions & 13 deletions charts/temporal/templates/server-service.yaml
Original file line number Diff line number Diff line change
@@ -1,36 +1,44 @@
{{- 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 $ "frontend") }}
name: {{ include "temporal.componentname" (list $ $service) }}
labels:
{{- include "temporal.resourceLabels" (list $ "frontend" "") | nindent 4 }}
{{- if .Values.server.frontend.service.annotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.server.frontend.service.annotations "context" $) | nindent 4 }}
{{- 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: {{ .Values.server.frontend.service.type }}
type: {{ $serviceValues.service.type }}
ports:
- port: {{ .Values.server.frontend.service.port }}
- port: {{ $serviceValues.service.port }}
targetPort: rpc
protocol: TCP
name: grpc-rpc
{{- if hasKey .Values.server.frontend.service "nodePort" }}
nodePort: {{ .Values.server.frontend.service.nodePort }}
{{- if hasKey $serviceValues.service "nodePort" }}
nodePort: {{ $serviceValues.service.nodePort }}
{{- end }}
- port: {{ .Values.server.frontend.service.httpPort }}
- 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: frontend
app.kubernetes.io/instance: {{ $.Release.Name }}
app.kubernetes.io/component: {{ $service }}

---
{{- range $service := (list "frontend" "matching" "history" "worker") }}
{{ $serviceValues := index $.Values.server $service }}
{{- end }}
{{- end }}

{{- 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:
Expand Down
35 changes: 32 additions & 3 deletions charts/temporal/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ server:
sidecarContainers: []
image:
repository: temporalio/server
tag: 1.25.2
tag: 1.26.2
pullPolicy: IfNotPresent
# Global default settings (can be overridden per service)
replicaCount: 1
Expand Down Expand Up @@ -248,6 +248,35 @@ server:
containerSecurityContext: {}
topologySpreadConstraints: []
podDisruptionBudget: {}
internalFrontend:
# Enable this to create internal-frontend
enabled: false
service:
# Evaluated as template
annotations: {}
type: ClusterIP
port: 7236
membershipPort: 6936
httpPort: 7246
metrics:
annotations:
enabled: true
serviceMonitor: {}
# enabled: false
prometheus: {}
# timerType: histogram
deploymentLabels: {}
deploymentAnnotations: {}
podAnnotations: {}
podLabels: {}
resources: {}
nodeSelector: {}
tolerations: []
affinity: {}
additionalEnv: []
containerSecurityContext: {}
topologySpreadConstraints: []
podDisruptionBudget: {}
history:
service:
# type: ClusterIP
Expand Down Expand Up @@ -325,7 +354,7 @@ admintools:
enabled: true
image:
repository: temporalio/admin-tools
tag: 1.25.2-tctl-1.18.1-cli-1.1.1
tag: 1.26.2
pullPolicy: IfNotPresent
service:
type: ClusterIP
Expand All @@ -352,7 +381,7 @@ web:
replicaCount: 1
image:
repository: temporalio/ui
tag: 2.31.2
tag: 2.33.0
pullPolicy: IfNotPresent
service:
# set type to NodePort if access to web needs access from outside the cluster
Expand Down

0 comments on commit 467f30b

Please sign in to comment.