Skip to content

[Merged by Bors] - Adds structs to allow configuring resource limits and storage parameters #365

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

Closed
wants to merge 12 commits into from

Conversation

soenkeliebau
Copy link
Member

@soenkeliebau soenkeliebau commented Apr 6, 2022

Signed-off-by: Sönke Liebau soenke.liebau@stackable.de

Description

These structs are intended for use by operators to offer a consistent interface across the entire platform.

Review Checklist

  • Code contains useful comments
  • (Integration-)Test cases added (or not applicable)
  • Documentation added (or not applicable)
  • Changelog updated (or not applicable)
  • Cargo.toml only contains references to git tags (not specific commits or branches)

Once the review is done, comment bors r+ (or bors merge) to merge. Further information

…ers.

These structs are intended for use by operators to offer a consistent interface across the entire platform.

Signed-off-by: Sönke Liebau <soenke.liebau@stackable.de>
@soenkeliebau soenkeliebau requested a review from a team April 6, 2022 15:59
Copy link
Member

@maltesander maltesander left a comment

Choose a reason for hiding this comment

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

Would it make sense to implement some basic helper methods like create pvc (from PvcConfig) etc.?

Signed-off-by: Sönke Liebau <soenke.liebau@stackable.de>
Signed-off-by: Sönke Liebau <soenke.liebau@stackable.de>
Signed-off-by: Sönke Liebau <soenke.liebau@stackable.de>
@soenkeliebau
Copy link
Member Author

soenkeliebau commented Apr 7, 2022

Would it make sense to implement some basic helper methods like create pvc (from PvcConfig) etc.?

I have added a fn to do this. I considered the options a bit, ideally I'd like to impl Into<VolumeBuilder> for PvcConfig, but name is required on the constructor of the builder so that doesn't work.

I think just having a fn that returns a builder might make more sense than returning a fully built volumeclaim?

@teozkr any thoughts?

@nightkr
Copy link
Member

nightkr commented Apr 7, 2022

To be honest, the FooBuilder-Foo distinction is somewhat arbitrary anyway. I'd be fine with either, but I think returning FooBuilder makes sense.

@soenkeliebau
Copy link
Member Author

I have decided to leave it as is :)

The VolumeBuilder is at the volume level and expects a ready-made pvc, so lets return a pvc from here that can then be stuck into a volumebuilder if needed.

Copy link
Member

@maltesander maltesander left a comment

Choose a reason for hiding this comment

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

LGTM.

…erence.

Signed-off-by: Sönke Liebau <soenke.liebau@stackable.de>
Signed-off-by: Sönke Liebau <soenke.liebau@stackable.de>
Signed-off-by: Sönke Liebau <soenke.liebau@stackable.de>
Signed-off-by: Sönke Liebau <soenke.liebau@stackable.de>
@sbernauer
Copy link
Member

I have on small request: We introduced a new module commons where we put all the common structs (currently available on the main branch).
Could you move you're resources.rs there?

@soenkeliebau
Copy link
Member Author

bors r+

bors bot pushed a commit that referenced this pull request Apr 11, 2022
…ers (#365)


Signed-off-by: Sönke Liebau <soenke.liebau@stackable.de>

## Description

These structs are intended for use by operators to offer a consistent interface across the entire platform.
@soenkeliebau
Copy link
Member Author

bors cancel

@bors
Copy link
Contributor

bors bot commented Apr 11, 2022

Canceled.

Signed-off-by: Sönke Liebau <soenke.liebau@stackable.de>
Signed-off-by: Sönke Liebau <soenke.liebau@stackable.de>
Copy link
Member

@sbernauer sbernauer left a comment

Choose a reason for hiding this comment

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

LGTM % failing clippy check

Signed-off-by: Sönke Liebau <soenke.liebau@stackable.de>
@soenkeliebau
Copy link
Member Author

bors r+

bors bot pushed a commit that referenced this pull request Apr 11, 2022
…ers (#365)


Signed-off-by: Sönke Liebau <soenke.liebau@stackable.de>

## Description

These structs are intended for use by operators to offer a consistent interface across the entire platform.
@bors
Copy link
Contributor

bors bot commented Apr 11, 2022

Pull request successfully merged into main.

Build succeeded:

@bors bors bot changed the title Adds structs to allow configuring resource limits and storage parameters [Merged by Bors] - Adds structs to allow configuring resource limits and storage parameters Apr 11, 2022
@bors bors bot closed this Apr 11, 2022
@bors bors bot deleted the feat/resource_config_new branch April 11, 2022 12:27
bors bot pushed a commit that referenced this pull request May 5, 2022
## Description

This is a starting point for #362, but is intended to be usable outside of that context (in this case, the primary motivation for getting this done now is #365).



Co-authored-by: Teo Klestrup Röijezon <teo.roijezon@stackable.de>
Co-authored-by: Felix Hennig <mail@felixhennig.com>
Co-authored-by: Malte Sander <contact@maltesander.com>
Co-authored-by: Sebastian Bernauer <sebastian.bernauer@stackable.de>
Co-authored-by: Sönke Liebau <soenke.liebau@stackable.de>
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

Successfully merging this pull request may close these issues.

4 participants