Skip to content

Commit

Permalink
fix: prevent karpenter from provisioning metal nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
fullykubed committed Oct 19, 2024
1 parent 6921321 commit 197fa7d
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 3 deletions.
25 changes: 22 additions & 3 deletions packages/infrastructure/kube_karpenter_node_pools/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,13 @@ locals {
"m8g",
"m7g",
"m7i",
"m7i-flex",
"m7a",
"m6g",
"m6i",
"m6a",
"c8g",
"c7g",
"c7i",
"c7i-flex",
"c7a",
"c6g",
"c6gn",
Expand All @@ -68,12 +66,26 @@ locals {
"x2iedn"
]

// Blacklisted sizes
// These sizes are not allowed as bare metals instances are incompatible
// with our base AMI
blacklisted_sizes = [
"metal",
"metal-24xl",
"metal-48xl"
]

shared_requirements = [
{
key = "karpenter.k8s.aws/instance-family"
operator = "In"
values = local.base_instance_families
},
{
key = "karpenter.k8s.aws/instance-size"
operator = "NotIn"
values = local.blacklisted_sizes
},
{
key = "kubernetes.io/os"
operator = "In"
Expand All @@ -95,10 +107,17 @@ locals {
[
"t4g",
"t3",
"t3a"
"t3a",
"c7i-flex",
"m7i-flex"
]
)
},
{
key = "karpenter.k8s.aws/instance-size"
operator = "NotIn"
values = local.blacklisted_sizes
},
{
key = "kubernetes.io/os"
operator = "In"
Expand Down
6 changes: 6 additions & 0 deletions packages/website/src/app/changelog/edge/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ Learn more [here](/docs/edge/guides/versioning/releases).*

{/* lint disable no-duplicate-headings */}

## Unreleased

### Fixed

* Prevents Karpenter from scheduling instances on bare metal instances which we have observed issues with.

## edge.24-10-18

### Breaking Changes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,14 @@ Type: `string`

Default: `""`

### image\_tag\_prefix

Description: The prefix to prepend to the image tag

Type: `string`

Default: `""`

### pull\_through\_cache\_enabled

Description: Whether to use the ECR pull through cache for the deployed images
Expand Down

0 comments on commit 197fa7d

Please sign in to comment.