v3.8.0 has no new features, and no change in the API relative to v3.7.0, but the output will change.
The output may order fields within objects differently, and generally do a better job dropping empty fields. This should have no impact on cluster behavior, and no impact on object-to-object comparisons, but it may cause (text-based) YAML comparison tests to fail (in tests maintained outside the kustomize repository).
In v3.8.0, the transformations still (technically) depend on apimachinery, but by default won't use apimachinery code paths - they'll use kyaml instead. That's what changes the output.
If v3.8.0 causes problems for you, switch back to v3.7.0 for now, but please examine your tests, adjusting them to the new behavior, and file issues for anything that looks not just different, but incorrect.
This will help improve kyaml. kyaml, not apimachinery, is the backing library for k8s yaml manipulation going forward. This work is required to close #2506 (breaking dependence on apimachinery), which in turn blocks #1500.
There's no global flag to switch back to the old behavior. A global flag could have been introduced, but it would have been impractical. If the flag's default had been to use the old apimachinery code, nobody would have tried the new flag, thus nobody would have tried the new kyaml code. And switching flags in CD scripts is as annoying or more annoying than simply switching back to the 3.7.0 binary.
For those interested, a transformer in the 3.8.0 framework can use the old apimachinery code by using an explicit config containing the line
YAMLSupport = false
This option will, however, go away in the next release.
Post v3.8.0, all apimachery dependence will be removed. This will greatly simplify the code base and allow a new version of kustomize to be reintroduced to kubectl.
Changelog
5a02286 Switch kustomize to api/v0.5.0