diff --git a/care/care.go b/care/care.go index 28ef2fb..3066e50 100644 --- a/care/care.go +++ b/care/care.go @@ -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 } diff --git a/lvscare.yaml b/lvscare.yaml index e957c00..2628d08 100644 --- a/lvscare.yaml +++ b/lvscare.yaml @@ -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