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

patch-file could be easier to use. #4764

Closed
sbskas opened this issue Jan 7, 2022 · 0 comments · Fixed by #4892
Closed

patch-file could be easier to use. #4764

sbskas opened this issue Jan 7, 2022 · 0 comments · Fixed by #4892

Comments

@sbskas
Copy link
Contributor

sbskas commented Jan 7, 2022

Feature Request

talosctl gen config could accept jsonpatch files as well as strings

Description

Using strings jsonpatch with talosctl is quite complicated inside shell. Each string must be properly quoted.
It would be nice to allow using jsonpatch file as well as strings. one could specify something like the below command to read a patchfile:
talosctl gen config --config-patch @config-file ...
To provide a fully customized machine file, one has to provide an array of jsonpatch which is a very long string.
One nice to have features would also be able to aggregate json patches if one gives the --patch-config several times on the cmdline like:
talosctl gen config --config-patch @machine1 --config-patch @sysctl-patch --config-patch @cluster-cidrs ...

smira pushed a commit to smira/talos that referenced this issue Jan 27, 2022
Include filename content if value begins with @ (see curl for example).

Add multiple config-path option on cmdline to apply them in order.

ex:

```
talosctl-linux-amd64 gen config talos1 https://127.0.0.1:6443 --config-patch-control-plan @cidrs.json --config-patch-worker @sysctls-workders.json --config-path @cluster-name.json
```

Load JSON patch from YAML.

This applies to all commands handling config patches.

Closes: siderolabs#4764

Signed-off-by: Sébastien Bernard <sbernard@nerim.net>
Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants