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

Allow executing schedules via debug socket #424

Open
juliantaylor opened this issue Sep 8, 2022 · 1 comment
Open

Allow executing schedules via debug socket #424

juliantaylor opened this issue Sep 8, 2022 · 1 comment

Comments

@juliantaylor
Copy link

It may be useful if the commands you can run via the debug sockets include triggering operator to execute what it would normally do on a schedule synchronously at any time.

This would be useful for example for conformance tests to avoid having to wait for a scheduled run to have your system reach the desired state.
Sometimes you may also want to execute a schedule immediately to solve some problem where you cannot wait for the scheduled run.

You can already do this now by running the hook and giving it the correct inputs. E.g.:

shell-operator hook snapshot myhook | jq '[{type: \"Schedule\", snapshots: {nodes: .nodes.snapshot, pods: .pods.snapshot}}]' > /tmp/data.json"
BINDING_CONTEXT_PATH=/tmp/data.json /hooks/myhook

But this is somewhat clumsy and needs adapting to each hook, a simple command like shell-operator hook $myhook run-schedule $schedulename would be convenient.

@juliantaylor
Copy link
Author

Alternatively a new dumping command similar to hook snapshot which would dump the required binding context json of a hook so one can run the hook manually from it without the need to change it would also be sufficient.

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

1 participant