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

Resource requests/limits are ignored by Kubernetes #1043

Closed
PedroArvela opened this issue Mar 23, 2021 · 0 comments · Fixed by #1044
Closed

Resource requests/limits are ignored by Kubernetes #1043

PedroArvela opened this issue Mar 23, 2021 · 0 comments · Fixed by #1044
Labels
bug Something isn't working

Comments

@PedroArvela
Copy link
Contributor

PedroArvela commented Mar 23, 2021

Summary

When trying to apply resource requests/limits to a rollout the apply succeeds, but the resulting object in the API service has resources set as an empty object.

Anderson Silva in the Slack channel found this was related to the CRD for Rollouts defining the resources just as an object without any elements. By patching the additional elements the CRD would work.

This seems like a regression caused by #480 and I think it is caused by field pruning: https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#controlling-pruning

Steps to reproduce

  1. Apply https://gist.github.com/PedroArvela/66dec9c51ce0872caf272f90603e28e8
  2. Run kubectl get rollout -o yaml borker

Expected Results

Returned yaml should have:

          resources:
            requests:
              cpu: 300m
              memory: 512Mi
            limits:
              cpu: 600m
              memory: 1Gi

Actual Results

Resources are:

resources: {}

Diagnostics


Message from the maintainers:

Impacted by this bug? Give it a 👍. We prioritize the issues with the most 👍.

@PedroArvela PedroArvela added the bug Something isn't working label Mar 23, 2021
jessesuen pushed a commit that referenced this issue Apr 2, 2021
…ds. Fixes #1043 (#1044)

Signed-off-by: Anderson Silva <hello@anderson.codes>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant