Skip to content
This repository has been archived by the owner on Nov 15, 2022. It is now read-only.

Validate that size for PVC is set. #562

Open
kadel opened this issue Jan 5, 2018 · 3 comments
Open

Validate that size for PVC is set. #562

kadel opened this issue Jan 5, 2018 · 3 comments

Comments

@kadel
Copy link
Member

kadel commented Jan 5, 2018

There are two ways how to set requested size for PVC in kedge

using size shortcut

name: storage
volumeClaims:
- size: 500Mi

or regularly via requests

name: storage
volumeClaims:
- resources:
    requests:
      storage: 500Mi

without resource.request.storage PVC can't be created, we need to check that size or resources.requests.storage is set.

see #544

@kadel
Copy link
Member Author

kadel commented Jan 5, 2018

Ideally, this should be handled by JSONSchema if possible.

@kadel
Copy link
Member Author

kadel commented Jan 5, 2018

One of those has to be set. If both are set than it is conflict and we don't know which one to use. And if neither is set than its incomplete PVC definition.

@surajnarwade
Copy link
Collaborator

surajnarwade commented Feb 5, 2018

Current Status:

  • if both size and request are provided:
$ kedge generate -f app.yml 
unable to perform controller operations: unable to transform data: unable to create Persistent Volume Claims: persistent volume "persistent", cannot provide size and resources at the same time
  • If both size and request is not present:
$ kedge generate -f app.yml 
unable to perform controller operations: unable to transform data: unable to create Persistent Volume Claims: persistent volume "persistent", please provide size or resources, none given

@kadel can we close this issue ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants