kedge icon indicating copy to clipboard operation
kedge copied to clipboard

Validate that size for PVC is set.

Open kadel opened this issue 8 years ago • 3 comments

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 https://github.com/kedgeproject/kedge/pull/544

kadel avatar Jan 05 '18 09:01 kadel

Ideally, this should be handled by JSONSchema if possible.

kadel avatar Jan 05 '18 10:01 kadel

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.

kadel avatar Jan 05 '18 13:01 kadel

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 ?

surajnarwade avatar Feb 05 '18 12:02 surajnarwade