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 "synchronization with external API" scenario #384

Open
diafour opened this issue Apr 18, 2022 · 0 comments
Open

Support for "synchronization with external API" scenario #384

diafour opened this issue Apr 18, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@diafour
Copy link
Contributor

diafour commented Apr 18, 2022

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

There are reports about usage the shell-operator as a tool to synchronize CR state with external APIs (e.g. #322). Experience with using individual events shows it is not reliable: API server can drop Delete events on reload, Modified event treated as Added for label selectors, etc. Snapshots and groups were introduced to support converge behavior for hooks. This model is working good when everything is in cluster: hook subscribes to objects, gets all of them at once, and may detect modifications and deletions easily. It is difficult to work with external API using 'snapshots' approach: each time hook receives a snapshot of CRs, it should list all corresponding objects via API.
It seems reasonable to use the Synchronization event to do the full listing via API only once, and then use this first result to compare against snapshots. The problem is that hook has no simple way to store dynamic data.

Describe the solution you'd like to see

The addon-operator has concept of values: hook can return JSON patches to update hierarchical data and to react on such changes. Here, in the shell-operator, we can implement simplified concept of values only to read and update them.

The other solution is to encourage addon-operator usage for such scenarios.

Another "solution" is to add a flag to prevent binding context combination for similar tasks. (But honestly, it's more like a crazy idea for brainstorming).

Describe alternatives you've considered

Additional context

@diafour diafour added the enhancement New feature or request label Apr 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant