Skip to content

Commit

Permalink
prepare example and final version and small dashboard update
Browse files Browse the repository at this point in the history
  • Loading branch information
nadavbuc committed Apr 15, 2024
1 parent 18de5e9 commit 3462495
Show file tree
Hide file tree
Showing 9 changed files with 2,250 additions and 126 deletions.
2 changes: 1 addition & 1 deletion charts/karpenter_nodes/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: karpenter_nodes
version: 0.1.2
version: 1.0.0
description: A Helm chart for generating NodeClasses and NodePools for Karpenter
maintainers:
- name: nadavbuc
22 changes: 22 additions & 0 deletions charts/karpenter_nodes/examples/argocd_example.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: karpenter-nodes
namespace: argocd
spec:
project: infra
sources:
- repoURL: 'https://opensource.fiverr.com/public_charts/'
chart: karpenter_nodes
targetRevision: 1.0.0
helm:
valueFiles:
- $values/karpenter_nodes/eks-dev/common.yaml
- $values/karpenter_nodes/eks-dev/nodegroups.yaml
- $values/karpenter_nodes/eks-dev/userdata.yaml
- repoURL: https://github.com/my_values_repo.git
targetRevision: HEAD
ref: values
destination:
server: https://kubernetes
73 changes: 73 additions & 0 deletions charts/karpenter_nodes/examples/common.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
clusterName: "eks-dev"

subnetSelectorTerms:
- tags:
Name: eks-dev-eu-west-1a
- tags:
Name: eks-dev-eu-west-1b
- tags:
Name: eks-dev-eu-west-1c

securityGroupSelectorTerms:
- tags:
Name: eks-nodes
- tags:
Name: eks-dev

availabilityZones:
- eu-west-1a
- eu-west-1b
- eu-west-1c

excludeInstanceSize:
- metal

blockDeviceMappings:
- deviceName: /dev/xvda
ebs:
volumeSize: 100Gi
volumeType: gp3
encrypted: true
deleteOnTermination: true
iops: 3000
throughput: 125

instances:
minGeneration: 4
architecture: "amd64"
categories:
- m
- r
- c
cores:
- "4"
- "8"
- "12"
- "16"
- "24"
- "32"
- "48"
capacityType:
- spot


nodeTags:
team: devops
component: eks-karpenter-nodes
created_by: helm

amiFamily: AL2

excludeFamilies:
- c6a
- m6a
- r6a
- c5a
- m5a
- r5a
- c6ad
- m6ad
- r6ad
- m5ad
- r5ad
- r5ad
127 changes: 127 additions & 0 deletions charts/karpenter_nodes/examples/nodegroups.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
nodeGroups:
nodes-default:
weight: 2
instances:
categories:
- m
- r
capacitySpread:
start: 1
end: 5
nodes-default-od:
nodeGroupLabel: nodes-default
capacitySpread:
start: 6
end: 6
instances:
minGeneration: 5
categories:
- m
- r
capacityType:
- on-demand
nodeClassRef:
name: nodes-default-amd64
nodes-workers:
weight: 2
instances:
categories:
- m
- r
capacitySpread:
start: 1
end: 5
taints:
- key: "dedicated"
value: "workers"
effect: "NoSchedule"
nodes-workers-c:
nodeGroupLabel: nodes-workers
capacitySpread:
start: 1
end: 5
instances:
categories:
- c
taints:
- key: "dedicated"
value: "workers"
effect: "NoSchedule"
nodeClassRef:
name: nodes-workers-amd64
nodes-canary:
instances: {}
capacitySpread:
start: 1
end: 5
taints:
- key: "dedicated"
value: "canary"
effect: "NoSchedule"
nodes-jobs:
expireAfter: "Never"
instances:
capacityType:
- on-demand
consolidationPolicy: "WhenEmpty"
taints:
- key: "dedicated"
value: "jobs"
effect: "NoSchedule"
blockDeviceMappings:
- deviceName: /dev/xvda
ebs:
deleteOnTermination: true
encrypted: true
iops: 9000
throughput: 125
volumeSize: 500Gi
volumeType: gp3
nodes-ingress:
registryCache: "false"
expireAfter: "Never"
instances:
architecture: "multiarch"
capacityType:
- on-demand
taints:
- key: "dedicated"
value: "ingress"
effect: "NoSchedule"
nodes-monitoring:
labels:
prometheus-scrape: "true" #Not Real Use-case
additionalNodeTags:
innercomponent: monitoring
expireAfter: "Never"
instances:
architecture: "multiarch"
capacityType:
- on-demand
taints:
- key: "dedicated"
value: "monitoring"
effect: "NoSchedule"
excludeFamilies:
- x1 #We dont have X in our types but i do want it to not exclude previously defined amd instances
nodes-gpu:
labels:
gpu: "true"
instances:
instanceTypes:
- g5.xlarge
- g5.2xlarge
- g5.4xlarge
categories:
- g
limits:
cpu: "128"
taints:
- key: "dedicated"
value: "gpu"
effect: "NoSchedule"





Loading

0 comments on commit 3462495

Please sign in to comment.