Skip to content

Commit d766b7d

Browse files
committed
Show EgressCIDRs in "oc get hostsubnets"
1 parent 31f6201 commit d766b7d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: pkg/printers/internalversion/printer.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ var (
6363
// IsPersonalSubjectAccessReviewColumns contains known custom role extensions
6464
IsPersonalSubjectAccessReviewColumns = []string{"NAME"}
6565

66-
hostSubnetColumns = []string{"NAME", "HOST", "HOST IP", "SUBNET", "EGRESS IPS"}
66+
hostSubnetColumns = []string{"NAME", "HOST", "HOST IP", "SUBNET", "EGRESS CIDRS", "EGRESS IPS"}
6767
netNamespaceColumns = []string{"NAME", "NETID", "EGRESS IPS"}
6868
clusterNetworkColumns = []string{"NAME", "CLUSTER NETWORKS", "SERVICE NETWORK", "PLUGIN NAME"}
6969
egressNetworkPolicyColumns = []string{"NAME"}
@@ -987,7 +987,7 @@ func printGroupList(list *userapi.GroupList, w io.Writer, opts kprinters.PrintOp
987987

988988
func printHostSubnet(h *networkapi.HostSubnet, w io.Writer, opts kprinters.PrintOptions) error {
989989
name := formatResourceName(opts.Kind, h.Name, opts.WithKind)
990-
_, err := fmt.Fprintf(w, "%s\t%s\t%s\t%s\t[%s]\n", name, h.Host, h.HostIP, h.Subnet, strings.Join(h.EgressIPs, ", "))
990+
_, err := fmt.Fprintf(w, "%s\t%s\t%s\t%s\t[%s]\t[%s]\n", name, h.Host, h.HostIP, h.Subnet, strings.Join(h.EgressCIDRs, ", "), strings.Join(h.EgressIPs, ", "))
991991
return err
992992
}
993993

0 commit comments

Comments
 (0)