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:
|
|
|
|
k8s-app: kube-nginx
|
2016-09-28 19:05:08 +08:00
|
|
|
spec:
|
|
|
|
hostNetwork: true
|
2018-06-05 19:15:20 +08:00
|
|
|
nodeSelector:
|
|
|
|
beta.kubernetes.io/os: linux
|
2018-10-17 06:33:30 +08:00
|
|
|
{% if kube_version is version('v1.11.1', '>=') %}
|
2018-09-25 22:50:22 +08:00
|
|
|
priorityClassName: system-node-critical
|
|
|
|
{% endif %}
|
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:
|
|
|
|
limits:
|
|
|
|
cpu: {{ nginx_cpu_limit }}
|
|
|
|
memory: {{ nginx_memory_limit }}
|
|
|
|
requests:
|
|
|
|
cpu: {{ nginx_cpu_requests }}
|
|
|
|
memory: {{ nginx_memory_requests }}
|
2016-09-28 19:05:08 +08:00
|
|
|
securityContext:
|
|
|
|
privileged: true
|
|
|
|
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 }}
|