Skip to content

Support for filtering watchResource with labels #11

Description

@kturcios

As the title says, it would be a great feature to be able to filter watchResource by labels. Perhaps just expose a few of the options available for the watch query params?
e.g.

export type WatchOptions = {
  labelSelector: { [key: string]: string; };
}

protected async watchResource(
  group: string,
  version: string,
  plural: string,
  onEvent: (event: ResourceEvent) => Promise<void>,
  namespace?: string,
  options: WatchOptions,
): Promise<void>

I would be happy to work on this and open a PR.

Btw, I'm curious if your implementation is inspired by any existing solution like the Operator SDK?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions