2016-09-28 19:05:08 +08:00
|
|
|
apiVersion: v1
|
|
|
|
kind: Pod
|
|
|
|
metadata:
|
|
|
|
name: nginx-proxy
|
2018-03-30 19:29:13 +08:00
|
|
|
namespace: kube-system
|
2016-11-09 21:15:27 +08:00
|
|
|
labels:
|
2019-04-08 17:02:29 +08:00
|
|
|
addonmanager.kubernetes.io/mode: Reconcile
|
2016-11-09 21:15:27 +08:00
|
|
|
k8s-app: kube-nginx
|
2019-06-10 20:59:08 +08:00
|
|
|
annotations:
|
|
|
|
nginx-cfg-checksum: "{{ nginx_stat.stat.checksum }}"
|
2016-09-28 19:05:08 +08:00
|
|
|
spec:
|
|
|
|
hostNetwork: true
|
2019-06-05 18:17:56 +08:00
|
|
|
dnsPolicy: ClusterFirstWithHostNet
|
2018-06-05 19:15:20 +08:00
|
|
|
nodeSelector:
|
|
|
|
beta.kubernetes.io/os: linux
|
2018-09-25 22:50:22 +08:00
|
|
|
priorityClassName: system-node-critical
|
2016-09-28 19:05:08 +08:00
|
|
|
containers:
|
|
|
|
- name: nginx-proxy
|
|
|
|
image: {{ nginx_image_repo }}:{{ nginx_image_tag }}
|
2016-11-22 23:16:04 +08:00
|
|
|
imagePullPolicy: {{ k8s_image_pull_policy }}
|
2016-12-23 22:44:44 +08:00
|
|
|
resources:
|
|
|
|
requests:
|
2019-04-10 20:56:18 +08:00
|
|
|
cpu: {{ loadbalancer_apiserver_cpu_requests }}
|
|
|
|
memory: {{ loadbalancer_apiserver_memory_requests }}
|
2016-09-28 19:05:08 +08:00
|
|
|
securityContext:
|
|
|
|
privileged: true
|
2019-04-10 20:56:18 +08:00
|
|
|
{% if loadbalancer_apiserver_healthcheck_port is defined -%}
|
2019-03-28 21:20:46 +08:00
|
|
|
livenessProbe:
|
|
|
|
httpGet:
|
|
|
|
path: /healthz
|
2019-04-10 20:56:18 +08:00
|
|
|
port: {{ loadbalancer_apiserver_healthcheck_port }}
|
2019-04-08 17:02:29 +08:00
|
|
|
readinessProbe:
|
|
|
|
httpGet:
|
|
|
|
path: /healthz
|
2019-04-10 20:56:18 +08:00
|
|
|
port: {{ loadbalancer_apiserver_healthcheck_port }}
|
2019-03-28 21:20:46 +08:00
|
|
|
{% endif -%}
|
2016-09-28 19:05:08 +08:00
|
|
|
volumeMounts:
|
|
|
|
- mountPath: /etc/nginx
|
|
|
|
name: etc-nginx
|
|
|
|
readOnly: true
|
|
|
|
volumes:
|
|
|
|
- name: etc-nginx
|
|
|
|
hostPath:
|
2018-10-11 21:33:18 +08:00
|
|
|
path: {{ nginx_config_dir }}
|