mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-14 21:53:52 +00:00
Merge pull request #46259 from Q-Lee/kube-proxy
Automatic merge from submit-queue (batch tested with PRs 46734, 46810, 46759, 46259, 46771) Add iptables lock-file mount to kube-proxy manifest **What this PR does / why we need it**: kube-proxy is broken in make bazel-release. The new iptables binary uses a lockfile in "/run", but the directory doesn't exist. This causes iptables-restore to fail. We need to share the same lock-file amongst all containers, so mount the host /run dir. This is similar to #46132 but expediency matters, since builds are broken. **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #46103 **Special notes for your reviewer**: **Release note**: ```release-note ```
This commit is contained in:
@@ -54,6 +54,16 @@ metadata:
|
|||||||
component: kube-proxy
|
component: kube-proxy
|
||||||
spec:
|
spec:
|
||||||
hostNetwork: true
|
hostNetwork: true
|
||||||
|
initContainers:
|
||||||
|
- name: touch-lock
|
||||||
|
image: busybox
|
||||||
|
command: ['/bin/touch', '/run/xtables.lock']
|
||||||
|
securityContext:
|
||||||
|
privileged: true
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /run
|
||||||
|
name: run
|
||||||
|
readOnly: false
|
||||||
containers:
|
containers:
|
||||||
- name: kube-proxy
|
- name: kube-proxy
|
||||||
image: {{pillar['kube_docker_registry']}}/kube-proxy:{{pillar['kube-proxy_docker_tag']}}
|
image: {{pillar['kube_docker_registry']}}/kube-proxy:{{pillar['kube-proxy_docker_tag']}}
|
||||||
@@ -80,6 +90,9 @@ spec:
|
|||||||
- mountPath: /var/lib/kube-proxy/kubeconfig
|
- mountPath: /var/lib/kube-proxy/kubeconfig
|
||||||
name: kubeconfig
|
name: kubeconfig
|
||||||
readOnly: false
|
readOnly: false
|
||||||
|
- mountPath: /run/xtables.lock
|
||||||
|
name: iptableslock
|
||||||
|
readOnly: false
|
||||||
volumes:
|
volumes:
|
||||||
- hostPath:
|
- hostPath:
|
||||||
path: /usr/share/ca-certificates
|
path: /usr/share/ca-certificates
|
||||||
@@ -93,3 +106,9 @@ spec:
|
|||||||
- hostPath:
|
- hostPath:
|
||||||
path: /var/log
|
path: /var/log
|
||||||
name: varlog
|
name: varlog
|
||||||
|
- hostPath:
|
||||||
|
path: /run
|
||||||
|
name: run
|
||||||
|
- hostPath:
|
||||||
|
path: /run/xtables.lock
|
||||||
|
name: iptableslock
|
||||||
|
Reference in New Issue
Block a user