From 5f16044dd5f28d564f6054e2a67c5f40d2bb7f14 Mon Sep 17 00:00:00 2001 From: tamirdavid1 Date: Wed, 17 Jul 2024 18:03:00 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20remove=20roleb=20hardcoded=20namespace?= =?UTF-8?q?=20and=20create=20dedicated=20sa=20for=20the=E2=80=A6=20(#101)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Tamir David --- charts/odigos/templates/cleanup/cleanup-job.yaml | 1 + charts/odigos/templates/cleanup/cleanup-rolebinding.yaml | 4 ++-- charts/odigos/templates/cleanup/service-account.yaml | 5 +++++ 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 charts/odigos/templates/cleanup/service-account.yaml diff --git a/charts/odigos/templates/cleanup/cleanup-job.yaml b/charts/odigos/templates/cleanup/cleanup-job.yaml index aa21763..fe9a058 100644 --- a/charts/odigos/templates/cleanup/cleanup-job.yaml +++ b/charts/odigos/templates/cleanup/cleanup-job.yaml @@ -12,6 +12,7 @@ spec: backoffLimit: 0 template: spec: + serviceAccountName: cleanup-sa containers: - name: cleanup {{- if .Values.imagePrefix }} diff --git a/charts/odigos/templates/cleanup/cleanup-rolebinding.yaml b/charts/odigos/templates/cleanup/cleanup-rolebinding.yaml index a6058ad..e9d6237 100644 --- a/charts/odigos/templates/cleanup/cleanup-rolebinding.yaml +++ b/charts/odigos/templates/cleanup/cleanup-rolebinding.yaml @@ -4,8 +4,8 @@ metadata: name: cleanup-clusterrolebinding subjects: - kind: ServiceAccount - name: default - namespace: odigos-system + name: cleanup-sa + namespace: {{ .Release.Namespace }} roleRef: kind: ClusterRole name: cleanup-clusterrole diff --git a/charts/odigos/templates/cleanup/service-account.yaml b/charts/odigos/templates/cleanup/service-account.yaml new file mode 100644 index 0000000..d49c4d5 --- /dev/null +++ b/charts/odigos/templates/cleanup/service-account.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: cleanup-sa + namespace: {{ .Release.Namespace }}