-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Karpenter 0.3.0 Modifications (#270)
* Added new code for Karpenter 0.3.0 including new chart version, interruptionQueue parameter, modified README, modified template yaml Signed-off-by: Hitesh Makol <[email protected]> * Fixed Linting for Chart.yaml Signed-off-by: Hitesh Makol <[email protected]> * Fixed CI steps for testing chart Signed-off-by: Abhishek Dubey <[email protected]> * Fixed CI steps for testing chart Signed-off-by: Abhishek Dubey <[email protected]> --------- Signed-off-by: Hitesh Makol <[email protected]> Signed-off-by: Abhishek Dubey <[email protected]> Co-authored-by: Abhishek Dubey <[email protected]>
- Loading branch information
1 parent
d03ba9f
commit eaa6fc3
Showing
7 changed files
with
96 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
apiVersion: v2 | ||
name: ot-karpenter | ||
version: 0.2.0 | ||
version: 0.3.0 | ||
maintainers: | ||
- name: opstree | ||
dependencies: | ||
- name: karpenter | ||
version: 1.1.1 | ||
version: 1.1.1 | ||
repository: oci://public.ecr.aws/karpenter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{{- range .Values.ec2NodeClasses }} | ||
apiVersion: karpenter.k8s.aws/v1 | ||
kind: EC2NodeClass | ||
metadata: | ||
name: {{ .name }} | ||
spec: | ||
amiFamily: {{ .amiFamily | default "AL2" }} | ||
role: {{ .role }} | ||
{{- if .detailedMonitoring }} | ||
detailedMonitoring: {{ .detailedMonitoring }} | ||
{{- end }} | ||
subnetSelectorTerms: | ||
- tags: | ||
karpenter.sh/discovery: "{{ $.Values.clusterName }}" | ||
securityGroupSelectorTerms: | ||
- tags: | ||
karpenter.sh/discovery: "{{ $.Values.clusterName }}" | ||
amiSelectorTerms: | ||
- id: "{{ .amiSelector.arm }}" | ||
- id: "{{ .amiSelector.amd }}" | ||
{{- if .amiSelector.gpu }} | ||
- id: "{{ .amiSelector.gpu }}" | ||
{{- end }} | ||
{{- if .amiSelector.name }} | ||
- name: "{{ .amiSelector.name }}" | ||
{{- end }} | ||
{{- if .tags }} | ||
tags: | ||
{{- range $key, $value := .tags }} | ||
{{ $key }}: "{{ $value }}" | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,25 @@ | ||
# Custom values for your chart | ||
clusterName: "" # Name of the EKS cluster (for identification in the chart and Karpenter) | ||
awsPartition: "" # AWS partition, default is 'aws' (used in multi-region or partitioned environments) | ||
awsAccountId: 3333 # AWS account ID where the resources will be provisioned | ||
# Name of the EKS cluster (for identification in the chart and Karpenter) | ||
clusterName: "" | ||
# AWS partition, default is 'aws' (used in multi-region or partitioned environments) | ||
awsPartition: "" | ||
# AWS account ID where the resources will be provisioned | ||
awsAccountId: 3333 | ||
|
||
# Karpenter chart overrides | ||
karpenter: | ||
settings: | ||
clusterName: "" # Cluster name for the Karpenter controller to identify and manage nodes in this cluster | ||
# Cluster name for the Karpenter controller to identify and manage nodes in this cluster | ||
clusterName: "" | ||
# Name of SQS queue for handling EC2 instance interruptions | ||
# interruptionQueue: "" | ||
|
||
serviceAccount: | ||
annotations: | ||
eks.amazonaws.com/role-arn: #arn:aws:iam::3333:role/KarpenterControllerRole-demo-eks # IAM role ARN for Karpenter controller's access to AWS services | ||
# IAM role ARN for Karpenter controller's access to AWS services | ||
eks.amazonaws.com/role-arn: arn:aws:iam::3333:role/KarpenterControllerRole-demo-eks | ||
|
||
# Karpenter controller resources can be customized in this section below | ||
# Karpenter controller resources can be customized in this section below | ||
# controller: | ||
# resources: | ||
# requests: | ||
|
@@ -22,6 +29,31 @@ karpenter: | |
# cpu: "1" # CPU resource limit for the Karpenter controller (maximum resources Karpenter can consume) | ||
# memory: "1Gi" # Memory resource limit for the Karpenter controller | ||
|
||
# EC2NodeClasses define the EC2 instance classes that Karpenter can use | ||
ec2NodeClasses: | ||
- name: default | ||
# Amazon Linux 2 AMI family | ||
amiFamily: AL2 | ||
# "KarpenterNodeRole-my-eks-cluster" # Name of karpenter Node Role ( NOT THE ARN ) | ||
role: | ||
amiSelector: | ||
# To get the AMI ID, run the commands below in the AWS CLI and replace the AMI ID in the values.yaml file | ||
# ARM_AMI_ID="$(aws ssm get-parameter --name /aws/service/eks/optimized-ami/${K8S_VERSION}/amazon-linux-2-arm64/recommended/image_id --query Parameter.Value --output text)" | ||
arm: | ||
# AMD_AMI_ID="$(aws ssm get-parameter --name /aws/service/eks/optimized-ami/${K8S_VERSION}/amazon-linux-2/recommended/image_id --query Parameter.Value --output text)" | ||
amd: | ||
# GPU_AMI_ID="$(aws ssm get-parameter --name /aws/service/eks/optimized-ami/${K8S_VERSION}/amazon-linux-2-gpu/recommended/image_id --query Parameter.Value --output text)" | ||
# gpu: ami-gpu-id | ||
# amazon-eks-node-1.27-* # Optional: EKS Node AMI Name | ||
# name: | ||
# Optional, propagates tags to underlying EC2 resources | ||
# tags: | ||
# environment: production | ||
# team: "engineering" | ||
# owner: "[email protected]" | ||
# Enable detailed monitoring for the EC2 instance | ||
# detailedMonitoring: true | ||
|
||
# NodePools define groups of nodes with specific requirements | ||
nodePools: | ||
- name: default # Name of the node pool, preset here is set to default nodepool | ||
|
@@ -37,13 +69,17 @@ nodePools: | |
- key: karpenter.sh/capacity-type # Defines the instance's capacity type | ||
operator: In # Only nodes with the specified capacity type will be selected | ||
values: | ||
- "on-demand" # Specifies that the node should be an on-demand instance, can be "spot" as well | ||
- "on-demand" # Specifies that the node should be an on-demand instance, can be "spot" as well | ||
- key: karpenter.k8s.aws/instance-category # Defines the instance category (e.g., t, m, r) | ||
operator: In # Only nodes with the specified instance category will be selected | ||
values: | ||
- "t" # These can be customized as per need | ||
- "m" | ||
- "r" | ||
- "t" # These can be customized as per need | ||
- "m" | ||
- "r" | ||
# - key: karpenter.k8s.aws/instance-family # Uncomment to define the instance family (e.g., t3, m5, r5) | ||
# operator: In | ||
# values: | ||
# - "t3a" | ||
- key: karpenter.k8s.aws/instance-generation # Instance generation requirement | ||
operator: Gt # Greater than the specified value | ||
values: | ||
|
@@ -55,20 +91,20 @@ nodePools: | |
expireAfter: 720h # Maximum lifetime of the node pool before it expires (720 hours = 30 days) | ||
limits: # Resource limits for the node pool | ||
cpu: "1000" # Maximum CPU limit for the node pool | ||
#memory: "1Gi" | ||
memory: "1Gi" | ||
disruption: # Policy for handling disruption in the node pool | ||
consolidationPolicy: WhenEmptyOrUnderutilized # Consolidate nodes when they are empty or underutilized | ||
consolidateAfter: 1m # Time after which consolidation will occur, in this case, 1 minute | ||
#Uncomment Below annotations key ( next 3 Lines ) if you want to use annotations | ||
# Uncomment Below annotations key ( next 3 Lines ) if you want to use annotations | ||
# annotations: # Annotations are key-value pairs that provide additional metadata for the node pool | ||
# example.com/owner: "my-team" # An example annotation that associates the node pool with a team | ||
# example.com/maintainer: "[email protected]" # Example annotation for the maintainer's contact information | ||
#Uncomment below taint key ( next 4 Lines ) if you want to use taints | ||
# Uncomment below taint key ( next 4 Lines ) if you want to use taints | ||
# taints: # Taints are used to control which pods can be scheduled on the node pool | ||
# - key: "example.com/special-taint" # Taint key that identifies the taint | ||
# value: "special-value" # Value associated with the taint | ||
# effect: "NoExecute" # Effect of the taint. In this case, NoExecute means pods won't be scheduled on tainted nodes | ||
# Comment Labels Key below if you dont want to use Labels | ||
# Comment Labels Key below if you dont want to use Labels | ||
labels: # Labels are key-value pairs used for categorizing the node pool | ||
environment: production # Label indicating that this node pool is for production use | ||
team: "engineering" # Label associating the node pool with the engineering team |