2015-12-11 10:32:13 +00:00
|
|
|
apiVersion: v1
|
|
|
|
kind: Pod
|
|
|
|
metadata:
|
|
|
|
name: kube-proxy
|
2016-12-13 10:43:06 +00:00
|
|
|
namespace: {{system_namespace}}
|
2016-11-09 13:15:27 +00:00
|
|
|
labels:
|
|
|
|
k8s-app: kube-proxy
|
2015-12-11 10:32:13 +00:00
|
|
|
spec:
|
|
|
|
hostNetwork: true
|
2017-03-28 14:33:07 +00:00
|
|
|
{% if kube_version | version_compare('v1.6', '>=') %}
|
2017-04-20 09:07:34 +00:00
|
|
|
dnsPolicy: ClusterFirst
|
2017-03-28 14:33:07 +00:00
|
|
|
{% endif %}
|
2015-12-11 10:32:13 +00:00
|
|
|
containers:
|
|
|
|
- name: kube-proxy
|
2015-12-14 08:54:58 +00:00
|
|
|
image: {{ hyperkube_image_repo }}:{{ hyperkube_image_tag }}
|
2016-11-22 15:16:04 +00:00
|
|
|
imagePullPolicy: {{ k8s_image_pull_policy }}
|
2016-12-23 14:44:44 +00: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 10:32:13 +00:00
|
|
|
command:
|
|
|
|
- /hyperkube
|
|
|
|
- proxy
|
2016-11-25 10:33:39 +00:00
|
|
|
- --v={{ kube_log_level }}
|
2017-06-15 10:15:52 +00:00
|
|
|
- --kubeconfig={{kube_config_dir}}/kube-proxy-kubeconfig.yaml
|
2016-02-08 21:48:57 +00:00
|
|
|
- --bind-address={{ ip | default(ansible_default_ipv4.address) }}
|
2016-10-12 16:12:02 +00:00
|
|
|
- --cluster-cidr={{ kube_pods_subnet }}
|
2016-02-29 10:41:08 +00:00
|
|
|
- --proxy-mode={{ kube_proxy_mode }}
|
2016-10-03 10:08:41 +00:00
|
|
|
{% if kube_proxy_masquerade_all and kube_proxy_mode == "iptables" %}
|
|
|
|
- --masquerade-all
|
|
|
|
{% endif %}
|
2015-12-11 10:32:13 +00:00
|
|
|
securityContext:
|
|
|
|
privileged: true
|
|
|
|
volumeMounts:
|
|
|
|
- mountPath: /etc/ssl/certs
|
|
|
|
name: ssl-certs-host
|
|
|
|
readOnly: true
|
2017-06-16 06:21:21 +00:00
|
|
|
- mountPath: "{{ kube_config_dir }}/ssl"
|
|
|
|
name: etc-kube-ssl
|
2015-12-11 10:32:13 +00:00
|
|
|
readOnly: true
|
2017-06-16 14:28:23 +00:00
|
|
|
- mountPath: {{kube_config_dir}}/kube-proxy-kubeconfig.yaml
|
|
|
|
name: "kubeconfig"
|
|
|
|
readOnly: true
|
2017-06-16 06:21:21 +00:00
|
|
|
- mountPath: "{{ kube_config_dir }}/kube-proxy-kubeconfig.yaml"
|
|
|
|
name: kubeconfig
|
2015-12-11 10:32:13 +00:00
|
|
|
readOnly: true
|
2016-12-05 16:25:27 +00:00
|
|
|
- mountPath: /var/run/dbus
|
2017-06-16 06:21:21 +00:00
|
|
|
name: var-run-dbus
|
2016-12-05 16:25:27 +00:00
|
|
|
readOnly: false
|
2015-12-11 10:32:13 +00:00
|
|
|
volumes:
|
|
|
|
- name: ssl-certs-host
|
|
|
|
hostPath:
|
2017-02-24 21:41:27 +00:00
|
|
|
{% if ansible_os_family == 'RedHat' %}
|
|
|
|
path: /etc/pki/tls
|
|
|
|
{% else %}
|
2015-12-11 10:32:13 +00:00
|
|
|
path: /usr/share/ca-certificates
|
2017-02-24 21:41:27 +00:00
|
|
|
{% endif %}
|
2017-06-16 06:21:21 +00:00
|
|
|
- name: etc-kube-ssl
|
2015-12-11 10:32:13 +00:00
|
|
|
hostPath:
|
2017-06-16 06:21:21 +00:00
|
|
|
path: "{{ kube_config_dir }}/ssl"
|
|
|
|
- name: kubeconfig
|
2015-12-11 10:32:13 +00:00
|
|
|
hostPath:
|
2017-06-16 14:28:23 +00:00
|
|
|
path: "{{kube_config_dir}}/kube-proxy-kubeconfig.yaml"
|
|
|
|
- name: "etc-kube-ssl"
|
|
|
|
hostPath:
|
|
|
|
path: "{{kube_config_dir}}/ssl"
|
2017-06-16 06:21:21 +00:00
|
|
|
- name: var-run-dbus
|
2016-12-05 16:25:27 +00:00
|
|
|
hostPath:
|
2017-06-16 06:21:21 +00:00
|
|
|
path: /var/run/dbus
|