Commit ebcf504
committed
fix: trigger CRI config merge on correct resource update
When registry CRI config gets updated, contents of the file are written
to the `EtcFileSpec` resource, which gets rendered to disk and resource
`EtcFileStatus` is updated when the config is ready.
CRI config parts are merged from contents of `*.part` files which come
from system extensions and dynamic registry config which is written via
`EtcFileSpec` resource. As the controller was incorrectly triggered on
`EtcFileSpec` resource while reading files from disk, it might have read
stale contents of CRI config part (which hasn't been fully rendered to
disk), it might miss the latest content of the CRI config.
With the fix, controller is triggered on `EtcFileStatus` update, so when
the file is rendered to disk.
The symptom of the bug is the empty CRI registry config like:
```shell
talosctl read /etc/cri/conf.d/cri.toml
## /etc/cri/conf.d/00-base.part
version = 2
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc]
runtime_type = "io.containerd.runc.v2"
discard_unpacked_layers = true
## /etc/cri/conf.d/01-registries.part
```
Notice that the `01-registries.part` is empty.
Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
(cherry picked from commit 7568d51)1 parent 84c1001 commit ebcf504
File tree
1 file changed
+1
-1
lines changed- internal/app/machined/pkg/controllers/files
1 file changed
+1
-1
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
0 commit comments