Weave-NPC should get hostname from K8s Downward API.
It is necessary in case when kubelet's args includes `--hostname_override=`. Without this change, pods on hostname overriding kubelets will never be local, and all pod's traffic will be blocked.
This commit is contained in:
1 parent
afb0d5bd3d
commit
cb3b858df6
2 files changed
+12
No files matched your search
@@ -92,6 +92,12 @@ spec:
|
|||||||
cpu: 10m
|
cpu: 10m
|
||||||
securityContext:
|
securityContext:
|
||||||
privileged: true
|
privileged: true
|
||||||
|
env:
|
||||||
|
- name: HOSTNAME
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
apiVersion: v1
|
||||||
|
fieldPath: spec.nodeName
|
||||||
restartPolicy: Always
|
restartPolicy: Always
|
||||||
tolerations:
|
tolerations:
|
||||||
- key: node-role.kubernetes.io/master
|
- key: node-role.kubernetes.io/master
|
||||||
|
|||||||
@@ -59,6 +59,12 @@ spec:
|
|||||||
cpu: 10m
|
cpu: 10m
|
||||||
securityContext:
|
securityContext:
|
||||||
privileged: true
|
privileged: true
|
||||||
|
env:
|
||||||
|
- name: HOSTNAME
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
apiVersion: v1
|
||||||
|
fieldPath: spec.nodeName
|
||||||
restartPolicy: Always
|
restartPolicy: Always
|
||||||
volumes:
|
volumes:
|
||||||
- name: weavedb
|
- name: weavedb
|
||||||
|
|||||||
Reference in new issue
Block a user