Skip to content

Commit

Permalink
Fix: multi network interface need add a router
Browse files Browse the repository at this point in the history
Close #28
  • Loading branch information
cuisongliu committed Jun 28, 2022
1 parent da7c4cd commit 2a5e59d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
2 changes: 1 addition & 1 deletion care/care.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func (care *LvsCare) SyncRouter() error {

func SetTargetIP() error {
if LVS.TargetIP == nil {
LVS.TargetIP = net.ParseIP(os.Getenv("NODE_IP"))
LVS.TargetIP = net.ParseIP(os.Getenv("LVSCARE_NODE_IP"))
}
return nil
}
16 changes: 1 addition & 15 deletions lvscare.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,31 +25,17 @@ spec:
name: kube-sealyun-lvscare
resources: {}
env:
- name: NODE_IP
- name: LVSCARE_NODE_IP
value: 172.16.81.61
securityContext:
privileged: true
volumeMounts:
- mountPath: /root/.kube/config
name: kubeconfig
readOnly: true
- mountPath: /lib/modules
name: lib-modules
readOnly: true
- mountPath: /usr/bin/lvscare-test
name: lvscare
readOnly: false
hostNetwork: true
volumes:
- hostPath:
path: /etc/kubernetes/kubelet.conf
type: ""
name: kubeconfig
- hostPath:
path: /lib/modules
type: ""
name: lib-modules
- hostPath:
path: /root/lvscare
type: ""
name: lvscare

0 comments on commit 2a5e59d

Please sign in to comment.