kilo-typhoon-flannel.yaml 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  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. - get
  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. app.kubernetes.io/part-of: kilo
  56. spec:
  57. selector:
  58. matchLabels:
  59. app.kubernetes.io/name: kilo
  60. app.kubernetes.io/part-of: kilo
  61. template:
  62. metadata:
  63. labels:
  64. app.kubernetes.io/name: kilo
  65. app.kubernetes.io/part-of: kilo
  66. spec:
  67. serviceAccountName: kilo
  68. hostNetwork: true
  69. containers:
  70. - name: kilo
  71. image: squat/kilo
  72. args:
  73. - --kubeconfig=/etc/kubernetes/kubeconfig
  74. - --hostname=$(NODE_NAME)
  75. - --cni=false
  76. - --compatibility=flannel
  77. - --local=false
  78. env:
  79. - name: NODE_NAME
  80. valueFrom:
  81. fieldRef:
  82. fieldPath: spec.nodeName
  83. ports:
  84. - containerPort: 1107
  85. name: metrics
  86. securityContext:
  87. privileged: true
  88. volumeMounts:
  89. - name: kilo-dir
  90. mountPath: /var/lib/kilo
  91. - name: kubeconfig
  92. mountPath: /etc/kubernetes
  93. readOnly: true
  94. - name: lib-modules
  95. mountPath: /lib/modules
  96. readOnly: true
  97. - name: xtables-lock
  98. mountPath: /run/xtables.lock
  99. readOnly: false
  100. tolerations:
  101. - effect: NoSchedule
  102. operator: Exists
  103. - effect: NoExecute
  104. operator: Exists
  105. volumes:
  106. - name: kilo-dir
  107. hostPath:
  108. path: /var/lib/kilo
  109. - name: kubeconfig
  110. configMap:
  111. name: kubeconfig-in-cluster
  112. - name: lib-modules
  113. hostPath:
  114. path: /lib/modules
  115. - name: xtables-lock
  116. hostPath:
  117. path: /run/xtables.lock
  118. type: FileOrCreate