Commit dc73f48
fix: prevent GatewayNamespace mode from hijacking pre-existing ServiceAccounts and ConfigMaps (#9215)
* check ownership before apply
Signed-off-by: hai.yue <20416005+yuehaii@users.noreply.github.com>
* both the generic managed-by label and the owning-gateway identity labels must match
Signed-off-by: hai.yue <20416005+yuehaii@users.noreply.github.com>
* if supplies a custom SA name via EnvoyServiceAccount.Name, the SA is pre-existing and user-managed. we must not block the apply or add an ownerReference to it.
Signed-off-by: hai.yue <20416005+yuehaii@users.noreply.github.com>
* add test cases
Signed-off-by: hai.yue <20416005+yuehaii@users.noreply.github.com>
* add e2e test case and release note.
Signed-off-by: hai.yue <20416005+yuehaii@users.noreply.github.com>
* fix lint format warning
Signed-off-by: hai.yue <20416005+yuehaii@users.noreply.github.com>
* use an uncached/APIReader-style live read for this conflict check before applying
Signed-off-by: hai.yue <20416005+yuehaii@users.noreply.github.com>
* add same fix and test cases for Deployment, DaemonSet, optional PDB, optional HPA, and Service
Signed-off-by: hai.yue <20416005+yuehaii@users.noreply.github.com>
* add missing release note
Signed-off-by: hai.yue <20416005+yuehaii@users.noreply.github.com>
* sync the release notes with main
Signed-off-by: hai.yue <20416005+yuehaii@users.noreply.github.com>
* restore previous added content in current release
Signed-off-by: hai.yue <20416005+yuehaii@users.noreply.github.com>
* rename the release file name to lower cases
Signed-off-by: hai.yue <20416005+yuehaii@users.noreply.github.com>
* solve the issues detected by codex
Signed-off-by: hai.yue <20416005+yuehaii@users.noreply.github.com>
* adjust the test cases and remove the gate. fix lint format warning.
Signed-off-by: hai.yue <20416005+yuehaii@users.noreply.github.com>
* replace with GatewayNamespaceMode gate
Signed-off-by: hai.yue <20416005+yuehaii@users.noreply.github.com>
* fix previous dirty context caused HTTPRouteMixedBackends test case breaking
Signed-off-by: hai.yue <20416005+yuehaii@users.noreply.github.com>
* Revert "use an uncached/APIReader-style live read for this conflict check before applying"
This reverts commit 999a349.
Signed-off-by: hai.yue <20416005+yuehaii@users.noreply.github.com>
* review and adjust code suggested by copilot and codex.
Signed-off-by: hai.yue <20416005+yuehaii@users.noreply.github.com>
* refactor code to make it more readable.
Signed-off-by: hai.yue <20416005+yuehaii@users.noreply.github.com>
* refactor code to be more readable.
Signed-off-by: hai.yue <20416005+yuehaii@users.noreply.github.com>
---------
Signed-off-by: hai.yue <20416005+yuehaii@users.noreply.github.com>
Signed-off-by: Hai <20416005+yuehaii@users.noreply.github.com>
Co-authored-by: zirain <zirain2009@gmail.com>1 parent 29cb580 commit dc73f48
5 files changed
Lines changed: 569 additions & 9 deletions
File tree
- internal/infrastructure/kubernetes
- release-notes/current/bug_fixes
- test/e2e
- testdata
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
28 | 38 | | |
29 | 39 | | |
30 | 40 | | |
| |||
66 | 76 | | |
67 | 77 | | |
68 | 78 | | |
69 | | - | |
| 79 | + | |
70 | 80 | | |
71 | 81 | | |
72 | 82 | | |
| |||
105 | 115 | | |
106 | 116 | | |
107 | 117 | | |
108 | | - | |
| 118 | + | |
109 | 119 | | |
110 | 120 | | |
111 | 121 | | |
| |||
158 | 168 | | |
159 | 169 | | |
160 | 170 | | |
161 | | - | |
| 171 | + | |
162 | 172 | | |
163 | 173 | | |
164 | 174 | | |
| |||
192 | 202 | | |
193 | 203 | | |
194 | 204 | | |
195 | | - | |
| 205 | + | |
196 | 206 | | |
197 | 207 | | |
198 | 208 | | |
| |||
245 | 255 | | |
246 | 256 | | |
247 | 257 | | |
248 | | - | |
| 258 | + | |
249 | 259 | | |
250 | 260 | | |
251 | 261 | | |
| |||
278 | 288 | | |
279 | 289 | | |
280 | 290 | | |
281 | | - | |
| 291 | + | |
282 | 292 | | |
283 | 293 | | |
284 | 294 | | |
| |||
324 | 334 | | |
325 | 335 | | |
326 | 336 | | |
327 | | - | |
| 337 | + | |
328 | 338 | | |
329 | 339 | | |
330 | 340 | | |
| |||
373 | 383 | | |
374 | 384 | | |
375 | 385 | | |
376 | | - | |
| 386 | + | |
377 | 387 | | |
378 | 388 | | |
379 | 389 | | |
| |||
414 | 424 | | |
415 | 425 | | |
416 | 426 | | |
417 | | - | |
| 427 | + | |
418 | 428 | | |
419 | 429 | | |
420 | 430 | | |
| |||
721 | 731 | | |
722 | 732 | | |
723 | 733 | | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
0 commit comments