api-proxy-daemonset.yml.j2 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. ---
  2. apiVersion: extensions/v1beta1
  3. kind: DaemonSet
  4. metadata:
  5. name: contiv-api-proxy
  6. namespace: kube-system
  7. spec:
  8. updateStrategy:
  9. type: RollingUpdate
  10. selector:
  11. matchLabels:
  12. name: contiv-api-proxy
  13. template:
  14. metadata:
  15. namespace: kube-system
  16. labels:
  17. name: contiv-api-proxy
  18. annotations:
  19. scheduler.alpha.kubernetes.io/critical-pod: ""
  20. spec:
  21. serviceAccountName: contiv-api-proxy
  22. hostNetwork: true
  23. affinity:
  24. nodeAffinity:
  25. requiredDuringSchedulingIgnoredDuringExecution:
  26. nodeSelectorTerms:
  27. - matchExpressions:
  28. - key: kubernetes.io/hostname
  29. operator: In
  30. values:
  31. {% for node in groups.oo_masters_to_config %}
  32. - "{{ node }}"
  33. {% endfor %}
  34. tolerations:
  35. - key: node-role.kubernetes.io/master
  36. effect: NoSchedule
  37. containers:
  38. - name: contiv-api-proxy
  39. image: "{{ contiv_api_proxy_image_repo }}:{{ contiv_version }}"
  40. args:
  41. - "--listen-address=0.0.0.0:{{ contiv_api_proxy_port }}"
  42. - --tls-key-file=/var/contiv/api_proxy_key.pem
  43. - --tls-certificate=/var/contiv/api_proxy_cert.pem
  44. - "--data-store-address={{ etcd_host }}"
  45. - --data-store-driver=etcd
  46. - "--netmaster-address=127.0.0.1:{{ contiv_netmaster_port }}"
  47. ports:
  48. - containerPort: "{{ contiv_api_proxy_port }}"
  49. hostPort: "{{ contiv_api_proxy_port }}"
  50. volumeMounts:
  51. - name: secret-volume
  52. mountPath: /var/contiv
  53. readOnly: true
  54. volumes:
  55. - name: secret-volume
  56. secret:
  57. secretName: contiv-api-proxy-secret