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

Devfile validation does not verify that resource requests are less than resource limits. #672

Closed
amisevsk opened this issue Nov 9, 2021 · 0 comments · Fixed by devfile/library#124
Assignees
Labels
area/api Enhancement or issue related to the api/devfile specification area/library Common devfile library for interacting with devfiles kind/bug Something isn't working

Comments

@amisevsk
Copy link
Contributor

amisevsk commented Nov 9, 2021

/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

@openshift-ci openshift-ci bot added kind/bug Something isn't working area/library Common devfile library for interacting with devfiles labels Nov 9, 2021
@yangcao77 yangcao77 self-assigned this Nov 15, 2021
@yangcao77 yangcao77 added area/api Enhancement or issue related to the api/devfile specification and removed area/library Common devfile library for interacting with devfiles labels Nov 15, 2021
@yangcao77 yangcao77 added the area/library Common devfile library for interacting with devfiles label Nov 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/api Enhancement or issue related to the api/devfile specification area/library Common devfile library for interacting with devfiles kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants