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.

62 lines
1.7 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. containers:
  11. - name: kube-proxy
  12. image: {{ hyperkube_image_repo }}:{{ hyperkube_image_tag }}
  13. imagePullPolicy: {{ k8s_image_pull_policy }}
  14. resources:
  15. limits:
  16. cpu: {{ kube_proxy_cpu_limit }}
  17. memory: {{ kube_proxy_memory_limit }}
  18. requests:
  19. cpu: {{ kube_proxy_cpu_requests }}
  20. memory: {{ kube_proxy_memory_requests }}
  21. command:
  22. - /hyperkube
  23. - proxy
  24. - --v={{ kube_log_level }}
  25. - --master={{ kube_apiserver_endpoint }}
  26. {% if not is_kube_master %}
  27. - --kubeconfig={{kube_config_dir}}/node-kubeconfig.yaml
  28. {% endif %}
  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}}/node-kubeconfig.yaml
  42. name: "kubeconfig"
  43. readOnly: true
  44. - mountPath: {{kube_config_dir}}/ssl
  45. name: "etc-kube-ssl"
  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. path: /usr/share/ca-certificates
  54. - name: "kubeconfig"
  55. hostPath:
  56. path: "{{kube_config_dir}}/node-kubeconfig.yaml"
  57. - name: "etc-kube-ssl"
  58. hostPath:
  59. path: "{{kube_config_dir}}/ssl"
  60. - name: "var-run-dbus"
  61. hostPath:
  62. path: "/var/run/dbus"