You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
1.5 KiB

  1. apiVersion: extensions/v1beta1
  2. kind: DaemonSet
  3. metadata:
  4. labels:
  5. app: netchecker-agent-hostnet
  6. name: netchecker-agent-hostnet
  7. namespace: {{ netcheck_namespace }}
  8. spec:
  9. template:
  10. metadata:
  11. name: netchecker-agent-hostnet
  12. labels:
  13. app: netchecker-agent-hostnet
  14. spec:
  15. hostNetwork: True
  16. {% if kube_version | version_compare('v1.6', '>=') %}
  17. dnsPolicy: ClusterFirstWithHostNet
  18. {% endif %}
  19. tolerations:
  20. - effect: NoSchedule
  21. operator: Exists
  22. containers:
  23. - name: netchecker-agent
  24. image: "{{ agent_img }}"
  25. env:
  26. - name: MY_POD_NAME
  27. valueFrom:
  28. fieldRef:
  29. fieldPath: metadata.name
  30. - name: MY_NODE_NAME
  31. valueFrom:
  32. fieldRef:
  33. fieldPath: spec.nodeName
  34. args:
  35. - "-v=5"
  36. - "-alsologtostderr=true"
  37. - "-serverendpoint=netchecker-service:8081"
  38. - "-reportinterval={{ agent_report_interval }}"
  39. imagePullPolicy: {{ k8s_image_pull_policy }}
  40. resources:
  41. limits:
  42. cpu: {{ netchecker_agent_cpu_limit }}
  43. memory: {{ netchecker_agent_memory_limit }}
  44. requests:
  45. cpu: {{ netchecker_agent_cpu_requests }}
  46. memory: {{ netchecker_agent_memory_requests }}
  47. updateStrategy:
  48. rollingUpdate:
  49. maxUnavailable: 100%
  50. type: RollingUpdate