Backstage
    Preparing search index...

    Options for watching Kubernetes resources

    interface KubernetesWatchOptions {
        allowWatchBookmarks?: boolean;
        labelSelector?: string;
        namespace?: string;
        resourceVersion?: string;
        resourceVersionMatch?: "NotOlderThan" | "Exact";
        sendInitialEvents?: boolean;
        signal?: AbortSignal;
        timeoutSeconds?: number;
    }
    Index
    allowWatchBookmarks?: boolean

    Allow watch bookmarks (for efficient resource version tracking)

    labelSelector?: string

    Label selector to filter resources

    namespace?: string

    Namespace to watch resources in (optional for cluster-scoped resources)

    resourceVersion?: string

    Resource version to start watching from

    resourceVersionMatch?: "NotOlderThan" | "Exact"

    How the resourceVersion constraint is applied. Set to 'NotOlderThan' when using sendInitialEvents so the server can serve from its watch cache rather than quorum-reading etcd.

    sendInitialEvents?: boolean

    When true, the watch stream begins with synthetic events that reproduce the current state of the collection, followed by a bookmark with the annotation k8s.io/initial-events-end. Requires allowWatchBookmarks and resourceVersionMatch set to 'NotOlderThan'. See KEP-3157 (watch-list). Supported in Kubernetes 1.32+ (Beta).

    signal?: AbortSignal

    AbortSignal to cancel the watch from outside the iteration loop

    timeoutSeconds?: number

    Timeout in seconds for the watch operation