Skip to content

Commit 1974d0b

Browse files
fix: prevent runner pod evication and use the same instance type (#274)
1 parent c21684e commit 1974d0b

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

docs/tenant-usage/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
runs-on:
5757
- self-hosted
5858
- x64
59-
- type: standard
59+
- type:standard
6060
```
6161
6262
For Kubernetes pods, use:

docs/tenant-usage/renovatebot/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ jobs:
3636
runs-on:
3737
- self-hosted
3838
- x64
39-
- type: large
40-
- env: ops-prod
39+
- type:large
40+
- env:ops-prod
4141

4242
steps:
4343
- name: Checkout Repository

modules/core/arc/scale_set/template_files/k8s.yml.tftpl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ containerMode:
2020

2121
# with containerMode.type=kubernetes, we will populate the template.spec with following pod spec
2222
template:
23+
metadata:
24+
annotations:
25+
karpenter.sh/do-not-evict: "true"
2326
spec:
2427
securityContext:
2528
fsGroup: 123

modules/infra/eks/karpenter.tf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,9 @@ locals {
9898
disk_throughput = var.cluster_volume.throughput
9999
})
100100

101-
node_pool_manifest = templatefile("${path.module}/templates/node_pool.yaml.tpl", {})
101+
node_pool_manifest = templatefile("${path.module}/templates/node_pool.yaml.tpl", {
102+
instance_type = var.cluster_size.instance_type
103+
})
102104
}
103105

104106
resource "null_resource" "apply_ec2_node_class" {

modules/infra/eks/templates/node_pool.yaml.tpl

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,10 @@ spec:
66
template:
77
spec:
88
requirements:
9-
- key: karpenter.k8s.aws/instance-family
9+
- key: node.kubernetes.io/instance-type
1010
operator: In
1111
values:
12-
- m6i
13-
- m5
14-
- c6i
15-
- c5
16-
- r6i
17-
- r5
12+
- ${instance_type}
1813
- key: kubernetes.io/arch
1914
operator: In
2015
values: ["amd64"]

0 commit comments

Comments
 (0)