Commit 23f6f703 by tingweiwang

增加监控所需要的权限

1 parent c5124920
Showing with 75 additions and 23 deletions
...@@ -6,39 +6,91 @@ metadata: ...@@ -6,39 +6,91 @@ metadata:
namespace: autodl namespace: autodl
--- ---
apiVersion: rbac.authorization.k8s.io/v1beta1 apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole kind: ClusterRole
metadata: metadata:
name: autodl-clusterrole name: autodl-clusterrole
rules: rules:
- apiGroups: - apiGroups:
- "" - ""
resources: resources:
- nodes - nodes
- pods - deployments
verbs: ["get", "watch", "list", "patch"] - pods
- nonResourceURLs: - services
- /version/ - endpoints
verbs: ["get"] - nodes/proxy
- nodes/metrics
- ingresses
verbs:
- get
- watch
- list
- patch
- nonResourceURLs:
- /version/
- /metrics
verbs:
- get
--- ---
apiVersion: rbac.authorization.k8s.io/v1beta1 apiVersion: rbac.authorization.k8s.io/v1
kind: Role kind: Role
metadata: metadata:
name: autodl-role name: autodl-role
namespace: autodl namespace: autodl
rules: rules:
- apiGroups: [""] - apiGroups:
resources: ["pods"] - ""
verbs: ["get", "watch", "list", "create", "delete", "patch"] resources:
- apiGroups: [""] - pods
resources: ["configmaps", "secrets"] verbs:
verbs: ["get", "update", "patch", "create", "delete"] - get
- apiGroups: ["", "extensions"] - watch
resources: ["services", "ingresses", "deployments", "replicasets"] - list
verbs: ["get", "create", "patch", "delete", "list"] - create
- apiGroups: ["", "*"] - delete
resources: ["events", "pods/status", "pods/log","pods/exec"] - patch
verbs: ["watch", "get", "list","create"] - apiGroups:
- ""
resources:
- configmaps
- secrets
verbs:
- get
- update
- patch
- create
- delete
- apiGroups:
- ""
- '*'
- extensions
resources:
- services
- ingresses
- deployments
- deployments/scale
- replicasets
verbs:
- get
- update
- create
- patch
- delete
- list
- apiGroups:
- ""
- '*'
resources:
- events
- pods/status
- pods/log
- pods/exec
verbs:
- watch
- get
- list
- create
--- ---
apiVersion: rbac.authorization.k8s.io/v1beta1 apiVersion: rbac.authorization.k8s.io/v1beta1
kind: RoleBinding kind: RoleBinding
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!