2019-01-21 18:55:30 +00:00
|
|
|
apiVersion: v1
|
2019-05-06 23:49:55 +00:00
|
|
|
kind: ConfigMap
|
|
|
|
metadata:
|
|
|
|
name: kilo
|
|
|
|
namespace: kube-system
|
|
|
|
labels:
|
|
|
|
app.kubernetes.io/name: kilo
|
|
|
|
data:
|
|
|
|
cni-conf.json: |
|
|
|
|
{
|
2022-04-19 12:28:31 +00:00
|
|
|
"cniVersion":"1.0.0",
|
2019-05-06 23:49:55 +00:00
|
|
|
"name":"kilo",
|
|
|
|
"plugins":[
|
|
|
|
{
|
|
|
|
"name":"kubernetes",
|
|
|
|
"type":"bridge",
|
|
|
|
"bridge":"kube-bridge",
|
|
|
|
"isDefaultGateway":true,
|
2020-02-10 15:04:32 +00:00
|
|
|
"forceAddress":true,
|
2020-02-22 15:57:01 +00:00
|
|
|
"mtu": 1420,
|
2019-05-06 23:49:55 +00:00
|
|
|
"ipam":{
|
|
|
|
"type":"host-local"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type":"portmap",
|
|
|
|
"snat":true,
|
|
|
|
"capabilities":{
|
|
|
|
"portMappings":true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
2019-01-21 18:55:30 +00:00
|
|
|
kind: ServiceAccount
|
|
|
|
metadata:
|
|
|
|
name: kilo
|
|
|
|
namespace: kube-system
|
|
|
|
---
|
2019-07-16 21:37:57 +00:00
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
2019-01-21 18:55:30 +00:00
|
|
|
kind: ClusterRole
|
|
|
|
metadata:
|
|
|
|
name: kilo
|
|
|
|
rules:
|
|
|
|
- apiGroups:
|
|
|
|
- ""
|
|
|
|
resources:
|
|
|
|
- nodes
|
|
|
|
verbs:
|
|
|
|
- list
|
|
|
|
- patch
|
|
|
|
- watch
|
2019-05-03 10:53:40 +00:00
|
|
|
- apiGroups:
|
|
|
|
- kilo.squat.ai
|
|
|
|
resources:
|
|
|
|
- peers
|
|
|
|
verbs:
|
|
|
|
- list
|
|
|
|
- watch
|
|
|
|
- apiGroups:
|
|
|
|
- apiextensions.k8s.io
|
|
|
|
resources:
|
|
|
|
- customresourcedefinitions
|
|
|
|
verbs:
|
2021-06-14 07:08:46 +00:00
|
|
|
- get
|
2019-01-21 18:55:30 +00:00
|
|
|
---
|
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
kind: ClusterRoleBinding
|
|
|
|
metadata:
|
|
|
|
name: kilo
|
|
|
|
roleRef:
|
|
|
|
apiGroup: rbac.authorization.k8s.io
|
|
|
|
kind: ClusterRole
|
|
|
|
name: kilo
|
|
|
|
subjects:
|
|
|
|
- kind: ServiceAccount
|
|
|
|
name: kilo
|
|
|
|
namespace: kube-system
|
|
|
|
---
|
2019-07-16 21:37:57 +00:00
|
|
|
apiVersion: apps/v1
|
2019-01-18 01:50:10 +00:00
|
|
|
kind: DaemonSet
|
|
|
|
metadata:
|
|
|
|
name: kilo
|
|
|
|
namespace: kube-system
|
|
|
|
labels:
|
|
|
|
app.kubernetes.io/name: kilo
|
2021-05-13 14:25:29 +00:00
|
|
|
app.kubernetes.io/part-of: kilo
|
2019-01-18 01:50:10 +00:00
|
|
|
spec:
|
2019-08-01 14:50:59 +00:00
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app.kubernetes.io/name: kilo
|
2021-05-13 14:25:29 +00:00
|
|
|
app.kubernetes.io/part-of: kilo
|
2019-01-18 01:50:10 +00:00
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app.kubernetes.io/name: kilo
|
2021-05-13 14:25:29 +00:00
|
|
|
app.kubernetes.io/part-of: kilo
|
2019-01-18 01:50:10 +00:00
|
|
|
spec:
|
2019-01-21 18:55:30 +00:00
|
|
|
serviceAccountName: kilo
|
2019-01-18 01:50:10 +00:00
|
|
|
hostNetwork: true
|
|
|
|
containers:
|
|
|
|
- name: kilo
|
2022-04-11 16:18:26 +00:00
|
|
|
image: squat/kilo:0.4.1
|
2019-01-18 01:50:10 +00:00
|
|
|
args:
|
|
|
|
- --kubeconfig=/etc/kubernetes/kubeconfig
|
2019-05-17 20:29:49 +00:00
|
|
|
- --hostname=$(NODE_NAME)
|
|
|
|
env:
|
|
|
|
- name: NODE_NAME
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: spec.nodeName
|
2021-05-06 17:30:43 +00:00
|
|
|
ports:
|
|
|
|
- containerPort: 1107
|
|
|
|
name: metrics
|
2019-01-18 01:50:10 +00:00
|
|
|
securityContext:
|
|
|
|
privileged: true
|
|
|
|
volumeMounts:
|
2019-05-10 20:21:52 +00:00
|
|
|
- name: cni-conf-dir
|
|
|
|
mountPath: /etc/cni/net.d
|
|
|
|
- name: kilo-dir
|
|
|
|
mountPath: /var/lib/kilo
|
2019-01-18 01:50:10 +00:00
|
|
|
- name: kubeconfig
|
|
|
|
mountPath: /etc/kubernetes/kubeconfig
|
|
|
|
readOnly: true
|
2020-05-11 07:40:11 +00:00
|
|
|
- name: lib-modules
|
|
|
|
mountPath: /lib/modules
|
|
|
|
readOnly: true
|
|
|
|
- name: xtables-lock
|
|
|
|
mountPath: /run/xtables.lock
|
|
|
|
readOnly: false
|
2019-05-06 23:49:55 +00:00
|
|
|
initContainers:
|
|
|
|
- name: install-cni
|
2022-04-11 16:18:26 +00:00
|
|
|
image: squat/kilo:0.4.1
|
2019-05-06 23:49:55 +00:00
|
|
|
command:
|
|
|
|
- /bin/sh
|
|
|
|
- -c
|
|
|
|
- set -e -x;
|
|
|
|
cp /opt/cni/bin/* /host/opt/cni/bin/;
|
|
|
|
TMP_CONF="$CNI_CONF_NAME".tmp;
|
|
|
|
echo "$CNI_NETWORK_CONFIG" > $TMP_CONF;
|
|
|
|
rm -f /host/etc/cni/net.d/*;
|
|
|
|
mv $TMP_CONF /host/etc/cni/net.d/$CNI_CONF_NAME
|
|
|
|
env:
|
|
|
|
- name: CNI_CONF_NAME
|
|
|
|
value: 10-kilo.conflist
|
|
|
|
- name: CNI_NETWORK_CONFIG
|
|
|
|
valueFrom:
|
|
|
|
configMapKeyRef:
|
|
|
|
name: kilo
|
|
|
|
key: cni-conf.json
|
|
|
|
volumeMounts:
|
|
|
|
- name: cni-bin-dir
|
|
|
|
mountPath: /host/opt/cni/bin
|
|
|
|
- name: cni-conf-dir
|
|
|
|
mountPath: /host/etc/cni/net.d
|
|
|
|
tolerations:
|
2019-01-18 01:50:10 +00:00
|
|
|
- effect: NoSchedule
|
|
|
|
operator: Exists
|
|
|
|
- effect: NoExecute
|
|
|
|
operator: Exists
|
|
|
|
volumes:
|
2019-05-06 23:49:55 +00:00
|
|
|
- name: cni-bin-dir
|
|
|
|
hostPath:
|
|
|
|
path: /opt/cni/bin
|
|
|
|
- name: cni-conf-dir
|
|
|
|
hostPath:
|
|
|
|
path: /etc/kubernetes/cni/net.d
|
2019-05-10 20:21:52 +00:00
|
|
|
- name: kilo-dir
|
|
|
|
hostPath:
|
|
|
|
path: /var/lib/kilo
|
|
|
|
- name: kubeconfig
|
|
|
|
hostPath:
|
|
|
|
path: /etc/kubernetes/kubeconfig
|
2020-05-11 07:40:11 +00:00
|
|
|
- name: lib-modules
|
|
|
|
hostPath:
|
|
|
|
path: /lib/modules
|
|
|
|
- name: xtables-lock
|
|
|
|
hostPath:
|
|
|
|
path: /run/xtables.lock
|
|
|
|
type: FileOrCreate
|