This repository was archived by the owner on Apr 17, 2025. It is now read-only.
Commit b04dd8e
committed
adding new --exclude-resources-with-label manager CLI argument
Changed default exclusion by label mechanism to use this CLI argument instead of a hardcoded list of labels. Moved the default Rancher label exclusion to be a default CLI argument on the manager. Fixed a bug that caused excluded resources to be propagated with the propagate.hnc.x-k8s.io/all annotation.
Tested: made sure the current test for default exclusion fails after my
CLI argument change, changed the test to reflect the changes, test now passes as
expected. Wrote a test that verifies the propagate.hnc.x-k8s.io/all annotation bug
doesn't occur, which failed before the bugfix. Executed e2e tests and they pass.
Manually tested the manager by adding the new CLI argument and with that a labeled
resource was skipped, then removed the argument and it has propagated. Did the same
with two different annotations specified together as two CLI arguments, and resources that
had any of those labels were skipped as expected. Manually tried to cause an
excluded resource to propagate by adding the propagate.hnc.x-k8s.io/all
annotation, and it didn't propagate.1 parent 0fc9d45 commit b04dd8e
File tree
7 files changed
+74
-18
lines changed- cmd/manager
- config/manager
- docs/user-guide
- internal
- config
- objects
- selectors
7 files changed
+74
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
72 | 73 | | |
73 | 74 | | |
74 | 75 | | |
| 76 | + | |
75 | 77 | | |
76 | 78 | | |
77 | 79 | | |
| |||
156 | 158 | | |
157 | 159 | | |
158 | 160 | | |
| 161 | + | |
159 | 162 | | |
160 | 163 | | |
161 | 164 | | |
162 | 165 | | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
163 | 186 | | |
164 | 187 | | |
165 | 188 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
52 | 55 | | |
53 | 56 | | |
54 | 57 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
445 | 445 | | |
446 | 446 | | |
447 | 447 | | |
448 | | - | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
449 | 452 | | |
450 | 453 | | |
451 | 454 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
972 | 972 | | |
973 | 973 | | |
974 | 974 | | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
446 | 446 | | |
447 | 447 | | |
448 | 448 | | |
449 | | - | |
| 449 | + | |
450 | 450 | | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
451 | 454 | | |
| 455 | + | |
452 | 456 | | |
453 | 457 | | |
454 | 458 | | |
455 | 459 | | |
456 | 460 | | |
457 | 461 | | |
| 462 | + | |
458 | 463 | | |
459 | 464 | | |
460 | 465 | | |
| |||
467 | 472 | | |
468 | 473 | | |
469 | 474 | | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
470 | 487 | | |
471 | 488 | | |
472 | 489 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
46 | | - | |
47 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
48 | 51 | | |
49 | 52 | | |
50 | 53 | | |
| |||
197 | 200 | | |
198 | 201 | | |
199 | 202 | | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | 203 | | |
214 | 204 | | |
215 | 205 | | |
| |||
246 | 236 | | |
247 | 237 | | |
248 | 238 | | |
249 | | - | |
| 239 | + | |
250 | 240 | | |
251 | 241 | | |
252 | 242 | | |
| |||
0 commit comments