vmware-archive / kubecfg

A tool for managing complex enterprise Kubernetes environments as code.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unstable key order within maps

mkmik opened this issue · comments

Some maps that contain alphanumerical sequences exhibit an unstable sort order:

{
    apiVersion: 'v1',
    kind: 'ConfigMap',
    metadata: {
      name: 'foo',
    },

    data: {
      '11': '',
      '1z': '',
      '2z': '',
    },
}

It's a well known bug in the gopkg.in/yaml.v2 library that has been fixed in v3 but not backported.

A pending backport PR is in go-yaml/yaml#736

This issue is distinct from the "top level object" sort order in kubecfg show, such as #123