Skip to content

Commit

Permalink
[Helm] Enable leader election when leaderElectionEnabled is not set (#…
Browse files Browse the repository at this point in the history
…2284)

Signed-off-by: kaihsun <[email protected]>
  • Loading branch information
kevin85421 authored Aug 5, 2024
1 parent 658bd9e commit 799f073
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions helm-chart/kuberay-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ spec:
{{- $argList = append $argList "--log-file-encoder" -}}
{{- $argList = append $argList .Values.logging.fileEncoder -}}
{{- end -}}
{{- if not .Values.leaderElectionEnabled -}}
{{- $argList = append $argList "--enable-leader-election=false" -}}
{{- if hasKey .Values "leaderElectionEnabled" -}}
{{- $argList = append $argList (printf "--enable-leader-election=%t" .Values.leaderElectionEnabled) -}}
{{- end -}}
{{- (printf "\n") -}}
{{- $argList | toYaml | indent 12 }}
Expand Down
2 changes: 1 addition & 1 deletion helm-chart/kuberay-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ securityContext:
type: RuntimeDefault


# enabled by default, disable leader election to solve k8s api timeout when leader election occur and 1 replica exist.
# If leaderElectionEnabled is set to true, the KubeRay operator will use leader election for high availability.
leaderElectionEnabled: true

# If rbacEnable is set to false, no RBAC resources will be created, including the Role for leader election, the Role for Pods and Services, and so on.
Expand Down

0 comments on commit 799f073

Please sign in to comment.