vmware-archive/kubecfg

Unstable key order within maps

mkmik opened this issue · 0 comments

mkmik commented

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