Allow defining unique election leader id

This commit is contained in:
Rolf Ahrenberg
2021-09-11 18:26:29 +03:00
committed by Yusuke Kuoka
parent e5b5ee6f1d
commit 5da808af96
3 changed files with 14 additions and 1 deletions

View File

@@ -37,7 +37,12 @@ spec:
{{- $metricsHost := .Values.metrics.proxy.enabled | ternary "127.0.0.1" "0.0.0.0" }}
{{- $metricsPort := .Values.metrics.proxy.enabled | ternary "8080" .Values.metrics.port }}
- "--metrics-addr={{ $metricsHost }}:{{ $metricsPort }}"
{{- if .Values.controller.enableLeaderElection }}
- "--enable-leader-election"
{{- end }}
{{- if .Values.controller.leaderElectionId }}
- "--leader-election-id={{ .Values.controller.leaderElectionId }}"
{{- end }}
- "--sync-period={{ .Values.syncPeriod }}"
- "--docker-image={{ .Values.image.dindSidecarRepositoryAndTag }}"
- "--runner-image={{ .Values.image.actionsRunnerRepositoryAndTag }}"

View File

@@ -8,6 +8,12 @@ replicaCount: 1
syncPeriod: 10m
controller:
enableLeaderElection: true
# Specifies the controller id for leader election.
# Must be unique if more than one controller installed.
#leaderElectionId: "actions-runner-controller"
# The controller tries its best not to repeat the duplicate GitHub API call
# within this duration.
# Defaults to syncPeriod - 10s.