From f37350a682e79876052faa1864fd021e9cac8b94 Mon Sep 17 00:00:00 2001 From: Zhimin Xiang Date: Mon, 26 Sep 2022 22:49:08 -0700 Subject: [PATCH] Fix the RBAC for labeling namespace for post upgrade job Signed-off-by: Zhimin Xiang --- .../helmify/static/templates/namespace-post-upgrade.yaml | 6 +++--- .../charts/gatekeeper/templates/namespace-post-upgrade.yaml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/build/helmify/static/templates/namespace-post-upgrade.yaml b/cmd/build/helmify/static/templates/namespace-post-upgrade.yaml index 403021956fa..ed2e2603d8a 100644 --- a/cmd/build/helmify/static/templates/namespace-post-upgrade.yaml +++ b/cmd/build/helmify/static/templates/namespace-post-upgrade.yaml @@ -73,7 +73,7 @@ metadata: --- {{- if .Values.rbac.create }} apiVersion: rbac.authorization.k8s.io/v1 -kind: Role +kind: ClusterRole metadata: name: gatekeeper-update-namespace-label-post-upgrade labels: @@ -101,7 +101,7 @@ rules: --- {{- if .Values.rbac.create }} apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding +kind: ClusterRoleBinding metadata: name: gatekeeper-update-namespace-label-post-upgrade labels: @@ -113,7 +113,7 @@ metadata: "helm.sh/hook-delete-policy": hook-succeeded,before-hook-creation roleRef: apiGroup: rbac.authorization.k8s.io - kind: Role + kind: ClusterRole name: gatekeeper-update-namespace-label-post-upgrade subjects: - kind: ServiceAccount diff --git a/manifest_staging/charts/gatekeeper/templates/namespace-post-upgrade.yaml b/manifest_staging/charts/gatekeeper/templates/namespace-post-upgrade.yaml index 403021956fa..ed2e2603d8a 100644 --- a/manifest_staging/charts/gatekeeper/templates/namespace-post-upgrade.yaml +++ b/manifest_staging/charts/gatekeeper/templates/namespace-post-upgrade.yaml @@ -73,7 +73,7 @@ metadata: --- {{- if .Values.rbac.create }} apiVersion: rbac.authorization.k8s.io/v1 -kind: Role +kind: ClusterRole metadata: name: gatekeeper-update-namespace-label-post-upgrade labels: @@ -101,7 +101,7 @@ rules: --- {{- if .Values.rbac.create }} apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding +kind: ClusterRoleBinding metadata: name: gatekeeper-update-namespace-label-post-upgrade labels: @@ -113,7 +113,7 @@ metadata: "helm.sh/hook-delete-policy": hook-succeeded,before-hook-creation roleRef: apiGroup: rbac.authorization.k8s.io - kind: Role + kind: ClusterRole name: gatekeeper-update-namespace-label-post-upgrade subjects: - kind: ServiceAccount