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

Make status.addresses JSON values #157

@andrewrynhard

Description

@andrewrynhard

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions