Skip to content

Conversation

@soenkeliebau
Copy link
Member

@soenkeliebau soenkeliebau commented Aug 9, 2021

Adds traits and methods to the operator framework which offer convenience methods around command handling.

Finding the currently running command or next command that should be run as well as tracking this in the status is handled by the operator framework.

Additionally Traits have been added which operators can implement for their command objects, this allows some generic handling to be done in the framework, while keeping the flexibility for operators to add their own information to command objects if needed for more complex operations.

Default implementations can be used for start, stop and restart by the operators.

Restart is currently limited in how much of a rolling functionality it offers, as it will still delete all pods before restarting one - but it will delete the pods in a rolling fashion. See #144 for a follow up issue.

lfrancke and others added 21 commits August 2, 2021 19:11
Still missing: - status patch - command completion - a lot more
Updates the requirements on [rstest](https://github.com/la10736/rstest) to permit the latest version. - [Release notes](https://github.com/la10736/rstest/releases) - [Changelog](https://github.com/la10736/rstest/blob/master/CHANGELOG.md) - [Commits](la10736/rstest@0.10.0...0.11.0) --- updated-dependencies: - dependency-name: rstest dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Lars Francke <github@lars-francke.de>
Due to kube-rs/kube#575 we had to change the where clauses on the owns function, as this doesn't support DynamicTypes anymore. This _should_ not require any changes in the operators themselves, as we don't currently use DynamicTypes. Might break for people who do though.
…e is the current topic under investigation Signed-off-by: Sönke Liebau <soenke.liebau@gmail.com>
Signed-off-by: Sönke Liebau <soenke.liebau@gmail.com>
Signed-off-by: Sönke Liebau <soenke.liebau@gmail.com>
Signed-off-by: Sönke Liebau <soenke.liebau@gmail.com>
Signed-off-by: Sönke Liebau <soenke.liebau@gmail.com>
…d of Lars' pr branch. Signed-off-by: Sönke Liebau <soenke.liebau@gmail.com>
Signed-off-by: Sönke Liebau <soenke.liebau@gmail.com>
Signed-off-by: Sönke Liebau <soenke.liebau@gmail.com>
Signed-off-by: Sönke Liebau <soenke.liebau@gmail.com>
# Conflicts: #	Cargo.toml #	stackable-operator/src/command_controller.rs #	stackable-operator/src/controller.rs #	stackable-operator/src/utils.rs
…derive crate Signed-off-by: Sönke Liebau <soenke.liebau@gmail.com>
This is needed as later commits contain breaking changes that our crates have not yet been adjusted for. Signed-off-by: Sönke Liebau <soenke.liebau@gmail.com>
@lfrancke lfrancke modified the milestones: Release #1, Release #2 Sep 1, 2021
Copy link
Member Author

@soenkeliebau soenkeliebau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM overall

We should go through and add some more comments and refactor stuff a bit to make it testabler, as well as add tests, but in the interest of getting this in before the hackathon tomorrow I think we can merge as is for now.

Maybe add a couple of todos before merging..

@soenkeliebau soenkeliebau changed the title Initial attempt at moving command handling to the framework Moving command handling to the framework and implement default handling for start, stop and simple restart Sep 30, 2021
@maltesander maltesander self-requested a review September 30, 2021 07:36
@soenkeliebau soenkeliebau merged commit 79cec28 into main Sep 30, 2021
@soenkeliebau soenkeliebau deleted the command_refactor branch September 30, 2021 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants