Commit f146806
committed
Add DirectSourceFetch feature gate to bypass cache for source objects
This feature gate enables fetching source objects (GitRepository,
OCIRepository, Bucket) directly from the API server using APIReader,
bypassing the controller's cache. This can be useful when immediate
consistency is required for source object reads.
When enabled via --feature-gates=DirectSourceFetch=true:
- Source objects are fetched using r.APIReader instead of r.Client
- A log message is emitted at startup indicating the feature is active
Changes:
- Add DirectSourceFetch field to KustomizationReconciler struct
- Update getSource() to use APIReader when feature is enabled
- Register feature gate with default value false (opt-in)
- Add unit tests for GitRepository, OCIRepository, and Bucket sources
- Update pkg/runtime dependency to v0.100.1
- Downgrade pkg/ssa to v0.67.1
Signed-off-by: Dipti Pai <diptipai89@outlook.com>1 parent d527a7b commit f146806
6 files changed
Lines changed: 359 additions & 35 deletions
File tree
- internal
- controller
- features
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | | - | |
| 31 | + | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
213 | | - | |
214 | | - | |
| 213 | + | |
| 214 | + | |
215 | 215 | | |
216 | 216 | | |
217 | | - | |
218 | | - | |
| 217 | + | |
| 218 | + | |
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
74 | 73 | | |
75 | 74 | | |
76 | 75 | | |
| |||
118 | 117 | | |
119 | 118 | | |
120 | 119 | | |
| 120 | + | |
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| |||
686 | 686 | | |
687 | 687 | | |
688 | 688 | | |
689 | | - | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
690 | 696 | | |
691 | 697 | | |
692 | 698 | | |
693 | 699 | | |
694 | 700 | | |
695 | | - | |
| 701 | + | |
696 | 702 | | |
697 | 703 | | |
698 | 704 | | |
| |||
702 | 708 | | |
703 | 709 | | |
704 | 710 | | |
705 | | - | |
| 711 | + | |
706 | 712 | | |
707 | 713 | | |
708 | 714 | | |
| |||
712 | 718 | | |
713 | 719 | | |
714 | 720 | | |
715 | | - | |
| 721 | + | |
716 | 722 | | |
717 | 723 | | |
718 | 724 | | |
| |||
722 | 728 | | |
723 | 729 | | |
724 | 730 | | |
725 | | - | |
| 731 | + | |
726 | 732 | | |
727 | 733 | | |
728 | 734 | | |
| |||
0 commit comments