-
Notifications
You must be signed in to change notification settings - Fork 2
/
installation.yaml
98 lines (98 loc) · 2.23 KB
/
installation.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
apiVersion: v1
kind: Namespace
metadata:
name: shiba
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: shiba
namespace: shiba
labels:
kubernetes.io/cluster-service: "true"
addonmanager.kubernetes.io/mode: Reconcile
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: shiba
rules:
- apiGroups: [ "" ]
resources: [ "nodes" ]
verbs: [ "get", "watch", "list" ]
- apiGroups: [ "" ]
resources: [ "configmaps" ]
resourceNames: [ "kubeadm-config" ]
verbs: [ "get" ]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: shiba
subjects:
- kind: ServiceAccount
name: shiba
namespace: shiba
roleRef:
kind: ClusterRole
name: shiba
apiGroup: rbac.authorization.k8s.io
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: shiba
namespace: shiba
labels:
app: shiba
spec:
selector:
matchLabels:
app: shiba
template:
metadata:
labels:
app: shiba
spec:
volumes:
- name: cni-config
hostPath:
path: /etc/cni/net.d
type: DirectoryOrCreate
- name: tmp
hostPath:
path: /tmp/shiba
type: DirectoryOrCreate
containers:
- name: shiba
image: moycat/shiba:latest
env:
- name: SHIBA_NODENAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: spec.nodeName
- name: SHIBA_APITIMEOUT
value: "30"
- name: SHIBA_CNICONFIGPATH
value: "/etc/cni/net.d"
# - name: SHIBA_CLUSTERPODCIDRS
# value: "192.168.0.0/16,fddd:dead:beef::/48"
# - name: SHIBA_PPROFPORT
# value: "7442"
# - name: SHIBA_DEBUG
# value: "true"
volumeMounts:
- name: cni-config
mountPath: /etc/cni/net.d
- name: tmp
mountPath: /tmp
securityContext:
privileged: true
restartPolicy: Always
hostNetwork: true
dnsPolicy: ClusterFirst
priorityClassName: system-node-critical
serviceAccountName: shiba
tolerations:
- operator: Exists