Commit 1f989df
committed
fix: read multi-doc machine config with newer talosctl
This affects reading multi-doc machine config via `talosctl` from Talos
machines v1.11 and below by `talosctl` of v1.12 and up.
The problem is that before v1.12 Talos returned machine config as
embedded document instead of the spec if the resource, which was not
valid YAML. It worked via hacks we used in our fork of yaml library.
Talos v1.12+ cleans that up by marshaling the config as a string, and
drops the forked library. The problem is that we can't still pass
multi-doc YAML via this path, so we have to resort to going into COSI
internals to retrieve the actual value as written by Talos API.
Note: there is no problem for Omni, as it goes via protobuf path which
hasn't been affected.
Fixes #12787
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
(cherry picked from commit f118ee4)1 parent 40ba6e3 commit 1f989df
2 files changed
+30
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
83 | 98 | | |
84 | 99 | | |
85 | 100 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
41 | 56 | | |
42 | 57 | | |
43 | 58 | | |
| |||
0 commit comments