Function spawn_api_key_watcher

Source
pub fn spawn_api_key_watcher(
    path: PathBuf,
    store: Arc<ApiKeyStore>,
) -> JoinHandle<()>
Expand description

Poll the API-key file contents and reload complete snapshots after projected-secret updates or atomic CLI writes. Kubernetes updates Secret volumes by swapping symlinks, which is not consistently reported by directory watchers across filesystems. Invalid snapshots retain the current key set; a later distinct file snapshot is retried.