Describe the bug
When upgrading to the 4.0.5+ from 4.0.4 longs lines with spaces in the yaml are broken. Looks similiar to #947 but that was fixed in older versions (this wasn't an issue in 3.8.x+).
Files that can reproduce the issue
Example:
kustomization.yaml
test.yaml
apiVersion: controlplane.cluster.x-k8s.io/v1alpha4
kind: KubeadmControlPlane
metadata:
name: ${CLUSTER_NAME}-control-plane
namespace: default
spec:
kubeadmConfigSpec:
postKubeadmCommands:
- sed -i '\#--listen-client-urls#s#$#,https://127.0.0.1:2379#' /etc/kubernetes/manifests/etcd.yaml
- echo "DNSStubListener=no" >> /etc/systemd/resolved.conf
- mv /etc/resolv.conf /etc/resolv.conf.OLD && ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf
- systemctl restart systemd-resolved
Expected output
apiVersion: controlplane.cluster.x-k8s.io/v1alpha4
kind: KubeadmControlPlane
metadata:
name: ${CLUSTER_NAME}-control-plane
namespace: default
spec:
kubeadmConfigSpec:
postKubeadmCommands:
- sed -i '\#--listen-client-urls#s#$#,https://127.0.0.1:2379#' /etc/kubernetes/manifests/etcd.yaml
- echo "DNSStubListener=no" >> /etc/systemd/resolved.conf
- mv /etc/resolv.conf /etc/resolv.conf.OLD && ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf
- systemctl restart systemd-resolved
Actual output
apiVersion: controlplane.cluster.x-k8s.io/v1alpha4
kind: KubeadmControlPlane
metadata:
name: ${CLUSTER_NAME}-control-plane
namespace: default
spec:
kubeadmConfigSpec:
postKubeadmCommands:
- sed -i '\#--listen-client-urls#s#$#,https://127.0.0.1:2379#' /etc/kubernetes/manifests/etcd.yaml
- echo "DNSStubListener=no" >> /etc/systemd/resolved.conf
- mv /etc/resolv.conf /etc/resolv.conf.OLD && ln -s /run/systemd/resolve/resolv.conf
/etc/resolv.conf
- systemctl restart systemd-resolved
Kustomize version
4.0.5+ including 4.1.x
Platform
linux
Additional context
Describe the bug
When upgrading to the 4.0.5+ from 4.0.4 longs lines with spaces in the yaml are broken. Looks similiar to #947 but that was fixed in older versions (this wasn't an issue in 3.8.x+).
Files that can reproduce the issue
Example:
kustomization.yaml
test.yaml
Expected output
Actual output
Kustomize version
4.0.5+ including 4.1.x
Platform
linux
Additional context