From 6dc12af55b966e3d7e65c0109df4ad0238e0df7f Mon Sep 17 00:00:00 2001 From: Volodymyr Stoiko Date: Wed, 28 Feb 2024 22:14:03 +0200 Subject: [PATCH] Add namespace prefix to cluster scope resources (#1506) Co-authored-by: Alon Girmonsky <1990761+alongir@users.noreply.github.com> --- helm-chart/templates/02-cluster-role.yaml | 2 +- helm-chart/templates/03-cluster-role-binding.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/helm-chart/templates/02-cluster-role.yaml b/helm-chart/templates/02-cluster-role.yaml index 164fe81a3..fe674e2f3 100644 --- a/helm-chart/templates/02-cluster-role.yaml +++ b/helm-chart/templates/02-cluster-role.yaml @@ -8,7 +8,7 @@ metadata: {{- if .Values.tap.annotations }} {{- toYaml .Values.tap.annotations | nindent 4 }} {{- end }} - name: kubeshark-cluster-role + name: kubeshark-cluster-role-{{ .Release.Namespace }} namespace: {{ .Release.Namespace }} rules: - apiGroups: diff --git a/helm-chart/templates/03-cluster-role-binding.yaml b/helm-chart/templates/03-cluster-role-binding.yaml index b20a809b4..a002ad055 100644 --- a/helm-chart/templates/03-cluster-role-binding.yaml +++ b/helm-chart/templates/03-cluster-role-binding.yaml @@ -8,12 +8,12 @@ metadata: {{- if .Values.tap.annotations }} {{- toYaml .Values.tap.annotations | nindent 4 }} {{- end }} - name: kubeshark-cluster-role-binding + name: kubeshark-cluster-role-binding-{{ .Release.Namespace }} namespace: {{ .Release.Namespace }} roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole - name: kubeshark-cluster-role + name: kubeshark-cluster-role-{{ .Release.Namespace }} subjects: - kind: ServiceAccount name: {{ include "kubeshark.serviceAccountName" . }}