Commit 260f3d6
committed
pkg/kube: extract
Extract the simple syncing logic from `lifecycle.ResourceClient` into a
generic and dedicated `kube.Syncer` struct.
Future work (Console CR) will utilize this new struct to implement the bulk of
its logic.
Additionally fix a subtle bug in the existing sync algorithm. As
`client.InNamespace` was never provided to the `ResourceClient`'s `List` calls,
it would default to `"default"`. As the tests used the default namespace, this
issue wasn't visible. The primary trouble is that `Sync` would not correct
delete resources due to `List` not returning them. It's likely NodePools were
affected in some way but how is unclear.Syncer from lifecycle client1 parent 291d06e commit 260f3d6
File tree
14 files changed
+716
-339
lines changed- harpoon
- operator/internal/lifecycle
- pkg
- kube
14 files changed
+716
-339
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| 96 | + | |
96 | 97 | | |
97 | 98 | | |
98 | 99 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
| |||
575 | 577 | | |
576 | 578 | | |
577 | 579 | | |
| 580 | + | |
| 581 | + | |
578 | 582 | | |
579 | 583 | | |
580 | 584 | | |
| |||
0 commit comments