diff --git a/cmd/pods.go b/cmd/pods.go index 662270d..1c4b60c 100644 --- a/cmd/pods.go +++ b/cmd/pods.go @@ -73,10 +73,13 @@ where the pods are scheduled.`, if string(node) != "" { - kv := strings.Split(string(node), " ") + kv := strings.Fields(string(node)) k, v := kv[0], kv[1] + // Print k,v for debug + //fmt.Println(k, v) + nodeinfo[k] = v nodeazs[v] = struct{}{} @@ -127,7 +130,7 @@ func buildPods(nodeinfo map[string]string, nodeazs map[string]struct{}, k8sNames podMap[p.name] = p // Print pod info for debug - //fmt.Printf("Pod: %s\n", podMap[p.name]) + fmt.Printf("Pod: %s\n", podMap[p.name]) } } diff --git a/main.go b/main.go index 17ad30e..0bfb739 100644 --- a/main.go +++ b/main.go @@ -19,7 +19,7 @@ import "github.com/phenixblue/kubectl-azs/cmd" var ( // VERSION defines the version of the utility. - VERSION = "v0.0.3" + VERSION = "v0.0.4" ) func main() {