Skip to content

Payload encoding detection #1933

Open
Open
@guilhem

Description

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions