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

Lazy subscribing to CRDs #409

Open
diafour opened this issue Jul 7, 2022 · 1 comment
Open

Lazy subscribing to CRDs #409

diafour opened this issue Jul 7, 2022 · 1 comment

Comments

@diafour
Copy link
Contributor

diafour commented Jul 7, 2022

Is your feature request related to a problem? Please describe.

There is allowFailure for hooks, but Kubernetes bindings can't ignore error on subscribing to non existent kinds.
The idea is to periodically retry subscribing and run hook when kind appears (CRD created).

It can be a solution for setups with CRD creating in main queue and hooks in parallel queues. Subscribing in parallel queues can occur before creating CRD and it leads to global error.

Describe the solution you'd like to see

Describe alternatives you've considered

Additional context

@nabokihms
Copy link
Member

This problem leaked to the deckhouse, and now we are using the thing called dynamic subscription to play around with this.

For example, a hook written in Go in Deckhouse changes the subscription. When CRD appears in the cluster:

https://github.com/deckhouse/deckhouse/blob/7a47d938e8b48164d9fbc65d09ad5e8e62206283/modules/040-node-manager/hooks/get_crds.go#L108-L115

https://github.com/deckhouse/deckhouse/blob/7a47d938e8b48164d9fbc65d09ad5e8e62206283/modules/040-node-manager/hooks/get_crds.go#L169-L197

We can avoid the magic with lazy subscriptions and subscribe to all possible instance classes.

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