Skip to content

Enable event generation on file deletion in WatchConfig() #2032

@rashmichandrashekar

Description

@rashmichandrashekar

Preflight Checklist

  • I have searched the issue tracker for an issue that matches the one I want to file, without success.

Problem Description

Currently, the WatchConfig method only watches for file create and write operatins. We have a scenario where we want to watch for file delete operations and update config accordingly. The use case is inside a kubernetes cluster where the config file is mounted as a configmap. WatchConfig works fine for create and write, but it doesn't provide capability to watch for delete events and instead closes the event channel which leads to future create/write events to not be watched.

Proposed Solution

Create an optional parameter to watch for delete and continue watching instead of closing the event channel.

Alternatives Considered

No response

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions