Skip to content

migrate file monitor to krt#55970

Merged
istio-testing merged 6 commits intoistio:masterfrom
sschepens:krt/filemonitor
Jun 5, 2025
Merged

migrate file monitor to krt#55970
istio-testing merged 6 commits intoistio:masterfrom
sschepens:krt/filemonitor

Conversation

@sschepens
Copy link
Copy Markdown
Contributor

@sschepens sschepens commented Apr 16, 2025

Please provide a description of this PR:
Migrated file monitor based config controller to KRT, taking advantage of #55337

This allows deleting the old file monitor implmentation, reducing the amount of code to maintain.

@sschepens sschepens requested a review from a team as a code owner April 16, 2025 19:39
@istio-testing istio-testing added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Apr 16, 2025
@sschepens sschepens force-pushed the krt/filemonitor branch 2 times, most recently from 808d538 to fd1a2b4 Compare April 16, 2025 19:43

// Defer starting the file monitor until after the service is created.
s.addStartFunc("file monitor", func(stop <-chan struct{}) error {
fileMonitor.Start(stop)
Copy link
Copy Markdown
Contributor Author

@sschepens sschepens Apr 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

previously this controller would only start monitoring files when the server actually started, we are losing this with the new implementation (KRT implementation does not allow for a delayed start), but we could delay the creation of collections if it's necessary.

Copy link
Copy Markdown
Member

@howardjohn howardjohn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! only had a chance to give it a brief look but looking good

@sschepens sschepens force-pushed the krt/filemonitor branch 3 times, most recently from 06c7225 to 2882dc1 Compare April 21, 2025 19:22
@sschepens sschepens force-pushed the krt/filemonitor branch 3 times, most recently from 6ae1d0d to 06a9bcc Compare April 30, 2025 14:05
@sschepens sschepens requested a review from a team as a code owner April 30, 2025 14:17
@sschepens sschepens added the release-notes-none Indicates a PR that does not require release notes. label Apr 30, 2025
@sschepens
Copy link
Copy Markdown
Contributor Author

@howardjohn could you give this another look? I've made some changes to only use a single FileCollection because each one of those would read the whole state on every change.

Copy link
Copy Markdown
Contributor

@stevenctl stevenctl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but have 1 question

@sschepens
Copy link
Copy Markdown
Contributor Author

@howardjohn could you give this another look please?

Copy link
Copy Markdown
Member

@howardjohn howardjohn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥
Sorry lost track of this one

@istio-testing istio-testing merged commit 9cfa0c5 into istio:master Jun 5, 2025
30 checks passed
@sschepens sschepens deleted the krt/filemonitor branch June 5, 2025 14:02
irenezhong2861 pushed a commit to irenezhong2861/istio that referenced this pull request Jun 5, 2025
* migrate file monitor to krt

* implment get & list by namespace

* fixes and tests

* fix event handling

* fix file controller test

* use single FileCollection for efficiency
fjglira pushed a commit to fjglira/istio that referenced this pull request Sep 26, 2025
* upstream/master: (28 commits)
  Automator: update common-files@master in istio/istio@master (istio#56545)
  Automator: update proxy@master in istio/istio@master (istio#56544)
  Automator: update go-control-plane in istio/istio@master (istio#56543)
  Automator: update proxy@master in istio/istio@master (istio#56540)
  Automator: update ztunnel@master in istio/istio@master (istio#56532)
  Ambient: In ambient index, filter configs by revision (istio#56477)
  Automator: update istio/client-go@master dependency in istio/istio@master (istio#56539)
  Automator: update proxy@master in istio/istio@master (istio#56538)
  Automator: update common-files@master in istio/istio@master (istio#56537)
  optimization: allow for lazy sidecar initialization (istio#47221)
  static collection eager indexes (istio#56530)
  fix typo in flag (istio#56534)
  feat: enable support for proxy protocol on status port (istio#55986)
  remove finding of pods by IP (istio#56502)
  Automator: update proxy@master in istio/istio@master (istio#56528)
  migrate file monitor to krt (istio#55970)
  Automator: update istio/client-go@master dependency in istio/istio@master (istio#56525)
  Automator: update ztunnel@master in istio/istio@master (istio#56518)
  Fix crash in merging http routes (istio#56499)
  krt: add assertions (istio#56510)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/perf and scalability release-notes-none Indicates a PR that does not require release notes. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants