2015-12-11 18:32:13 +08:00
|
|
|
apiVersion: v1
|
|
|
|
kind: Pod
|
|
|
|
metadata:
|
|
|
|
name: kube-proxy
|
2016-12-13 18:43:06 +08:00
|
|
|
namespace: {{system_namespace}}
|
2016-11-09 21:15:27 +08:00
|
|
|
labels:
|
|
|
|
k8s-app: kube-proxy
|
2015-12-11 18:32:13 +08:00
|
|
|
spec:
|
|
|
|
hostNetwork: true
|
|
|
|
containers:
|
|
|
|
- name: kube-proxy
|
2015-12-14 16:54:58 +08:00
|
|
|
image: {{ hyperkube_image_repo }}:{{ hyperkube_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: {{ kube_proxy_cpu_limit }}
|
|
|
|
memory: {{ kube_proxy_memory_limit }}
|
|
|
|
requests:
|
|
|
|
cpu: {{ kube_proxy_cpu_requests }}
|
|
|
|
memory: {{ kube_proxy_memory_requests }}
|
2015-12-11 18:32:13 +08:00
|
|
|
command:
|
|
|
|
- /hyperkube
|
|
|
|
- proxy
|
2016-11-25 18:33:39 +08:00
|
|
|
- --v={{ kube_log_level }}
|
2016-07-13 23:13:47 +08:00
|
|
|
- --master={{ kube_apiserver_endpoint }}
|
|
|
|
{% if not is_kube_master %}
|
2016-12-13 18:43:06 +08:00
|
|
|
- --kubeconfig={{kube_config_dir}}/node-kubeconfig.yaml
|
2015-12-11 18:32:13 +08:00
|
|
|
{% endif %}
|
2016-02-09 05:48:57 +08:00
|
|
|
- --bind-address={{ ip | default(ansible_default_ipv4.address) }}
|
2016-10-13 00:12:02 +08:00
|
|
|
- --cluster-cidr={{ kube_pods_subnet }}
|
2016-02-29 18:41:08 +08:00
|
|
|
- --proxy-mode={{ kube_proxy_mode }}
|
2016-10-03 18:08:41 +08:00
|
|
|
{% if kube_proxy_masquerade_all and kube_proxy_mode == "iptables" %}
|
|
|
|
- --masquerade-all
|
|
|
|
{% endif %}
|
2015-12-11 18:32:13 +08:00
|
|
|
securityContext:
|
|
|
|
privileged: true
|
|
|
|
volumeMounts:
|
|
|
|
- mountPath: /etc/ssl/certs
|
|
|
|
name: ssl-certs-host
|
|
|
|
readOnly: true
|
2016-12-13 18:43:06 +08:00
|
|
|
- mountPath: {{kube_config_dir}}/node-kubeconfig.yaml
|
2015-12-11 18:32:13 +08:00
|
|
|
name: "kubeconfig"
|
|
|
|
readOnly: true
|
2016-12-13 18:43:06 +08:00
|
|
|
- mountPath: {{kube_config_dir}}/ssl
|
2015-12-11 18:32:13 +08:00
|
|
|
name: "etc-kube-ssl"
|
|
|
|
readOnly: true
|
2016-12-06 00:25:27 +08:00
|
|
|
- mountPath: /var/run/dbus
|
|
|
|
name: "var-run-dbus"
|
|
|
|
readOnly: false
|
2015-12-11 18:32:13 +08:00
|
|
|
volumes:
|
|
|
|
- name: ssl-certs-host
|
|
|
|
hostPath:
|
|
|
|
path: /usr/share/ca-certificates
|
|
|
|
- name: "kubeconfig"
|
|
|
|
hostPath:
|
2016-12-13 18:43:06 +08:00
|
|
|
path: "{{kube_config_dir}}/node-kubeconfig.yaml"
|
2015-12-11 18:32:13 +08:00
|
|
|
- name: "etc-kube-ssl"
|
|
|
|
hostPath:
|
2016-12-13 18:43:06 +08:00
|
|
|
path: "{{kube_config_dir}}/ssl"
|
2016-12-06 00:25:27 +08:00
|
|
|
- name: "var-run-dbus"
|
|
|
|
hostPath:
|
|
|
|
path: "/var/run/dbus"
|