2019-04-10 12:56:18 +00:00
|
|
|
apiVersion: v1
|
|
|
|
kind: Pod
|
|
|
|
metadata:
|
|
|
|
name: haproxy
|
|
|
|
namespace: kube-system
|
|
|
|
labels:
|
|
|
|
addonmanager.kubernetes.io/mode: Reconcile
|
|
|
|
k8s-app: kube-haproxy
|
2019-06-10 12:59:08 +00:00
|
|
|
annotations:
|
|
|
|
haproxy-cfg-checksum: "{{ haproxy_stat.stat.checksum }}"
|
2019-04-10 12:56:18 +00:00
|
|
|
spec:
|
|
|
|
hostNetwork: true
|
2019-06-05 10:17:56 +00:00
|
|
|
dnsPolicy: ClusterFirstWithHostNet
|
2019-04-10 12:56:18 +00:00
|
|
|
nodeSelector:
|
|
|
|
beta.kubernetes.io/os: linux
|
|
|
|
priorityClassName: system-node-critical
|
|
|
|
containers:
|
|
|
|
- name: haproxy
|
|
|
|
image: {{ haproxy_image_repo }}:{{ haproxy_image_tag }}
|
|
|
|
imagePullPolicy: {{ k8s_image_pull_policy }}
|
|
|
|
resources:
|
|
|
|
requests:
|
|
|
|
cpu: {{ loadbalancer_apiserver_cpu_requests }}
|
|
|
|
memory: {{ loadbalancer_apiserver_memory_requests }}
|
|
|
|
securityContext:
|
|
|
|
privileged: true
|
|
|
|
{% if loadbalancer_apiserver_healthcheck_port is defined -%}
|
|
|
|
livenessProbe:
|
|
|
|
httpGet:
|
|
|
|
path: /healthz
|
|
|
|
port: {{ loadbalancer_apiserver_healthcheck_port }}
|
|
|
|
readinessProbe:
|
|
|
|
httpGet:
|
|
|
|
path: /healthz
|
|
|
|
port: {{ loadbalancer_apiserver_healthcheck_port }}
|
|
|
|
{% endif -%}
|
|
|
|
volumeMounts:
|
|
|
|
- mountPath: /usr/local/etc/haproxy/
|
|
|
|
name: etc-haproxy
|
|
|
|
readOnly: true
|
|
|
|
volumes:
|
|
|
|
- name: etc-haproxy
|
|
|
|
hostPath:
|
|
|
|
path: {{ haproxy_config_dir }}
|