Skip to content

Improve YAML/JSON printers example by stripping managedFields from output #21

@DavidGamba

Description

@DavidGamba

Hi,

Thanks so much for these examples, I was wondering how to print YAML and your repo came up in my searches.

After trying your sample code I noticed that the managed fields where in the output whereas kubectl won't show that.

I found the upstream PR where they disabled it:
https://github.com/kubernetes/kubernetes/pull/96878/files

I put the two things combined in my code and thought I should return the favour and at least mention it:
https://github.com/DavidGamba/dgtools/blob/edd077ad00ff54fe8d6c2f525442981a6ec38617/kdecode/main.go#L108-L126

Regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions