kilo-kubeadm-flannel.yaml 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  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: kilo
  70. image: squat/kilo:0.7.0
  71. args:
  72. - --kubeconfig=/etc/kubernetes/kubeconfig
  73. - --hostname=$(NODE_NAME)
  74. - --cni=false
  75. - --compatibility=flannel
  76. - --local=false
  77. - --internal-cidr=$(NODE_IP)/32
  78. env:
  79. - name: NODE_NAME
  80. valueFrom:
  81. fieldRef:
  82. fieldPath: spec.nodeName
  83. - name: NODE_IP
  84. valueFrom:
  85. fieldRef:
  86. fieldPath: status.hostIP
  87. ports:
  88. - containerPort: 1107
  89. name: metrics
  90. securityContext:
  91. privileged: true
  92. volumeMounts:
  93. - name: kilo-dir
  94. mountPath: /var/lib/kilo
  95. - name: kubeconfig
  96. mountPath: /etc/kubernetes
  97. readOnly: true
  98. - name: lib-modules
  99. mountPath: /lib/modules
  100. readOnly: true
  101. - name: xtables-lock
  102. mountPath: /run/xtables.lock
  103. readOnly: false
  104. tolerations:
  105. - effect: NoSchedule
  106. operator: Exists
  107. - effect: NoExecute
  108. operator: Exists
  109. volumes:
  110. - name: kilo-dir
  111. hostPath:
  112. path: /var/lib/kilo
  113. - name: kubeconfig
  114. configMap:
  115. name: kube-proxy
  116. items:
  117. - key: kubeconfig.conf
  118. path: kubeconfig
  119. - name: lib-modules
  120. hostPath:
  121. path: /lib/modules
  122. - name: xtables-lock
  123. hostPath:
  124. path: /run/xtables.lock
  125. type: FileOrCreate