Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion helm/temporal-worker-controller/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{{/*
Common labels
Applied to all resources
*/}}
{{- define "temporal-worker-controller.labels" -}}
{{ include "temporal-worker-controller.selectorLabels" $ }}
{{ include "temporal-worker-controller.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
Expand All @@ -11,6 +12,7 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}

{{/*
Selector labels
Used for matchLabels (Deployments, Services, affinities, etc.)
*/}}
{{- define "temporal-worker-controller.selectorLabels" -}}
app.kubernetes.io/name: temporal-worker-controller
Expand Down
16 changes: 13 additions & 3 deletions helm/temporal-worker-controller/templates/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,19 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- with .Values.affinity }}
{{- if .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{ toYaml .Values.affinity | nindent 8 }}
{{- else }}
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchLabels:
{{ include "temporal-worker-controller.selectorLabels" . | nindent 20 }}
topologyKey: kubernetes.io/hostname
{{- end }}
securityContext:
runAsNonRoot: true
Expand All @@ -57,7 +67,7 @@ spec:
args:
- --leader-elect
{{- if .Values.metrics.enabled }}
- --metrics-bind-address=127.0.0.1:{{ .Values.metrics.port }}
- "--metrics-bind-address=127.0.0.1:{{ .Values.metrics.port }}"
{{- end }}
- "--health-probe-bind-address=:8081"
{{- if .Values.webhook.enabled }}
Expand Down
20 changes: 6 additions & 14 deletions helm/temporal-worker-controller/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,12 @@ securityContext:
seccompProfile:
enabled: false

affinity:
# Use when running multiple replicas to spread manager pods across nodes.
# For strict HA, switch to requiredDuringSchedulingIgnoredDuringExecution.
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchLabels:
app.kubernetes.io/component: manager
app.kubernetes.io/instance: {{ .Release.Name }}
topologyKey: kubernetes.io/hostname
# Default podAntiAffinity uses preferredDuringSchedulingIgnoredDuringExecution to spread manager
# pods across nodes. For strict HA, switch to requiredDuringSchedulingIgnoredDuringExecution.
affinity: {}

# More than one replica is required for high availability.
replicas: 2

# Opt out of these resources if you want to disable the
# auth proxy (https://github.com/brancz/kube-rbac-proxy)
Expand Down Expand Up @@ -98,5 +92,3 @@ prometheus:
nodeSelector: {}

tolerations: []

replicas: 2