terminating application when watching pods stops Dockerfile and docker compose file added. helm chart added
32 lines
718 B
YAML
32 lines
718 B
YAML
---
|
|
apiVersion: v1
|
|
kind: ServiceAccount
|
|
metadata:
|
|
name: kube-fetcher
|
|
namespace: {{ .Release.Namespace }}
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: ClusterRole
|
|
metadata:
|
|
name: kube-fetcher
|
|
rules:
|
|
- apiGroups: [""]
|
|
resources: ["pods"]
|
|
verbs: ["get", "list", "watch"]
|
|
- apiGroups: [""]
|
|
resources: ["nodes"]
|
|
verbs: ["get", "list"]
|
|
---
|
|
# ClusterRoleBinding to connect the ServiceAccount to the ClusterRole
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: ClusterRoleBinding
|
|
metadata:
|
|
name: kube-fetcher
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: kube-fetcher
|
|
namespace: {{ .Release.Namespace }}
|
|
roleRef:
|
|
kind: ClusterRole
|
|
name: kube-fetcher
|
|
apiGroup: rbac.authorization.k8s.io |