kilo-kubeadm-flannel-userspace.yaml 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. apiVersion: v1
  2. kind: ServiceAccount
  3. metadata:
  4. name: kilo
  5. namespace: kube-system
  6. ---
  7. apiVersion: rbac.authorization.k8s.io/v1
  8. kind: ClusterRole
  9. metadata:
  10. name: kilo
  11. rules:
  12. - apiGroups:
  13. - ""
  14. resources:
  15. - nodes
  16. verbs:
  17. - list
  18. - patch
  19. - watch
  20. - apiGroups:
  21. - kilo.squat.ai
  22. resources:
  23. - peers
  24. verbs:
  25. - list
  26. - watch
  27. - apiGroups:
  28. - apiextensions.k8s.io
  29. resources:
  30. - customresourcedefinitions
  31. verbs:
  32. - get
  33. ---
  34. apiVersion: rbac.authorization.k8s.io/v1
  35. kind: ClusterRoleBinding
  36. metadata:
  37. name: kilo
  38. roleRef:
  39. apiGroup: rbac.authorization.k8s.io
  40. kind: ClusterRole
  41. name: kilo
  42. subjects:
  43. - kind: ServiceAccount
  44. name: kilo
  45. namespace: kube-system
  46. ---
  47. apiVersion: apps/v1
  48. kind: DaemonSet
  49. metadata:
  50. name: kilo
  51. namespace: kube-system
  52. labels:
  53. app.kubernetes.io/name: kilo
  54. app.kubernetes.io/part-of: kilo
  55. spec:
  56. selector:
  57. matchLabels:
  58. app.kubernetes.io/name: kilo
  59. app.kubernetes.io/part-of: kilo
  60. template:
  61. metadata:
  62. labels:
  63. app.kubernetes.io/name: kilo
  64. app.kubernetes.io/part-of: kilo
  65. spec:
  66. serviceAccountName: kilo
  67. hostNetwork: true
  68. containers:
  69. - name: boringtun
  70. image: leonnicolas/boringtun
  71. args:
  72. - --disable-drop-privileges=true
  73. - --foreground
  74. - kilo0
  75. securityContext:
  76. privileged: true
  77. volumeMounts:
  78. - name: wireguard
  79. mountPath: /var/run/wireguard
  80. readOnly: false
  81. - name: kilo
  82. image: squat/kilo:0.4.1
  83. args:
  84. - --kubeconfig=/etc/kubernetes/kubeconfig
  85. - --hostname=$(NODE_NAME)
  86. - --create-interface=false
  87. - --interface=kilo0
  88. - --cni=false
  89. - --compatibility=flannel
  90. - --local=false
  91. env:
  92. - name: NODE_NAME
  93. valueFrom:
  94. fieldRef:
  95. fieldPath: spec.nodeName
  96. ports:
  97. - containerPort: 1107
  98. name: metrics
  99. securityContext:
  100. privileged: true
  101. volumeMounts:
  102. - name: cni-conf-dir
  103. mountPath: /etc/cni/net.d
  104. - name: kilo-dir
  105. mountPath: /var/lib/kilo
  106. - name: lib-modules
  107. mountPath: /lib/modules
  108. readOnly: true
  109. - name: xtables-lock
  110. mountPath: /run/xtables.lock
  111. readOnly: false
  112. - name: wireguard
  113. mountPath: /var/run/wireguard
  114. readOnly: false
  115. tolerations:
  116. - operator: Exists
  117. volumes:
  118. - name: cni-bin-dir
  119. hostPath:
  120. path: /opt/cni/bin
  121. - name: cni-conf-dir
  122. hostPath:
  123. path: /etc/cni/net.d
  124. - name: kilo-dir
  125. hostPath:
  126. path: /var/lib/kilo
  127. - name: kubeconfig
  128. configMap:
  129. name: kube-proxy
  130. items:
  131. - key: kubeconfig.conf
  132. path: kubeconfig
  133. - name: lib-modules
  134. hostPath:
  135. path: /lib/modules
  136. - name: xtables-lock
  137. hostPath:
  138. path: /run/xtables.lock
  139. type: FileOrCreate
  140. - name: wireguard
  141. hostPath:
  142. path: /var/run/wireguard