You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We had some grumbles from developers after the goyaml.v3 upgrade that
this changed the sequence indent used by kustomize, kubectl etc.
There was a whole thread about this when the goyaml.v3 upgrade happened
in kustomize itself: kubernetes-sigs/kustomize#3946
and the result was that kubesigs forked goyaml.
In order to more closely match what the kubernetes tools do, this commit
switches to the forked version, which has a compact option on the
encoder:
https://github.com/kubernetes-sigs/yaml/blob/56d672052dcff7362af5b66f6424976539cddd78/goyaml.v3/patch.go#L25-L28
When I first tried this I also changed the code to guess if compact
was the preferred style from the yaml. However, it turns out that
the yaml formatter misbehaves when told to use "compact" and an indent
other than 2; if set to 3 and compact it produces code like this:
mapping:
- list item
Instead of:
mapping:
- list item
This meant I couldn't get the "guess indentation" code to work, so
I've removed that and its test to avoid raising a fault expectation.
Signed-off-by: Brian Ewins <bewins@nerdwallet.com>
0 commit comments