-
Notifications
You must be signed in to change notification settings - Fork 393
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
helm: Added support for operator failover
Added support to run multiple instances of the Tetragon Operator. This also includes slight adjustments to the rollingUpdate strategy and adding a podAntiAffinity. This prevents situations where upgrades are stuck because of impossible to reach maxUnavailable values and running both replicas on the same node. Signed-off-by: Philip Schmid <[email protected]>
- Loading branch information
1 parent
9f60b23
commit d7193ed
Showing
7 changed files
with
80 additions
and
10 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{{- if and (and .Values.tetragonOperator.enabled .Values.serviceAccount.create) (gt (int .Values.tetragonOperator.replicas) 1) }} | ||
kind: Role | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: {{ .Release.Name }}-operator | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
{{- include "tetragon-operator.labels" . | nindent 4 }} | ||
rules: | ||
# For tetragon-operator running with multiple replicas | ||
# | ||
# Tetragon operator running in HA mode requires the use of ResourceLock for Leader Election | ||
# between multiple running instances. | ||
- apiGroups: | ||
- coordination.k8s.io | ||
resources: | ||
- leases | ||
verbs: | ||
- create | ||
- get | ||
- update | ||
{{- end }} |
17 changes: 17 additions & 0 deletions
17
install/kubernetes/tetragon/templates/operator_rolebinding.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{{- if and (and .Values.tetragonOperator.enabled .Values.serviceAccount.create) (gt (int .Values.tetragonOperator.replicas) 1) }} | ||
kind: RoleBinding | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: {{ .Release.Name }}-operator-rolebinding | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
{{- include "tetragon-operator.labels" . | nindent 4 }} | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: Role | ||
name: {{ .Release.Name }}-operator | ||
subjects: | ||
- kind: ServiceAccount | ||
namespace: {{ .Release.Namespace }} | ||
name: {{ include "tetragon-operator.serviceAccount" . }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters