pod status with sa, rb, and role
@@ -41,4 +41,39 @@ spec:
nodeSelector:
{{- toYaml .Values.check.podStatus.nodeSelector | nindent 6 }}
{{- end }}
+---
+apiVersion: rbac.authorization.k8s.io/v1
+kind: RoleBinding
+metadata:
+ name: kh-pod-status-rb
+ namespace: {{ .Release.Namespace }}
+roleRef:
+ apiGroup: rbac.authorization.k8s.io
+ kind: Role
+ name: kh-pod-status-role
+subjects:
+ - kind: ServiceAccount
+ name: kh-pod-status-sa
+---
+apiVersion: rbac.authorization.k8s.io/v1
+kind: Role
+metadata:
+ name: kh-pod-status-role
+ namespace: {{ .Release.Namespace }}
+rules:
+ - apiGroups:
+ - ""
+ resources:
+ - namespaces
+ - pods
+ verbs:
+ - get
+ - list
+ - watch
+---
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+ name: kh-pod-status-sa
+ namespace: {{ .Release.Namespace }}
{{- end}}
\ No newline at end of file
