-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Labels
kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.triage/acceptedIndicates an issue or PR is ready to be actively worked on.Indicates an issue or PR is ready to be actively worked on.
Description
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
resources:
- test.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
myhau, queil, jwnmulder and cprivitere
Metadata
Metadata
Assignees
Labels
kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.triage/acceptedIndicates an issue or PR is ready to be actively worked on.Indicates an issue or PR is ready to be actively worked on.