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 }}