Add role, rolebinding, and service account
@@ -28,3 +28,47 @@ spec:
requests:
cpu: 10m
memory: 50Mi
+ serviceAccountName: daemonset-khcheck
+---
+apiVersion: rbac.authorization.k8s.io/v1beta1
+kind: RoleBinding
+metadata:
+ name: daemonset-khcheck
+ namespace: kuberhealthy
+roleRef:
+ apiGroup: rbac.authorization.k8s.io
+ kind: Role
+ name: ds-admin
+subjects:
+ - kind: ServiceAccount
+ name: daemonset-khcheck
+ namespace: kuberhealthy
+---
+apiVersion: rbac.authorization.k8s.io/v1beta1
+kind: Role
+metadata:
+ name: ds-admin
+ namespace: kuberhealthy
+rules:
+ - apiGroups:
+ - ""
+ - extensions
+ - app
+ resources:
+ - daemonsets
+ - pods
+ verbs:
+ - create
+ - delete
+ - deletecollection
+ - get
+ - list
+ - patch
+ - update
+ - watch
+---
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+ name: daemonset-khcheck
+ namespace: kuberhealthy
