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.

69 lines
1.9 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. - --master={{ kube_apiserver_endpoint }}
  29. {% if not is_kube_master %}
  30. - --kubeconfig={{kube_config_dir}}/node-kubeconfig.yaml
  31. {% endif %}
  32. - --bind-address={{ ip | default(ansible_default_ipv4.address) }}
  33. - --cluster-cidr={{ kube_pods_subnet }}
  34. - --proxy-mode={{ kube_proxy_mode }}
  35. {% if kube_proxy_masquerade_all and kube_proxy_mode == "iptables" %}
  36. - --masquerade-all
  37. {% endif %}
  38. securityContext:
  39. privileged: true
  40. volumeMounts:
  41. - mountPath: /etc/ssl/certs
  42. name: ssl-certs-host
  43. readOnly: true
  44. - mountPath: {{kube_config_dir}}/node-kubeconfig.yaml
  45. name: "kubeconfig"
  46. readOnly: true
  47. - mountPath: {{kube_config_dir}}/ssl
  48. name: "etc-kube-ssl"
  49. readOnly: true
  50. - mountPath: /var/run/dbus
  51. name: "var-run-dbus"
  52. readOnly: false
  53. volumes:
  54. - name: ssl-certs-host
  55. hostPath:
  56. {% if ansible_os_family == 'RedHat' %}
  57. path: /etc/pki/tls
  58. {% else %}
  59. path: /usr/share/ca-certificates
  60. {% endif %}
  61. - name: "kubeconfig"
  62. hostPath:
  63. path: "{{kube_config_dir}}/node-kubeconfig.yaml"
  64. - name: "etc-kube-ssl"
  65. hostPath:
  66. path: "{{kube_config_dir}}/ssl"
  67. - name: "var-run-dbus"
  68. hostPath:
  69. path: "/var/run/dbus"