Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for filtering watchResource with labels #11

Open
kturcios opened this issue Jan 27, 2021 · 1 comment
Open

Support for filtering watchResource with labels #11

kturcios opened this issue Jan 27, 2021 · 1 comment

Comments

@kturcios
Copy link

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?

@dot-i
Copy link
Owner

dot-i commented Feb 3, 2021

Sounds like a good suggestion, so feel free to send in a PR for this if you have the time.

Implementation is not really inspired by the Operator SDK, no. So maybe there are a few interesting ideas to "borrow" from there to further improve this package? 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants