Skip to content

Commit

Permalink
Merge pull request #129 from akash4sh/main
Browse files Browse the repository at this point in the history
updated temporal chart
  • Loading branch information
jebjohns authored Oct 31, 2023
2 parents 78aed16 + 3c51362 commit ec1b512
Show file tree
Hide file tree
Showing 19 changed files with 1,167 additions and 281 deletions.
9 changes: 5 additions & 4 deletions charts/temporal/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

annotations:
artifacthub.io/changes: |
- "✨ update chart to version 0.17.5 "
- "✨ update chart to version 0.29.0"
apiVersion: v2

name: temporal
Expand Down Expand Up @@ -33,7 +34,7 @@ dependencies:
condition: prometheus.enabled
- name: elasticsearch
repository: https://helm.elastic.co
version: 7.16.3
version: 7.17.3
condition: elasticsearch.enabled
- name: grafana
repository: https://grafana.github.io/helm-charts
Expand All @@ -52,8 +53,8 @@ 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.1.7
version: 0.1.8

# 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.17.5
appVersion: 1.22.1
594 changes: 574 additions & 20 deletions charts/temporal/README.md

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions charts/temporal/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,17 @@ Source: https://stackoverflow.com/a/52024583/3027614
{{- print "password" -}}
{{- 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 -}}
Expand Down
22 changes: 22 additions & 0 deletions charts/temporal/templates/admintools-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ spec:
{{- with $.Values.admintools.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with $.Values.admintools.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{ include "temporal.serviceAccount" . }}
containers:
Expand All @@ -42,15 +46,33 @@ spec:
containerPort: 22
protocol: TCP
env:
# TEMPORAL_CLI_ADDRESS is deprecated, use TEMPORAL_ADDRESS instead
- name: TEMPORAL_CLI_ADDRESS
value: {{ include "temporal.fullname" . }}-frontend:{{ include "temporal.frontend.grpcPort" . }}
- name: TEMPORAL_ADDRESS
value: {{ include "temporal.fullname" . }}-frontend:{{ include "temporal.frontend.grpcPort" . }}
{{- if .Values.admintools.additionalEnv }}
{{- toYaml .Values.admintools.additionalEnv | nindent 12 }}
{{- end }}
livenessProbe:
exec:
command:
- ls
- /
initialDelaySeconds: 5
periodSeconds: 5
{{- 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 }}
Expand Down
50 changes: 44 additions & 6 deletions charts/temporal/templates/server-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ data:
persistence:
defaultStore: {{ $.Values.server.config.persistence.defaultStore }}
visibilityStore: visibility
{{- if or $.Values.elasticsearch.enabled $.Values.elasticsearch.external }}
advancedVisibilityStore: es-visibility
{{- else }}
visibilityStore: visibility
{{- end }}
numHistoryShards: {{ $.Values.server.config.numHistoryShards }}
datastores:
Expand All @@ -38,11 +39,9 @@ data:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- end }}
{{- if $.Values.server.config.persistence.faultinjection}}
{{- if $.Values.server.config.persistence.faultinjection.rate }}
{{- with $.Values.server.config.persistence.default.faultInjection}}
faultInjection:
rate: {{ $.Values.server.config.persistence.faultinjection.rate }}
{{- end }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- if eq (include "temporal.persistence.driver" (list $ "default")) "sql" }}
sql:
Expand Down Expand Up @@ -103,14 +102,30 @@ data:
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:
Expand Down Expand Up @@ -156,12 +171,35 @@ data:
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 }}"
Expand Down
23 changes: 17 additions & 6 deletions charts/temporal/templates/server-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,10 @@ spec:
{{ include "temporal.serviceAccount" $ }}
{{- if or $.Values.cassandra.enabled (or $.Values.elasticsearch.enabled $.Values.elasticsearch.external)}}
{{- if semverCompare ">=1.13.0" $.Chart.AppVersion}}
{{- with $.Values.server.securityContext }}
securityContext:
fsGroup: 1000 #temporal group
runAsUser: 1000 #temporal user
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
initContainers:
{{- if $.Values.cassandra.enabled }}
Expand All @@ -73,7 +74,7 @@ spec:
- 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 {{ $.Values.elasticsearch.username }}:{{ $.Values.elasticsearch.password }} {{ $.Values.elasticsearch.scheme }}://{{ $.Values.elasticsearch.host }}:{{ $.Values.elasticsearch.port }}/{{ $.Values.elasticsearch.visibilityIndex }} 2>&1 > /dev/null; do echo waiting for elasticsearch index to become ready; sleep 1; done;']
command: ['sh', '-c', 'until curl --silent --fail {{- if and $.Values.elasticsearch.username $.Values.elasticsearch.password }} --user {{ $.Values.elasticsearch.username }}:{{ $.Values.elasticsearch.password }} {{- end }} {{ $.Values.elasticsearch.scheme }}://{{ $.Values.elasticsearch.host }}:{{ $.Values.elasticsearch.port }}/{{ $.Values.elasticsearch.visibilityIndex }} 2>&1 > /dev/null; do echo waiting for elasticsearch index to become ready; sleep 1; done;']
{{- end }}
{{- end }}
containers:
Expand Down Expand Up @@ -117,6 +118,9 @@ spec:
- 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 }}
ports:
- name: rpc
containerPort: {{ include (printf "temporal.%s.grpcPort" $service) $ }}
Expand All @@ -137,14 +141,17 @@ spec:
- name: dynamic-config
mountPath: /etc/temporal/dynamic_config
{{- if $.Values.server.additionalVolumeMounts }}
{{- toYaml $.Values.server.additionalVolumeMounts | nindent 12}}
{{- 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 }}
{{- if $.Values.server.sidecarContainers }}
{{- toYaml $.Values.server.sidecarContainers | nindent 8 }}
{{- end }}

{{- with $.Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
Expand All @@ -160,7 +167,7 @@ spec:
- key: dynamic_config.yaml
path: dynamic_config.yaml
{{- if $.Values.server.additionalVolumes }}
{{- toYaml $.Values.server.additionalVolumes | nindent 8}}
{{- toYaml $.Values.server.additionalVolumes | nindent 8}}
{{- end }}
{{- with (default $.Values.server.nodeSelector $serviceValues.nodeSelector) }}
nodeSelector:
Expand All @@ -174,6 +181,10 @@ spec:
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with $serviceValues.topologySpreadConstraints }}
topologySpreadConstraints:
{{- toYaml . | nindent 8 }}
{{- end }}
---
{{- end }}
{{- end }}
40 changes: 0 additions & 40 deletions charts/temporal/templates/server-hpa.yaml

This file was deleted.

Loading

0 comments on commit ec1b512

Please sign in to comment.