From ead22e950a2099865166deb2d37a4054262fdca2 Mon Sep 17 00:00:00 2001 From: keyihuang Date: Thu, 26 Sep 2024 12:38:10 -0700 Subject: [PATCH] feat: add cluster role and role binding (#14138) --- charts/airbyte/templates/serviceaccount.yaml | 22 ++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/charts/airbyte/templates/serviceaccount.yaml b/charts/airbyte/templates/serviceaccount.yaml index de99b0b9f1b..ee5f965768d 100644 --- a/charts/airbyte/templates/serviceaccount.yaml +++ b/charts/airbyte/templates/serviceaccount.yaml @@ -47,5 +47,27 @@ roleRef: subjects: - kind: ServiceAccount name: {{ include "airbyte.serviceAccountName" . }} +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: node-viewer +rules: + - apiGroups: [""] + resources: ["nodes"] + verbs: ["get", "list", "watch"] +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: {{ include "airbyte.serviceAccountName" . }}-admin-node-viewer +subjects: + - kind: ServiceAccount + name: {{ include "airbyte.serviceAccountName" . }} + namespace: ab +roleRef: + kind: ClusterRole + name: node-viewer + apiGroup: rbac.authorization.k8s.io {{- end }} {{- end }}