Skip to content

Commit

Permalink
adding the ability to install Tetragon helm chart multiple times on t…
Browse files Browse the repository at this point in the history
…he same Kubernetes cluster
  • Loading branch information
ashishkurmi committed Aug 28, 2023
1 parent 0de4662 commit 2659fa4
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion install/kubernetes/templates/clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: {{.Chart.Name}}
name: {{.Release.Name}}
labels:
{{- include "tetragon.labels" . | nindent 4 }}
rules:
Expand Down
6 changes: 3 additions & 3 deletions install/kubernetes/templates/clusterrolebinding.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: {{ .Chart.Name }}
name: {{ .Release.Name }}
labels:
{{- include "tetragon.labels" . | nindent 4 }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ .Chart.Name }}
name: {{ .Release.Name }}
subjects:
- kind: ServiceAccount
namespace: {{ .Release.Namespace }}
name: {{ .Chart.Name }}
name: {{ .Release.Name }}
{{- end }}
8 changes: 4 additions & 4 deletions install/kubernetes/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ metadata:
{{- else }}
{{- include "tetragon.labels" . | nindent 4 }}
{{- end }}
name: {{ .Chart.Name }}
name: {{ .Release.Name }}
namespace: {{ .Release.Namespace }}
spec:
selector:
Expand Down Expand Up @@ -39,7 +39,7 @@ spec:
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ .Chart.Name }}
serviceAccountName: {{ .Release.Name }}
{{- with .Values.podSecurityContext }}
securityContext:
{{- toYaml . | nindent 6 }}
Expand Down Expand Up @@ -82,7 +82,7 @@ spec:
{{- if .Values.tetragon.enabled }}
- name: tetragon-config
configMap:
name: {{ .Chart.Name }}-config
name: {{ .Release.Name }}-config
- name: bpf-maps
hostPath:
path: /sys/fs/bpf
Expand All @@ -99,7 +99,7 @@ spec:
{{- if .Values.tetragonOperator.enabled }}
- name: tetragon-operator-config
configMap:
name: {{ .Chart.Name }}-operator-config
name: {{ .Release.Name }}-operator-config
{{- end }}
{{- with .Values.extraVolumes }}
{{- toYaml . | nindent 6 }}
Expand Down
2 changes: 1 addition & 1 deletion install/kubernetes/templates/operator_clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: {{.Chart.Name}}-operator
name: {{.Release.Name}}-operator
labels:
{{- include "tetragon-operator.labels" . | nindent 4 }}
rules:
Expand Down
6 changes: 3 additions & 3 deletions install/kubernetes/templates/operator_clusterrolebinding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: {{ .Chart.Name }}-operator-rolebinding
name: {{ .Release.Name }}-operator-rolebinding
labels:
{{- include "tetragon-operator.labels" . | nindent 4 }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ .Chart.Name }}-operator-role
name: {{ .Release.Name }}-operator-role
subjects:
- kind: ServiceAccount
namespace: {{ .Release.Namespace }}
name: {{ .Chart.Name }}-operator-service-account
name: {{ .Release.Name }}-operator-service-account
{{- end }}
2 changes: 1 addition & 1 deletion install/kubernetes/templates/operator_configmap.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Chart.Name }}-operator-config
name: {{ .Release.Name }}-operator-config
namespace: {{ .Release.Namespace }}
labels:
{{- include "tetragon-operator.labels" . | nindent 4 }}
Expand Down
6 changes: 3 additions & 3 deletions install/kubernetes/templates/operator_deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: Deployment
metadata:
labels:
{{- include "tetragon-operator.labels" . | nindent 4 }}
name: {{ .Chart.Name }}-operator
name: {{ .Release.Name }}-operator
namespace: {{ .Release.Namespace }}
spec:
selector:
Expand All @@ -17,7 +17,7 @@ spec:
{{- include "tetragon-operator.labels" . | nindent 8 }}
spec:
containers:
- name: {{ .Chart.Name }}-operator
- name: {{ .Release.Name }}-operator
command:
- /usr/bin/tetragon-operator
args:
Expand Down Expand Up @@ -47,6 +47,6 @@ spec:
requests:
cpu: 10m
memory: 64Mi
serviceAccountName: {{ .Chart.Name }}-operator-service-account
serviceAccountName: {{ .Release.Name }}-operator-service-account
terminationGracePeriodSeconds: 10
{{- end }}
2 changes: 1 addition & 1 deletion install/kubernetes/templates/operator_serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ .Chart.Name }}-operator-service-account
name: {{ .Release.Name }}-operator-service-account
namespace: {{ .Release.Namespace }}
labels:
{{- include "tetragon-operator.labels" . | nindent 4 }}
Expand Down
2 changes: 1 addition & 1 deletion install/kubernetes/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ metadata:
{{- else }}
{{- include "tetragon.labels" . | nindent 4 }}
{{- end }}
name: {{ .Chart.Name }}
name: {{ .Release.Name }}
namespace: {{ .Release.Namespace }}
spec:
ports:
Expand Down
2 changes: 1 addition & 1 deletion install/kubernetes/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ .Chart.Name }}
name: {{ .Release.Name }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "tetragon.labels" . | nindent 4 }}
Expand Down
2 changes: 1 addition & 1 deletion install/kubernetes/templates/tetragon_configmap.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Chart.Name }}-config
name: {{ .Release.Name }}-config
namespace: {{ .Release.Namespace }}
labels:
{{- include "tetragon.labels" . | nindent 4 }}
Expand Down

0 comments on commit 2659fa4

Please sign in to comment.