Repository navigation
Commit 23ffd6d
feat: label-only selector and port-filter default
Tighten the management contract for cozy-proxy:
- The service.kubernetes.io/service-proxy-name=cozy-proxy label is now
the sole selector. Services without the label are no longer managed
even if they carry the networking.cozystack.io/wholeIP annotation —
the annotation alone has no selecting effect.
- Whole-IP passthrough becomes opt-in: wholeIPPassthrough returns true
only for explicit wholeIP="true". Absent or any other value keeps the
service in port-filter mode (consistent with wholeIP="false"), so
declared Service.spec.ports are the only ports forwarded by default.
Drop the now-unused hasWholeIPAnnotation helper. Tests updated to cover
the new isCozyProxyService selector and the new wholeIPPassthrough
default. README rewritten: drop the dual-selector narrative and the
"Which selector should I use?" section, update the ingress-mode table
to mark port-filter as the default, and add wholeIP="true" to the
Usage example so the bogus port-65535 demonstration of whole-IP
behaviour keeps working.
BREAKING CHANGE: Services that previously relied on the wholeIP
annotation alone for selection must add the
service.kubernetes.io/service-proxy-name: cozy-proxy label. Services
that previously relied on the absent-annotation passthrough default
must add networking.cozystack.io/wholeIP: "true" to keep that
behaviour.
Co-Authored-By: Claude <[email protected]>
Signed-off-by: Andrei Kvapil <[email protected]>1 parent 1b459f6 commit 23ffd6d
3 files changed
Lines changed: 41 additions & 57 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
| 24 | + | |
28 | 25 | | |
29 | 26 | | |
30 | 27 | | |
31 | 28 | | |
32 | 29 | | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
| 30 | + | |
39 | 31 | | |
40 | 32 | | |
41 | 33 | | |
42 | | - | |
| 34 | + | |
43 | 35 | | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
49 | 41 | | |
50 | | - | |
| 42 | + | |
51 | 43 | | |
52 | 44 | | |
53 | 45 | | |
| |||
88 | 80 | | |
89 | 81 | | |
90 | 82 | | |
91 | | - | |
| 83 | + | |
92 | 84 | | |
93 | 85 | | |
94 | 86 | | |
| |||
97 | 89 | | |
98 | 90 | | |
99 | 91 | | |
| 92 | + | |
| 93 | + | |
100 | 94 | | |
101 | 95 | | |
102 | 96 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
475 | 475 | | |
476 | 476 | | |
477 | 477 | | |
478 | | - | |
479 | | - | |
480 | | - | |
481 | | - | |
482 | | - | |
483 | | - | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
484 | 483 | | |
485 | 484 | | |
486 | 485 | | |
487 | 486 | | |
488 | | - | |
489 | | - | |
490 | | - | |
491 | | - | |
492 | | - | |
493 | | - | |
494 | | - | |
495 | | - | |
496 | | - | |
497 | | - | |
498 | | - | |
499 | | - | |
500 | | - | |
501 | | - | |
502 | | - | |
| 487 | + | |
503 | 488 | | |
504 | 489 | | |
505 | 490 | | |
506 | | - | |
507 | | - | |
508 | | - | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
509 | 494 | | |
510 | 495 | | |
511 | | - | |
| 496 | + | |
512 | 497 | | |
513 | | - | |
| 498 | + | |
514 | 499 | | |
515 | 500 | | |
516 | 501 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
15 | 19 | | |
16 | 20 | | |
17 | 21 | | |
18 | 22 | | |
19 | 23 | | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
25 | 29 | | |
26 | 30 | | |
27 | 31 | | |
28 | | - | |
29 | | - | |
| 32 | + | |
| 33 | + | |
30 | 34 | | |
31 | 35 | | |
32 | 36 | | |
| |||
38 | 42 | | |
39 | 43 | | |
40 | 44 | | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
45 | 50 | | |
46 | 51 | | |
47 | 52 | | |
| |||
0 commit comments