Skip to content

Commit 5dfee72

Browse files
oc get clusternetworks correctly prints the clusternetwork cidrs
1 parent 44aa467 commit 5dfee72

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pkg/cmd/cli/describe/printer.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -996,8 +996,12 @@ func printNetNamespaceList(list *sdnapi.NetNamespaceList, w io.Writer, opts kpri
996996
}
997997

998998
func printClusterNetwork(n *sdnapi.ClusterNetwork, w io.Writer, opts kprinters.PrintOptions) error {
999+
var cidrList []string
1000+
for _, cidr := range n.ClusterDef {
1001+
cidrList = append(cidrList, cidr.ClusterNetworkCIDR)
1002+
}
9991003
name := formatResourceName(opts.Kind, n.Name, opts.WithKind)
1000-
_, err := fmt.Fprintf(w, "%s\t%s\t%d\t%s\t%s\n", name, n.Network, n.HostSubnetLength, n.ServiceNetwork, n.PluginName)
1004+
_, err := fmt.Fprintf(w, "%s\t%s\t%d\t%s\t%s\n", name, strings.Join(cidrList, ","), n.HostSubnetLength, n.ServiceNetwork, n.PluginName)
10011005
return err
10021006
}
10031007

0 commit comments

Comments
 (0)