kubernetes-retired / cluster-api-bootstrap-provider-kubeadm

LEGACY REPO. NEW CODE IS https://github.com/kubernetes-sigs/cluster-api/tree/master/bootstrap/kubeadm
Apache License 2.0
62 stars 67 forks source link

Do not automatically encode additional file content as base64 #202

Closed akutz closed 4 years ago

akutz commented 4 years ago

/kind bug

What steps did you take and what happened: Because the kubeadm bootstrapper is encoding any additional files as base64 (https://github.com/kubernetes-sigs/cluster-api-bootstrap-provider-kubeadm/blob/e3b2bcf70c84fed5ca2e0030e5b96fef6ee6aa83/cloudinit/files.go#L31), the contents of the files are not getting interpolated with the cloud-init instance data, and thus we get files like this:

root@v1a2:~# cat /etc/hostname
{{ ds.meta_data.hostname }}
root@v1a2:~# cat /etc/hosts
::1         ipv6-localhost ipv6-loopback
127.0.0.1   localhost
127.0.0.1   {{ ds.meta_data.hostname }}

Files shouldn’t be automatically encoded to base64 unless requested.

What did you expect to happen: Unless part of the encoding type, a file's contents should not be automatically encoded as base64.

ncdc commented 4 years ago

/assign @chuckha /lifecycle active /milestone v0.1

chuckha commented 4 years ago

Closed by #204