Skip to content

feat: print IPAM resources as tables that say what they hold - #126

Merged
scotwells merged 1 commit into
mainfrom
feat/server-side-table-columns
Sep 23, 2026
Merged

scotwells merged 1 commit into
mainfrom
feat/server-side-table-columns

Conversation

@scotwells

Copy link
Copy Markdown
Contributor

Problem

datumctl get ippools prints a column of generated names beside a column of RFC3339 timestamps, and nothing else:

NAME                                                              CREATED AT
datum-subnet-ipv6-datum-cloud-us-central-1-global-mesh-282a69ab   2026-09-22T20:25:15Z

Every kind used rest.NewDefaultTableConvertor, whose output is hardcoded to the name and the creation timestamp. You cannot tell what range a pool holds, which family it is, or how full it is without a second command per row.

Change

Each kind defines its own columns, mirroring what the milo-ipam plugin already prints for the same resources so the two surfaces agree. Age uses the elapsed-time form every other Kubernetes resource uses; the absolute time is still in -o yaml.

NAME                                                              CIDR                  FAMILY   CLASSES             UTILIZATION   AGE
datum-vpc-ipv6-root                                               2001:db8::/32         IPv6     datum-vpc-ipv6      <0.1%         4d
datum-subnet-ipv6-datum-cloud-us-central-1-global-mesh-282a69ab   2001:db8:a08:1::/64   IPv6     <none>              100.0%        4h20m

Fields that answer a follow-up rather than identify the object — parent, provisioning class, scope, phase — are marked wide, so they appear under -o wide and not before. Utilization distinguishes 0% from <0.1%: a /64 handed out of a /32 rounds to zero but the pool is not untouched.

This fixes every client at once — kubectl, datumctl, the portal — because they all ask the server for the table.

Left out

No API types change, so no regeneration. Worth noting this was invisible until v0.4.1: while every provisioned pool read 0001-01-01T00:00:00Z, the column was uniformly useless and the missing ones did not stand out.

Every kind used rest.NewDefaultTableConvertor, whose only columns are the name
and an RFC3339 creation timestamp. Pool names are long and generated, so
`kubectl get ippools` printed a column of digests beside a column of
timestamps and nothing that said what any of them held.

Each kind now defines its own columns, mirroring what the milo-ipam plugin
already prints so the two surfaces agree, with age rendered the way every
other Kubernetes resource renders it. Fields that answer a follow-up question
rather than identify the object are marked wide.
@scotwells
scotwells marked this pull request as ready for review September 23, 2026 00:55
@scotwells
scotwells merged commit 213c823 into main Sep 23, 2026
11 checks passed
@scotwells
scotwells deleted the feat/server-side-table-columns branch September 23, 2026 01:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants