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

Move controller internal triggers to a WatchStreamExt module #1519

Open
clux opened this issue Jun 13, 2024 · 0 comments
Open

Move controller internal triggers to a WatchStreamExt module #1519

clux opened this issue Jun 13, 2024 · 0 comments
Labels
question Direction unclear; possibly a bug, possibly could be improved. runtime controller runtime related

Comments

@clux
Copy link
Member

clux commented Jun 13, 2024

Would you like to work on this feature?

None

What problem are you trying to solve?

Controlling complexity in controller/mod.rs.

The triggers we have currently are:

  1. trigger_with
  2. trigger_self
  3. trigger_self_shared
  4. trigger_others
  5. trigger_others_shared
  6. trigger_owners
  7. trigger_owners_shared

with a call-chain that flows [trigger_owners -> trigger_other -> trigger_with] or [trigger_self -> trigger_with], and the for the shared stream cases differ only in stream input (Arc'd for shared <- #1483 (comment)).

These have bad test coverage and put more complex topics into the one same file.

Describe the solution you'd like

A module referenced in WatchStreamExt that can produce the various trigger streams needed by Controller.

That way the concept of owner-ref-trigger-mapping (or whatever shorthand we want to call it) can have a well-documented home.

Maybe these can also have similar constructors for shared / non-shared. But not sure what is best here.

This possibly needs some finalisation on shared streams first #1472 so probably wait with this for now. I am just marking this down to not forget, and will edit it as ready later.

Describe alternatives you've considered

N/A

Documentation, Adoption, Migration Strategy

  1. move to new interface
  2. deprecate pub triggers after with clear replacements

Target crate for feature

kube-runtime

@clux clux added question Direction unclear; possibly a bug, possibly could be improved. runtime controller runtime related labels Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Direction unclear; possibly a bug, possibly could be improved. runtime controller runtime related
Projects
None yet
Development

No branches or pull requests

1 participant