logging node name for important operations
terminating application when watching pods stops Dockerfile and docker compose file added. helm chart added
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: DaemonSet
|
||||
metadata:
|
||||
name: kube-fetcher
|
||||
namespace: {{ .Release.Namespace }}
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: kube-fetcher
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: kube-fetcher
|
||||
spec:
|
||||
serviceAccountName: kube-fetcher
|
||||
containers:
|
||||
- name: fetcher
|
||||
image: cat.wamblee.org/kube-fetcher:1.0.0
|
||||
imagePullPolicy: Always
|
||||
env:
|
||||
- name: NODE_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: spec.nodeName
|
||||
securityContext:
|
||||
privileged: true
|
||||
runAsUser: 0
|
||||
args:
|
||||
- --ready-duration=1m
|
||||
- --v=3
|
||||
volumeMounts:
|
||||
- mountPath: /run/containerd/containerd.sock
|
||||
name: containerd-sock
|
||||
volumes:
|
||||
- name: containerd-sock
|
||||
hostPath:
|
||||
path: /run/containerd/containerd.sock
|
||||
type: Socket
|
||||
@@ -0,0 +1,32 @@
|
||||
---
|
||||
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
|
||||
Reference in New Issue
Block a user