kube-proxy-ds.yaml 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. # Please keep kube-proxy configuration in-sync with:
  2. # cluster/saltbase/salt/kube-proxy/kube-proxy.manifest
  3. apiVersion: apps/v1
  4. kind: DaemonSet
  5. metadata:
  6. labels:
  7. k8s-app: kube-proxy
  8. addonmanager.kubernetes.io/mode: Reconcile
  9. name: kube-proxy
  10. namespace: kube-system
  11. spec:
  12. selector:
  13. matchLabels:
  14. k8s-app: kube-proxy
  15. updateStrategy:
  16. type: RollingUpdate
  17. rollingUpdate:
  18. maxUnavailable: 10%
  19. template:
  20. metadata:
  21. labels:
  22. k8s-app: kube-proxy
  23. annotations:
  24. scheduler.alpha.kubernetes.io/critical-pod: ''
  25. spec:
  26. priorityClassName: system-node-critical
  27. hostNetwork: true
  28. nodeSelector:
  29. # TODO(liggitt): switch to node.kubernetes.io/kube-proxy-ds-ready in 1.16
  30. beta.kubernetes.io/kube-proxy-ds-ready: "true"
  31. tolerations:
  32. - operator: "Exists"
  33. effect: "NoExecute"
  34. - operator: "Exists"
  35. effect: "NoSchedule"
  36. containers:
  37. - name: kube-proxy
  38. image: {{pillar['kube_docker_registry']}}/kube-proxy:{{pillar['kube-proxy_docker_tag']}}
  39. resources:
  40. requests:
  41. cpu: {{ cpurequest }}
  42. command:
  43. - /bin/sh
  44. - -c
  45. - kube-proxy {{cluster_cidr}} --resource-container="" --oom-score-adj=-998 {{params}} 1>>/var/log/kube-proxy.log 2>&1
  46. env:
  47. - name: KUBERNETES_SERVICE_HOST
  48. value: {{kubernetes_service_host_env_value}}
  49. {{kube_cache_mutation_detector_env_name}}
  50. {{kube_cache_mutation_detector_env_value}}
  51. securityContext:
  52. privileged: true
  53. volumeMounts:
  54. - mountPath: /var/log
  55. name: varlog
  56. readOnly: false
  57. - mountPath: /run/xtables.lock
  58. name: xtables-lock
  59. readOnly: false
  60. - mountPath: /lib/modules
  61. name: lib-modules
  62. readOnly: true
  63. volumes:
  64. - name: varlog
  65. hostPath:
  66. path: /var/log
  67. - name: xtables-lock
  68. hostPath:
  69. path: /run/xtables.lock
  70. type: FileOrCreate
  71. - name: lib-modules
  72. hostPath:
  73. path: /lib/modules
  74. serviceAccountName: kube-proxy