-
Notifications
You must be signed in to change notification settings - Fork 0
/
kube-scrambler.yml
108 lines (108 loc) · 2.36 KB
/
kube-scrambler.yml
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
99
100
101
102
103
104
105
106
107
108
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: scrambler
rules:
- apiGroups:
- ""
resources:
- nodes
verbs:
- get
- list
- watch
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: scrambler
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: scrambler
subjects:
- kind: ServiceAccount
name: scrambler
namespace: kube-system
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: scrambler
namespace: kube-system
---
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
name: kube-scrambler-ds
namespace: kube-system
labels:
tier: node
app: scrambler
spec:
template:
metadata:
labels:
tier: node
app: scrambler
spec:
hostNetwork: true
securityContext:
seLinuxOptions:
type: spc_t
serviceAccountName: scrambler
tolerations:
- operator: Exists
effect: NoSchedule
initContainers:
- name: install-cni
image: quay.io/jameskeane/scrambler
securityContext:
capabilities:
add: ["NET_ADMIN"]
env:
- name: NODENAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
command:
- ./install.sh
volumeMounts:
- name: cni
mountPath: /etc/cni/net.d
containers:
- name: kube-scrambler-agent
image: quay.io/jameskeane/scrambler
imagePullPolicy: Always
securityContext:
capabilities:
add: ["NET_ADMIN", "SYS_MODULE"]
env:
- name: NODENAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
workingDir: /var/lib/scrambler
command:
- ./agent.sh
volumeMounts:
- name: host-kube-kpi
mountPath: /var/lib/kubelet/pki
- name: host-kube-ca
mountPath: /etc/kubernetes/pki
- name: host-modules
mountPath: /lib/modules
volumes:
- name: cni
hostPath:
path: /etc/cni/net.d
- name: host-modules
hostPath:
path: /lib/modules
- name: host-kube-kpi
hostPath:
path: /var/lib/kubelet/pki
- name: host-kube-ca
hostPath:
path: /etc/kubernetes/pki