kilo-kubeadm-flannel-userspace.yaml 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  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: wireguard
  70. image: ghcr.io/masipcat/wireguard-go-docker:0.0.20230223
  71. args:
  72. - wireguard-go=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.7.0
  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. - --internal-cidr=$(NODE_IP)/32
  92. env:
  93. - name: NODE_NAME
  94. valueFrom:
  95. fieldRef:
  96. fieldPath: spec.nodeName
  97. - name: NODE_IP
  98. valueFrom:
  99. fieldRef:
  100. fieldPath: status.hostIP
  101. ports:
  102. - containerPort: 1107
  103. name: metrics
  104. securityContext:
  105. privileged: true
  106. volumeMounts:
  107. - name: cni-conf-dir
  108. mountPath: /etc/cni/net.d
  109. - name: kilo-dir
  110. mountPath: /var/lib/kilo
  111. - name: lib-modules
  112. mountPath: /lib/modules
  113. readOnly: true
  114. - name: xtables-lock
  115. mountPath: /run/xtables.lock
  116. readOnly: false
  117. - name: wireguard
  118. mountPath: /var/run/wireguard
  119. readOnly: false
  120. tolerations:
  121. - operator: Exists
  122. volumes:
  123. - name: cni-bin-dir
  124. hostPath:
  125. path: /opt/cni/bin
  126. - name: cni-conf-dir
  127. hostPath:
  128. path: /etc/cni/net.d
  129. - name: kilo-dir
  130. hostPath:
  131. path: /var/lib/kilo
  132. - name: kubeconfig
  133. configMap:
  134. name: kube-proxy
  135. items:
  136. - key: kubeconfig.conf
  137. path: kubeconfig
  138. - name: lib-modules
  139. hostPath:
  140. path: /lib/modules
  141. - name: xtables-lock
  142. hostPath:
  143. path: /run/xtables.lock
  144. type: FileOrCreate
  145. - name: wireguard
  146. hostPath:
  147. path: /var/run/wireguard