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.

42 lines
1.1 KiB

  1. apiVersion: v1
  2. kind: Pod
  3. metadata:
  4. name: haproxy
  5. namespace: kube-system
  6. labels:
  7. addonmanager.kubernetes.io/mode: Reconcile
  8. k8s-app: kube-haproxy
  9. annotations:
  10. haproxy-cfg-checksum: "{{ haproxy_stat.stat.checksum }}"
  11. spec:
  12. hostNetwork: true
  13. dnsPolicy: ClusterFirstWithHostNet
  14. nodeSelector:
  15. kubernetes.io/os: linux
  16. priorityClassName: system-node-critical
  17. containers:
  18. - name: haproxy
  19. image: {{ haproxy_image_repo }}:{{ haproxy_image_tag }}
  20. imagePullPolicy: {{ k8s_image_pull_policy }}
  21. resources:
  22. requests:
  23. cpu: {{ loadbalancer_apiserver_cpu_requests }}
  24. memory: {{ loadbalancer_apiserver_memory_requests }}
  25. {% if loadbalancer_apiserver_healthcheck_port is defined -%}
  26. livenessProbe:
  27. httpGet:
  28. path: /healthz
  29. port: {{ loadbalancer_apiserver_healthcheck_port }}
  30. readinessProbe:
  31. httpGet:
  32. path: /healthz
  33. port: {{ loadbalancer_apiserver_healthcheck_port }}
  34. {% endif -%}
  35. volumeMounts:
  36. - mountPath: /usr/local/etc/haproxy/
  37. name: etc-haproxy
  38. readOnly: true
  39. volumes:
  40. - name: etc-haproxy
  41. hostPath:
  42. path: {{ haproxy_config_dir }}