Skip to content
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

Payload encoding detection #1933

Open
guilhem opened this issue Sep 6, 2024 · 0 comments
Open

Payload encoding detection #1933

guilhem opened this issue Sep 6, 2024 · 0 comments

Comments

@guilhem
Copy link

guilhem commented Sep 6, 2024

Feature Request

Environment

I'm using flatcar on Akamai Linode

Desired Feature

Payload is limited in size.
Currently, we are uploading ignition.json with a base64 encoding.
But it can be oversize the limit, so we are/want to use a gzip content.

I see VMware have already this:

func decodeConfig(config config) ([]byte, error) {
switch config.encoding {
case "":
return []byte(config.data), nil
case "b64", "base64":
return decodeBase64Data(config.data)
case "gz", "gzip":
return decodeGzipData(config.data)
case "gz+base64", "gzip+base64", "gz+b64", "gzip+b64":
gz, err := decodeBase64Data(config.data)
if err != nil {
return nil, err
}
return decodeGzipData(string(gz))
}
return nil, fmt.Errorf("unsupported encoding %q", config.encoding)
}

And other ticket are for specific providers #1096

Can we add a generic way to detect payload (b64 / gzip+b64 / zstd+b64...)

Other Information

@guilhem guilhem changed the title payload encoding detextion Payload encoding detection Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant