This repository was archived by the owner on Aug 12, 2025. It is now read-only.

Description
I would like to use kubectl get machine X -o jsonpath... to parse out addresses assigned to a node. Unfortunately the values in the status.addresses array are formatted golang data structures. Making these JSON would allow me to parse out whatever I needed from the entries.
status:
addresses:
...
- address: packngo.IPAddressAssignment{IpAddressCommon:packngo.IpAddressCommon{ID:"REDACTED",
Address:"10.100.2.17", Gateway:"10.100.2.16", Network:"10.100.2.16", AddressFamily:4,
Netmask:"255.255.255.254", Public:false, CIDR:31, Created:"2020-07-25T14:54:10Z",
Updated:"", Href:"/ips/REDACTED", Management:true,
Manageable:true, Project:packngo.Href{Href:"/projects/REDACTED"},
Tags:[], CustomData:map[]}, AssignedTo:packngo.Href{Href:"/devices/REDACTED"}}
type: InternalIP