envoyproxy / envoy

Cloud-native high-performance edge/middle/service proxy
https://www.envoyproxy.io
Apache License 2.0
24.28k stars 4.69k forks source link

Add optional support for watching for "Modified" filesystem events #33560

Open weissne opened 2 months ago

weissne commented 2 months ago

Title: Add optional support for watching for "Modified" filesystem events

Description:

We have the need to recognize "Modified" filesystem events that are raised when certificates are updated in our monitored "path_config_source" defined for our Secrets configuration (we use "sds_config") We would like to do this by setting a new boolean field named "watch_for_modified" inside the config.core.v3.PathConfigSource e.g. message PathConfigSource { string path = 1 [(validate.rules).string = {min_len: 1}]; WatchedDirectory watched_directory = 2; bool watch_for_modified = 3; }

The field will be optional and only when set to true will the Modified filesystem event be accepted by the watcher and will trigger it's callback.

adisuissa commented 2 months ago

Thanks for your suggestion! Can you specify which filesystem events that trigger the callback at the moment you are trying to avoid?

weissne commented 2 months ago

Thanks for your response.

Sorry for not clarifying this, but I'm not trying to avoid filesystem events that trigger the callback now. The idea here is to enable, in addition to the existing "Moved" filesystem event that is watched and triggers a callback, also the watch of "Modified". We need this because the "Modified" filesystem event is triggered, instead of "Move", when certificates are updated in our monitored "path_config_source" defined for our Secrets, because of the way it's done, which we don't have control over.

github-actions[bot] commented 1 month ago

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.

weissne commented 1 month ago

@adisuissa - Can you please share your thoughts on this following my clarifcation? I would be happy to implement this if possible.

weissne commented 1 month ago

Accidently closed the issue :) Reopening...

github-actions[bot] commented 2 weeks ago

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.

adisuissa commented 2 weeks ago

Apologies for the late reply. This is by design. See https://github.com/envoyproxy/envoy/issues/20474#issuecomment-1075855325