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

fix: report an error when the node template is not found #4721

Merged
merged 1 commit into from Sep 28, 2023

Conversation

tzneal
Copy link
Contributor

@tzneal tzneal commented Sep 28, 2023

Fixes #4698

Description

Without this change, no instance types are found and the resulting behavior is a generic error regarding not finding instance types.

How was this change tested?

Deployed to EKS with no node template.

Previous error message:

INFO	controller.provisioner	provisioning/provisioner.go:238	skipping, no resolved instance types found	
ERROR	controller.provisioner	scheduling/scheduler.go:190	Could not schedule pod, all available instance types exceed limits for provisioner: "default"	

New Error Message

karpenter-5cd78bcc87-jlwnp controller 2023-09-28T12:49:09.907Z	ERROR	controller.provisioner	creating scheduler, getting instance types, resolving node class, resolving node template, getting providerRef, AWSNodeTemplate.karpenter.k8s.aws "defaultFake" not found	{"commit": "d71c265-dirty"

kubernetes-sigs/karpenter#547 modifies karpenter-core to log the instance type failure, but continue on to the next provisioner, changing the error into:

karpenter-d7887b4d7-wx64q controller 2023-09-28T13:04:14.064Z	ERROR	controller.provisioner	skipping, unable to resolve instance types, resolving node class, resolving node template, getting providerRef, AWSNodeTemplate.karpenter.k8s.aws "defaultFake" not found	{"commit": "ff540d0", "provisioner": "default"}
karpenter-d7887b4d7-wx64q controller 2023-09-28T13:04:14.066Z	ERROR	controller.provisioner	Could not schedule pod, all available instance types exceed limits for provisioner: "default"	{"commit": "ff540d0", "pod": "default/inflate-54b8bcf56d-fq8kk"}

Does this change impact docs?

  • Yes, PR includes docs updates
  • Yes, issue opened: #
  • No

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@tzneal tzneal requested a review from a team as a code owner September 28, 2023 12:49
@tzneal tzneal requested a review from njtran September 28, 2023 12:49
@netlify
Copy link

netlify bot commented Sep 28, 2023

Deploy Preview for karpenter-docs-prod canceled.

Name Link
🔨 Latest commit b0d32b6
🔍 Latest deploy log https://app.netlify.com/sites/karpenter-docs-prod/deploys/65158016eab61200084d7257

@tzneal tzneal force-pushed the better-error-for-missing-nodetemplate branch from 346b236 to ff540d0 Compare September 28, 2023 13:05
Without this change, no instance types are found and the resulting
behavior is a generic error regarding not finding instance types.
@tzneal tzneal force-pushed the better-error-for-missing-nodetemplate branch from ff540d0 to b0d32b6 Compare September 28, 2023 13:31
Copy link
Contributor

@jonathan-innis jonathan-innis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@tzneal tzneal merged commit 5268d2f into aws:main Sep 28, 2023
13 checks passed
@tzneal tzneal deleted the better-error-for-missing-nodetemplate branch September 28, 2023 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Karpenter controller can't schedule/add any nodes
2 participants