-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CABPK - ignition - files defined with base64 encoding are not decoded on the disk #6403
Comments
cc @invidian |
/area bootstrap |
/assign invidian I'll have a look into it today. |
Hmm, as far as I see, neither Flatcar's Ignition or CLC currently support gzip compression, see flatcar/container-linux-config-transpiler#13. Perhaps @jepio or @pothos could confirm. But the config transpiler should support specifying input files in base64 format, though this is currently not supported by our cloud-init to CLC conversion code. I checked the code and I see that ownership handling has also been omitted, we should fix that as well. I see the following tasks then:
I'd appreciate some input on what to work on then. Right now, as a workaround, additional base64 encoded files can be specified using CLC snippet instead: Old: apiVersion: controlplane.cluster.x-k8s.io/v1beta1
kind: KubeadmControlPlane
spec:
kubeadmConfigSpec:
files:
- path: /test-file
permissions: "0600"
encoding: base64
content: dGhpcyBpcyBwbGFpbiB0ZXh0 New: apiVersion: controlplane.cluster.x-k8s.io/v1beta1
kind: KubeadmControlPlane
spec:
kubeadmConfigSpec:
ignition:
containerLinuxConfig:
additionalConfig: |
storage:
files:
- path: /test-file
mode: 0600
contents:
inline: !!binary |
dGhpcyBpcyBwbGFpbiB0ZXh0 |
Base64 is supported by ignition/ct, gzip is explicitly unsupported in older ignition (https://github.com/flatcar-linux/ignition/blob/flatcar-master/internal/resource/url.go#L270-L272) but supported in new ignition (https://github.com/flatcar-linux/ignition/blob/main/internal/resource/url.go#L341-L346). That requires using butane. So base64 could be supported right now with fixes to the code, but I would not do transparent ungzipping. |
If there is no further feedback, I'll create a PR with the fixes as suggested. |
WIP PR with the fixes: #6472 |
/area bootstrap |
What steps did you take and what happened:
When using ignition. If you define a file in
KubeAdmSpec.Files
withencoding: base64
the resulting file on disk is stillbase64
encoded.Example of configuration:
The resulting file on disk has contents:
What did you expect to happen:
Environment:
/etc/os-release
): Flatcar Container Linux by Kinvolk 3033.2.2 (Oklo)/kind bug
The text was updated successfully, but these errors were encountered: