Merge branch '2.4'
This commit is contained in:
commit
231d0c633e
2 files changed
+16
-2
No files matched your search
@@ -25,7 +25,7 @@ type nodeInfo struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// return the IP addresses of all nodes in the cluster
|
// return the IP addresses of all nodes in the cluster
|
||||||
func getKubePeers(c *kubernetes.Clientset) ([]nodeInfo, error) {
|
func getKubePeers(c *kubernetes.Clientset, includeWithNoIPAddr bool) ([]nodeInfo, error) {
|
||||||
nodeList, err := c.CoreV1().Nodes().List(api.ListOptions{})
|
nodeList, err := c.CoreV1().Nodes().List(api.ListOptions{})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@@ -51,6 +51,8 @@ func getKubePeers(c *kubernetes.Clientset) ([]nodeInfo, error) {
|
|||||||
addresses = append(addresses, nodeInfo{name: peer.Name, addr: internalIP})
|
addresses = append(addresses, nodeInfo{name: peer.Name, addr: internalIP})
|
||||||
} else if externalIP != "" {
|
} else if externalIP != "" {
|
||||||
addresses = append(addresses, nodeInfo{name: peer.Name, addr: externalIP})
|
addresses = append(addresses, nodeInfo{name: peer.Name, addr: externalIP})
|
||||||
|
} else if includeWithNoIPAddr {
|
||||||
|
addresses = append(addresses, nodeInfo{name: peer.Name, addr: ""})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return addresses, nil
|
return addresses, nil
|
||||||
@@ -225,7 +227,7 @@ func main() {
|
|||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
peers, err := getKubePeers(c)
|
peers, err := getKubePeers(c, justReclaim)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
common.Log.Fatalf("[kube-peers] Could not get peers: %v", err)
|
common.Log.Fatalf("[kube-peers] Could not get peers: %v", err)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -208,6 +208,18 @@ $ kubectl logs -n kube-system weave-net-1jkl6 weave
|
|||||||
For easier viewing, pipe the output into a file , especially if
|
For easier viewing, pipe the output into a file , especially if
|
||||||
it is long.
|
it is long.
|
||||||
|
|
||||||
|
By default log level of `weave` container is set to `info` level. If you wish to see more detailed logs you can set the desired log level for the `-log-level` flag through the `EXTRA_ARGS` environment variable for the `weave` container in the weave-net daemon set. Add environment variable as below.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
containers:
|
||||||
|
- command:
|
||||||
|
- /home/weave/launch.sh
|
||||||
|
name: weave
|
||||||
|
env:
|
||||||
|
- name: EXTRA_ARGS
|
||||||
|
value: --log-level=debug
|
||||||
|
```
|
||||||
|
|
||||||
Many Kubernetes network issues occur at a higher level than Weave Net.
|
Many Kubernetes network issues occur at a higher level than Weave Net.
|
||||||
The [Kubernetes Service Debugging Guide]
|
The [Kubernetes Service Debugging Guide]
|
||||||
(https://kubernetes.io/docs/tasks/debug-application-cluster/debug-service/)
|
(https://kubernetes.io/docs/tasks/debug-application-cluster/debug-service/)
|
||||||
|
|||||||
Reference in new issue
Block a user