Some checks failed
default / default (push) Has been cancelled
default / e2e-backups (push) Has been cancelled
default / e2e-forced-removal (push) Has been cancelled
default / e2e-omni-upgrade (push) Has been cancelled
default / e2e-scaling (push) Has been cancelled
default / e2e-short (push) Has been cancelled
default / e2e-short-secureboot (push) Has been cancelled
default / e2e-templates (push) Has been cancelled
default / e2e-upgrades (push) Has been cancelled
default / e2e-workload-proxy (push) Has been cancelled
- Bump some deps, namely cosi-runtime and Talos machinery. - Update `auditState` to implement the new methods in COSI's `state.State`. - Bump default Talos and Kubernetes versions to their latest. - Rekres, which brings Go 1.24.5. Also update it in go.mod files. - Fix linter errors coming from new linters. Signed-off-by: Utku Ozdemir <utku.ozdemir@siderolabs.com> |
||
---|---|---|
.. | ||
data | ||
.gitignore | ||
.golangci.yml | ||
.kresignore | ||
go.mod | ||
go.sum | ||
main.go | ||
README.md |
zstd-dict
zstd-dict is a tool for generating a zstd dictionary used to compress resources containing partial or full Talos machine configurations, such as ClusterMachineConfig
and ConfigPatch
.
The dictionary is generated using a training set consisting of:
- Randomly generated Talos machine configuration YAMLs
- ArgoCD application manifests generated via the
helm template
command
Kubernetes manifests are included because they are commonly used in the inlineManifests
section of Talos machine configurations.
This tool updates the client/pkg/compression/data/config.zdict
dictionary file under the Omni project root. It also writes the input files used for training into the inputs/
directory.
The inputs/
directory can then be used as input to generate a dictionary using the zstd
command-line tool.
To generate a dictionary via command line:
- Install
zstd
- In the directory of this tool, run the following command:
export DICT_ID=1
zstd --train -r inputs -o ../../client/pkg/compression/data/config.$DICT_ID.zdict --dictID $DICT_ID --maxdict=64KB
Note: The dictionary trained via command line might produce different, potentially better results than the one generated by this tool. Compare the results of both dictionaries before deciding which one to use.
Note: When updating the dictionary, follow these steps to maintain backward compatibility:
- Increment the dictionary ID in this tool.
- Update the shell command above with the new dictionary ID.
- In the
client/pkg/compression/data/
package, add the new dictionary file without removing the old ones. - Update the code in the compression package to handle multiple dictionary versions, ensuring that the decoder can still access and use the old dictionaries when needed.
These steps are crucial to maintain compatibility with data compressed using previous dictionary versions.