diff --git a/charts/eks/templates/_helpers.tpl b/charts/eks/templates/_helpers.tpl index 86fefd2b9..70d386988 100644 --- a/charts/eks/templates/_helpers.tpl +++ b/charts/eks/templates/_helpers.tpl @@ -58,7 +58,8 @@ Whether to create a cluster role or not .Values.sync.priorityclasses.enabled .Values.sync.volumesnapshots.enabled .Values.proxy.metricsServer.nodes.enabled - .Values.multiNamespaceMode.enabled -}} + .Values.multiNamespaceMode.enabled + .Values.coredns.plugin.enabled -}} {{- true -}} {{- end -}} {{- end -}} diff --git a/charts/eks/templates/rbac/clusterrole.yaml b/charts/eks/templates/rbac/clusterrole.yaml index 0577fe9ce..098d0deb2 100644 --- a/charts/eks/templates/rbac/clusterrole.yaml +++ b/charts/eks/templates/rbac/clusterrole.yaml @@ -26,6 +26,11 @@ rules: resources: [ "pods", "nodes/metrics", "nodes/stats"] verbs: ["get", "watch", "list"] {{- end }} + {{- if .Values.coredns.plugin.enabled }} + - apiGroups: [""] + resources: [ "pods"] + verbs: ["get", "watch", "list"] + {{- end }} {{- if and (or .Values.sync.nodes.enabled .Values.rbac.clusterRole.create) (or (not .Values.isolation.enabled) (and .Values.isolation.nodeProxyPermission.enabled .Values.isolation.enabled)) }} - apiGroups: [""] resources: ["nodes/proxy"] diff --git a/charts/k0s/templates/_helpers.tpl b/charts/k0s/templates/_helpers.tpl index 6cc51b55c..9aba2d718 100644 --- a/charts/k0s/templates/_helpers.tpl +++ b/charts/k0s/templates/_helpers.tpl @@ -58,7 +58,8 @@ Whether to create a cluster role or not .Values.sync.priorityclasses.enabled .Values.sync.volumesnapshots.enabled .Values.proxy.metricsServer.nodes.enabled - .Values.multiNamespaceMode.enabled -}} + .Values.multiNamespaceMode.enabled + .Values.coredns.plugin.enabled -}} {{- true -}} {{- end -}} {{- end -}} diff --git a/charts/k0s/templates/rbac/clusterrole.yaml b/charts/k0s/templates/rbac/clusterrole.yaml index 0577fe9ce..098d0deb2 100644 --- a/charts/k0s/templates/rbac/clusterrole.yaml +++ b/charts/k0s/templates/rbac/clusterrole.yaml @@ -26,6 +26,11 @@ rules: resources: [ "pods", "nodes/metrics", "nodes/stats"] verbs: ["get", "watch", "list"] {{- end }} + {{- if .Values.coredns.plugin.enabled }} + - apiGroups: [""] + resources: [ "pods"] + verbs: ["get", "watch", "list"] + {{- end }} {{- if and (or .Values.sync.nodes.enabled .Values.rbac.clusterRole.create) (or (not .Values.isolation.enabled) (and .Values.isolation.nodeProxyPermission.enabled .Values.isolation.enabled)) }} - apiGroups: [""] resources: ["nodes/proxy"] diff --git a/charts/k3s/templates/_helpers.tpl b/charts/k3s/templates/_helpers.tpl index f098b3cfd..2aad01517 100644 --- a/charts/k3s/templates/_helpers.tpl +++ b/charts/k3s/templates/_helpers.tpl @@ -58,7 +58,8 @@ Whether to create a cluster role or not .Values.sync.priorityclasses.enabled .Values.sync.volumesnapshots.enabled .Values.proxy.metricsServer.nodes.enabled - .Values.multiNamespaceMode.enabled -}} + .Values.multiNamespaceMode.enabled + .Values.coredns.plugin.enabled -}} {{- true -}} {{- end -}} {{- end -}} diff --git a/charts/k3s/templates/rbac/clusterrole.yaml b/charts/k3s/templates/rbac/clusterrole.yaml index 0577fe9ce..098d0deb2 100644 --- a/charts/k3s/templates/rbac/clusterrole.yaml +++ b/charts/k3s/templates/rbac/clusterrole.yaml @@ -26,6 +26,11 @@ rules: resources: [ "pods", "nodes/metrics", "nodes/stats"] verbs: ["get", "watch", "list"] {{- end }} + {{- if .Values.coredns.plugin.enabled }} + - apiGroups: [""] + resources: [ "pods"] + verbs: ["get", "watch", "list"] + {{- end }} {{- if and (or .Values.sync.nodes.enabled .Values.rbac.clusterRole.create) (or (not .Values.isolation.enabled) (and .Values.isolation.nodeProxyPermission.enabled .Values.isolation.enabled)) }} - apiGroups: [""] resources: ["nodes/proxy"] diff --git a/charts/k8s/templates/_helpers.tpl b/charts/k8s/templates/_helpers.tpl index 387b16c23..e81ea5add 100644 --- a/charts/k8s/templates/_helpers.tpl +++ b/charts/k8s/templates/_helpers.tpl @@ -58,7 +58,8 @@ Whether to create a cluster role or not .Values.sync.priorityclasses.enabled .Values.sync.volumesnapshots.enabled .Values.proxy.metricsServer.nodes.enabled - .Values.multiNamespaceMode.enabled -}} + .Values.multiNamespaceMode.enabled + .Values.coredns.plugin.enabled -}} {{- true -}} {{- end -}} {{- end -}} diff --git a/charts/k8s/templates/rbac/clusterrole.yaml b/charts/k8s/templates/rbac/clusterrole.yaml index 0577fe9ce..098d0deb2 100644 --- a/charts/k8s/templates/rbac/clusterrole.yaml +++ b/charts/k8s/templates/rbac/clusterrole.yaml @@ -26,6 +26,11 @@ rules: resources: [ "pods", "nodes/metrics", "nodes/stats"] verbs: ["get", "watch", "list"] {{- end }} + {{- if .Values.coredns.plugin.enabled }} + - apiGroups: [""] + resources: [ "pods"] + verbs: ["get", "watch", "list"] + {{- end }} {{- if and (or .Values.sync.nodes.enabled .Values.rbac.clusterRole.create) (or (not .Values.isolation.enabled) (and .Values.isolation.nodeProxyPermission.enabled .Values.isolation.enabled)) }} - apiGroups: [""] resources: ["nodes/proxy"]