kedge
kedge copied to clipboard
Validate that size for PVC is set.
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
Ideally, this should be handled by JSONSchema if possible.
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.
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 ?