-
Notifications
You must be signed in to change notification settings - Fork 979
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
Update Provisioner Docs Example #1231
Conversation
The `spec.limits.resources.cpu` field should be a string, not an int.
✔️ Deploy Preview for karpenter-docs-prod ready! 🔨 Explore the source changes: c7f79a8 🔍 Inspect the deploy log: https://app.netlify.com/sites/karpenter-docs-prod/deploys/61f9b39112b1fc00087ef9b7 😎 Browse the preview: https://deploy-preview-1231--karpenter-docs-prod.netlify.app |
Did you experience an error with that yaml? I just applied it to my cluster and it worked for me:
|
@@ -52,7 +52,7 @@ spec: | |||
# Limits prevent Karpenter from creating new instances once the limit is exceeded. | |||
limits: | |||
resources: | |||
cpu: 1000 | |||
cpu: "1000" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this necessary? IIUC, the integer works just fine.
I believe quotes are only required if the field is a string and the input is a number. In that case, you'd need to use quotes to tell yaml that you're actually passing a string rather than a number. |
@bwagner5 @ellistarn The kube API seems to return a string regardless of the type submitted to the API server, based on my Very Scientific Testing on my 1.20.11 EKS cluster. Applying a provisioner that uses integer limits via ArgoCD will cause ArgoCD to always mark the resource as Out of Sync. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch!
Can you include this in /preview docs? We copy preview docs into the next release version when we release. Optionally, you could backport this to older versions of docs, but I'm happy with it just being included in the next release.
Thank you! |
The
spec.limits.resources.cpu
field should be a string, not an int.1. Issue, if available:
An example in the docs is incorrect
2. Description of changes:
Updated example to be correct
3. How was this change tested?
N/A
4. Does this change impact docs?
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.