You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
1.8 KiB

  1. apiVersion: v1
  2. kind: Pod
  3. metadata:
  4. name: kube-proxy
  5. namespace: {{system_namespace}}
  6. labels:
  7. k8s-app: kube-proxy
  8. spec:
  9. hostNetwork: true
  10. {% if kube_version | version_compare('v1.6', '>=') %}
  11. dnsPolicy: ClusterFirst
  12. {% endif %}
  13. containers:
  14. - name: kube-proxy
  15. image: {{ hyperkube_image_repo }}:{{ hyperkube_image_tag }}
  16. imagePullPolicy: {{ k8s_image_pull_policy }}
  17. resources:
  18. limits:
  19. cpu: {{ kube_proxy_cpu_limit }}
  20. memory: {{ kube_proxy_memory_limit }}
  21. requests:
  22. cpu: {{ kube_proxy_cpu_requests }}
  23. memory: {{ kube_proxy_memory_requests }}
  24. command:
  25. - /hyperkube
  26. - proxy
  27. - --v={{ kube_log_level }}
  28. - --kubeconfig={{kube_config_dir}}/kube-proxy-kubeconfig.yaml
  29. - --bind-address={{ ip | default(ansible_default_ipv4.address) }}
  30. - --cluster-cidr={{ kube_pods_subnet }}
  31. - --proxy-mode={{ kube_proxy_mode }}
  32. {% if kube_proxy_masquerade_all and kube_proxy_mode == "iptables" %}
  33. - --masquerade-all
  34. {% endif %}
  35. securityContext:
  36. privileged: true
  37. volumeMounts:
  38. - mountPath: /etc/ssl/certs
  39. name: ssl-certs-host
  40. readOnly: true
  41. - mountPath: "{{ kube_config_dir }}/ssl"
  42. name: etc-kube-ssl
  43. readOnly: true
  44. - mountPath: "{{ kube_config_dir }}/kube-proxy-kubeconfig.yaml"
  45. name: kubeconfig
  46. readOnly: true
  47. - mountPath: /var/run/dbus
  48. name: var-run-dbus
  49. readOnly: false
  50. volumes:
  51. - name: ssl-certs-host
  52. hostPath:
  53. {% if ansible_os_family == 'RedHat' %}
  54. path: /etc/pki/tls
  55. {% else %}
  56. path: /usr/share/ca-certificates
  57. {% endif %}
  58. - name: etc-kube-ssl
  59. hostPath:
  60. path: "{{ kube_config_dir }}/ssl"
  61. - name: kubeconfig
  62. hostPath:
  63. path: "{{ kube_config_dir }}/kube-proxy-kubeconfig.yaml"
  64. - name: var-run-dbus
  65. hostPath:
  66. path: /var/run/dbus