Skip to content

Commit cd93d29

Browse files
committed
Add HostSubnet.EgressCIDRs support to "oc get" and "oc describe"
1 parent 31f6201 commit cd93d29

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

pkg/oc/lib/describe/describer.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1752,6 +1752,7 @@ func (d *HostSubnetDescriber) Describe(namespace, name string, settings kprinter
17521752
formatString(out, "Node", hs.Host)
17531753
formatString(out, "Node IP", hs.HostIP)
17541754
formatString(out, "Pod Subnet", hs.Subnet)
1755+
formatString(out, "Egress CIDRs", strings.Join(hs.EgressCIDRs, ", "))
17551756
formatString(out, "Egress IPs", strings.Join(hs.EgressIPs, ", "))
17561757
return nil
17571758
})

pkg/printers/internalversion/printer.go

Lines changed: 2 additions & 2 deletions
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)