Commit dd2cca47 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #40035 from deads2k/rbac-41-npd

Automatic merge from submit-queue add node problem detector role Adds a node problem detector role based on https://github.com/kubernetes/node-problem-detector/blob/master/pkg/problemclient/problem_client.go
parents eee81903 68999bae
...@@ -220,6 +220,16 @@ func ClusterRoles() []rbac.ClusterRole { ...@@ -220,6 +220,16 @@ func ClusterRoles() []rbac.ClusterRole {
}, },
}, },
{ {
// a role to use for node-problem-detector access. It does not get bound to default location since
// deployment locations can reasonably vary.
ObjectMeta: metav1.ObjectMeta{Name: "system:node-problem-detector"},
Rules: []rbac.PolicyRule{
rbac.NewRule("get").Groups(legacyGroup).Resources("nodes").RuleOrDie(),
rbac.NewRule("patch").Groups(legacyGroup).Resources("nodes/status").RuleOrDie(),
eventsRule(),
},
},
{
// a role to use for setting up a proxy // a role to use for setting up a proxy
ObjectMeta: metav1.ObjectMeta{Name: "system:node-proxier"}, ObjectMeta: metav1.ObjectMeta{Name: "system:node-proxier"},
Rules: []rbac.PolicyRule{ Rules: []rbac.PolicyRule{
......
...@@ -600,6 +600,34 @@ items: ...@@ -600,6 +600,34 @@ items:
creationTimestamp: null creationTimestamp: null
labels: labels:
kubernetes.io/bootstrapping: rbac-defaults kubernetes.io/bootstrapping: rbac-defaults
name: system:node-problem-detector
rules:
- apiGroups:
- ""
resources:
- nodes
verbs:
- get
- apiGroups:
- ""
resources:
- nodes/status
verbs:
- patch
- apiGroups:
- ""
resources:
- events
verbs:
- create
- patch
- update
- apiVersion: rbac.authorization.k8s.io/v1alpha1
kind: ClusterRole
metadata:
creationTimestamp: null
labels:
kubernetes.io/bootstrapping: rbac-defaults
name: system:node-proxier name: system:node-proxier
rules: rules:
- apiGroups: - apiGroups:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment