Closed
Description
/kind bug
Which area this bug is related to?
/area library
What versions of software are you using?
Operating System:
N/A
Go Pkg Version:
N/A
Bug Summary
In a pod, having either a CPU or memory request that is greater than the specified limit is an invalid configuration. The validation package in devfile/api does not detect this error, so it's on downstream users to either detect it or submit an invalid object to the cluster.
To Reproduce:
The devfile below passes validation:
schemaVersion: 2.0.0
metadata:
name: sample-devfile
components:
- name: web-terminal
container:
image: quay.io/wto/web-terminal-tooling:latest
memoryLimit: 512Mi
memoryRequest: 1024Mi
command:
- "tail"
- "-f"
- "/dev/null"
Expected behavior
Validation should fail with a message specifying the discrepancy.
Additional context
Originally reported in eclipse-che/che#20751