kilo-typhoon-flannel.yaml 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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. - update
  27. - watch
  28. - apiGroups:
  29. - apiextensions.k8s.io
  30. resources:
  31. - customresourcedefinitions
  32. verbs:
  33. - create
  34. ---
  35. apiVersion: rbac.authorization.k8s.io/v1
  36. kind: ClusterRoleBinding
  37. metadata:
  38. name: kilo
  39. roleRef:
  40. apiGroup: rbac.authorization.k8s.io
  41. kind: ClusterRole
  42. name: kilo
  43. subjects:
  44. - kind: ServiceAccount
  45. name: kilo
  46. namespace: kube-system
  47. ---
  48. apiVersion: apps/v1
  49. kind: DaemonSet
  50. metadata:
  51. name: kilo
  52. namespace: kube-system
  53. labels:
  54. app.kubernetes.io/name: kilo
  55. spec:
  56. selector:
  57. matchLabels:
  58. app.kubernetes.io/name: kilo
  59. template:
  60. metadata:
  61. labels:
  62. app.kubernetes.io/name: kilo
  63. spec:
  64. serviceAccountName: kilo
  65. hostNetwork: true
  66. containers:
  67. - name: kilo
  68. image: squat/kilo
  69. args:
  70. - --kubeconfig=/etc/kubernetes/kubeconfig
  71. - --hostname=$(NODE_NAME)
  72. - --cni=false
  73. - --compatibility=flannel
  74. - --local=false
  75. env:
  76. - name: NODE_NAME
  77. valueFrom:
  78. fieldRef:
  79. fieldPath: spec.nodeName
  80. securityContext:
  81. privileged: true
  82. volumeMounts:
  83. - name: kilo-dir
  84. mountPath: /var/lib/kilo
  85. - name: kubeconfig
  86. mountPath: /etc/kubernetes
  87. readOnly: true
  88. - name: lib-modules
  89. mountPath: /lib/modules
  90. readOnly: true
  91. - name: xtables-lock
  92. mountPath: /run/xtables.lock
  93. readOnly: false
  94. tolerations:
  95. - effect: NoSchedule
  96. operator: Exists
  97. - effect: NoExecute
  98. operator: Exists
  99. volumes:
  100. - name: kilo-dir
  101. hostPath:
  102. path: /var/lib/kilo
  103. - name: kubeconfig
  104. configMap:
  105. name: kubeconfig-in-cluster
  106. - name: lib-modules
  107. hostPath:
  108. path: /lib/modules
  109. - name: xtables-lock
  110. hostPath:
  111. path: /run/xtables.lock
  112. type: FileOrCreate