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.

43 lines
1.3 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. containers:
  20. - name: netchecker-agent
  21. image: "{{ agent_img }}"
  22. env:
  23. - name: MY_POD_NAME
  24. valueFrom:
  25. fieldRef:
  26. fieldPath: metadata.name
  27. - name: MY_NODE_NAME
  28. valueFrom:
  29. fieldRef:
  30. fieldPath: spec.nodeName
  31. args:
  32. - "-v=5"
  33. - "-alsologtostderr=true"
  34. - "-serverendpoint=netchecker-service:8081"
  35. - "-reportinterval={{ agent_report_interval }}"
  36. imagePullPolicy: {{ k8s_image_pull_policy }}
  37. resources:
  38. limits:
  39. cpu: {{ netchecker_agent_cpu_limit }}
  40. memory: {{ netchecker_agent_memory_limit }}
  41. requests:
  42. cpu: {{ netchecker_agent_cpu_requests }}
  43. memory: {{ netchecker_agent_memory_requests }}