Skip to content

Commit 2a5e59d

Browse files
committed
Fix: multi network interface need add a router
Close #28
1 parent da7c4cd commit 2a5e59d

File tree

2 files changed

+2
-16
lines changed

2 files changed

+2
-16
lines changed

care/care.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ func (care *LvsCare) SyncRouter() error {
7272

7373
func SetTargetIP() error {
7474
if LVS.TargetIP == nil {
75-
LVS.TargetIP = net.ParseIP(os.Getenv("NODE_IP"))
75+
LVS.TargetIP = net.ParseIP(os.Getenv("LVSCARE_NODE_IP"))
7676
}
7777
return nil
7878
}

lvscare.yaml

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,31 +25,17 @@ spec:
2525
name: kube-sealyun-lvscare
2626
resources: {}
2727
env:
28-
- name: NODE_IP
28+
- name: LVSCARE_NODE_IP
2929
value: 172.16.81.61
3030
securityContext:
3131
privileged: true
3232
volumeMounts:
33-
- mountPath: /root/.kube/config
34-
name: kubeconfig
35-
readOnly: true
3633
- mountPath: /lib/modules
3734
name: lib-modules
3835
readOnly: true
39-
- mountPath: /usr/bin/lvscare-test
40-
name: lvscare
41-
readOnly: false
4236
hostNetwork: true
4337
volumes:
44-
- hostPath:
45-
path: /etc/kubernetes/kubelet.conf
46-
type: ""
47-
name: kubeconfig
4838
- hostPath:
4939
path: /lib/modules
5040
type: ""
5141
name: lib-modules
52-
- hostPath:
53-
path: /root/lvscare
54-
type: ""
55-
name: lvscare

0 commit comments

Comments
 (0)