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 KDapp specifying minimum persistent storage size #536

Closed
joel-bluedata opened this issue Jan 6, 2022 · 0 comments
Closed

support KDapp specifying minimum persistent storage size #536

joel-bluedata opened this issue Jan 6, 2022 · 0 comments

Comments

@joel-bluedata
Copy link
Member

We support other minimum resource specs (in role minResources); we need to support a min for persistent storage as well. An app can definitely have a minimum below which deployment will not succeed.

joel-bluedata added a commit to joel-bluedata/kubedirector that referenced this issue Jan 19, 2022
closes issue bluek8s#536

If an app is going to use persistent storage, it probably has a size that is the minimum necessary for the app to be successfully brought up. Let's express that.

When the kdcluster asks for resources, persistent storage is in a different section than other resources (for reasons having to do with how these requests get expressed in K8s resources). We'll have a parallel construction in the kdapp here... the new minStorage optional object in a role definition will be parallel to minResources.

Omitting minStorage means that a role doesn't care whether you give it a PV, and if you do give it a PV, it doesn't care what size it is. Generally this should only be omitted for a truly ephmereal role.

If minStorage is specified, you have to provide a size property (with a value in "quantity" format) which is the necessary minimum PV size.

There's an optional bool properly in minStorage, named ephemeralModeSupported. False by default. If you set this true, it means the role members will be OK running without a PV. But if you do give it a PV, the minimum size will be enforced. This option is to support an app where a certain role could make use of persistent storage as an enhancement, but it is not a requirement.

So this is the matrix of behaviors:

** no minStorage in the kdapp:
* ok to create kdcluster role without any persistent storage
* ok to create kdcluster role with persistent storage of any size

** minStorage in the kdapp, ephemeralModeSupported is true:
* ok to create kdcluster role without any persistent storage
* NOT OK to create kdcluster role with persistent storage < min
* ok to create kdcluster role with persistent storage >= min

** minStorage in the kdapp, ephemeralModeSupported is false:
* NOT OK to create kdcluster role without any persistent storage
* NOT OK to create kdcluster role with persistent storage < min
* ok to create kdcluster role with persistent storage >= min
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant