Skip to content

Commit

Permalink
chore: add v1 NodePool examples (#541)
Browse files Browse the repository at this point in the history
* chore: add v1 NodePool examples

* fix: reduce disruption budget in the examples

---------

Co-authored-by: Bryce Soghigian <[email protected]>
  • Loading branch information
tallaxes and Bryce-Soghigian authored Nov 6, 2024
1 parent e32117f commit 7254363
Show file tree
Hide file tree
Showing 2 changed files with 107 additions and 0 deletions.
51 changes: 51 additions & 0 deletions examples/v1/general-purpose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# This example NodePool will provision general purpose instances
---
apiVersion: karpenter.sh/v1
kind: NodePool
metadata:
name: general-purpose
annotations:
kubernetes.io/description: "General purpose NodePool"
spec:
disruption:
consolidateAfter: 0s
budgets:
- nodes: 30%
template:
metadata:
labels:
# required for Karpenter to predict overhead from cilium DaemonSet
kubernetes.azure.com/ebpf-dataplane: cilium
spec:
nodeClassRef:
group: karpenter.azure.com
kind: AKSNodeClass
name: default
startupTaints:
# https://karpenter.sh/docs/concepts/nodepools/#cilium-startup-taint
- key: node.cilium.io/agent-not-ready
effect: NoExecute
value: "true"
expireAfter: Never
requirements:
- key: kubernetes.io/arch
operator: In
values: ["amd64"]
- key: kubernetes.io/os
operator: In
values: ["linux"]
- key: karpenter.sh/capacity-type
operator: In
values: ["on-demand"]
- key: karpenter.azure.com/sku-family
operator: In
values: [D]
---
apiVersion: karpenter.azure.com/v1alpha2
kind: AKSNodeClass
metadata:
name: default
annotations:
kubernetes.io/description: "General purpose AKSNodeClass for running Ubuntu2204 nodes"
spec:
imageFamily: Ubuntu2204
56 changes: 56 additions & 0 deletions examples/v1/system-surge.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# This example NodePool will provision general purpose instances
---
apiVersion: karpenter.sh/v1
kind: NodePool
metadata:
name: system-surge
annotations:
kubernetes.io/description: "System NodePool (surge capacity)"
spec:
disruption:
consolidateAfter: 0s
budgets:
- nodes: 30%
template:
metadata:
labels:
kubernetes.azure.com/mode: "system"
# required for Karpenter to predict overhead from cilium DaemonSet
kubernetes.azure.com/ebpf-dataplane: cilium
spec:
nodeClassRef:
group: karpenter.azure.com
kind: AKSNodeClass
name: default
startupTaints:
# https://karpenter.sh/docs/concepts/nodepools/#cilium-startup-taint
- key: node.cilium.io/agent-not-ready
effect: NoExecute
value: "true"
taints:
- key: CriticalAddonsOnly
effect: NoSchedule
value: "true"
expireAfter: Never
requirements:
- key: kubernetes.io/arch
operator: In
values: ["amd64"]
- key: kubernetes.io/os
operator: In
values: ["linux"]
- key: karpenter.sh/capacity-type
operator: In
values: ["on-demand"]
- key: karpenter.azure.com/sku-family
operator: In
values: [D]
---
apiVersion: karpenter.azure.com/v1alpha2
kind: AKSNodeClass
metadata:
name: system-surge
annotations:
kubernetes.io/description: "General purpose AKSNodeClass for running Ubuntu2204 nodes"
spec:
imageFamily: Ubuntu2204

0 comments on commit 7254363

Please sign in to comment.