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

Hooks within bootstrap process #8748

Open
ryjogo opened this issue May 16, 2024 · 4 comments
Open

Hooks within bootstrap process #8748

ryjogo opened this issue May 16, 2024 · 4 comments

Comments

@ryjogo
Copy link

ryjogo commented May 16, 2024

Feature Request

Description

It would be fantastic if one could utilize “hooks” that can fire at certain points in the bootstrap process. Perhaps just before and after the bootstrap we can trigger events, example notification of nodes being provisioned to external systems etc.

This could be extended to other parts of the system, i.e upgrades, resets, or any other API changes.

Support for a simple payload of metadata from the Talos API, i.e. OS Version, network information could be a stretch goal.

For a conversation on the matter: https://taloscommunity.slack.com/archives/CMARMBC4E/p1715857612529299

Use case

Our use case would simply be to report when a node is being bootstrapped, and was successfully bootstrapped, like a start/end of a bootstrap process, of course this would need to have the network up and running to send a POST request to an external endpoint.

Other use cases could be to improve actions or run secondary workflows based on the triggers. I.e, if a node was reset or successfully upgraded - from/to which version.

@frezbo
Copy link
Member

frezbo commented May 16, 2024

with partial machine config, we could have this applied even in maintenance mode and it defines what events to be notified on

@smira
Copy link
Member

smira commented May 16, 2024

You could do this today by doing talosctl events API or watching resources. This is not effectively push model, but rather pull model, but it gives more flexibility without putting too much stuff on the OS.

You get the data, but what you do with it (how you notify and what) is up to you.

E.g. you could do equivalent of talosctl get machinestatus -o yaml -w and figure out machine status.

@ryjogo
Copy link
Author

ryjogo commented May 17, 2024

@smira Thanks, this is also an option - but with thousands of nodes, we'd have to subscribe to events on everyone, including any new ones that popup/get torn down. It would be beneficial to de-couple this process to a push model then we wouldn't have to manage "state"

@smira
Copy link
Member

smira commented May 17, 2024

This is where SideroLink comes handy, and it helps in many other ways as well.

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

3 participants