Skip to content

Commit

Permalink
Merge pull request #5 from phenixblue/fix-pod-az
Browse files Browse the repository at this point in the history
Fix "pod" Command Listing
  • Loading branch information
phenixblue authored Mar 24, 2019
2 parents a79a051 + 9e55e39 commit 817ec0e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions cmd/pods.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{}{}

Expand Down Expand Up @@ -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])
}

}
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 817ec0e

Please sign in to comment.