fix: delete ip addr bind for kube_vip (#2598)

Signed-off-by: joyceliu <joyceliu@yunify.com>
This commit is contained in:
liujian 2025-05-28 18:12:14 +08:00 committed by GitHub
parent 38b8d04617
commit cec2e1a200
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -36,4 +36,4 @@
when: eq .kubernetes.control_plane_endpoint.type "kube_vip"
command: |
ip neigh show | grep {{ .kubernetes.control_plane_endpoint.kube_vip.address }} | awk '{print $1 " dev " $3}' | xargs -r -L1 ip neigh delete
ip -o addr show | grep {{ .kubernetes.control_plane_endpoint.kube_vip.address }} | awk '{system("ip addr del "$4" dev "$2)}'

View File

@ -36,4 +36,4 @@
when: eq .kubernetes.control_plane_endpoint.type "kube_vip"
command: |
ip neigh show | grep {{ .kubernetes.control_plane_endpoint.kube_vip.address }} | awk '{print $1 " dev " $3}' | xargs -r -L1 ip neigh delete
ip -o addr show | grep {{ .kubernetes.control_plane_endpoint.kube_vip.address }} | awk '{system("ip addr del "$4" dev "$2)}'