kilo-bootkube-flannel.yaml 2.4 KB

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