Skip to content

Commit

Permalink
Karpenter Upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
msfidelis committed Oct 11, 2024
1 parent 2ab9fa9 commit a5d55ef
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 18 deletions.
3 changes: 1 addition & 2 deletions helm/karpenter/templates/node-pool.yaml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ kind: NodePool
metadata:
name: ${EKS_CLUSTER}-nodepool
spec:
ttlSecondsAfterEmpty: 30
disruption:
consolidationPolicy: WhenEmptyOrUnderutilized
consolidateAfter: Never
Expand Down Expand Up @@ -53,4 +52,4 @@ spec:
nodeClassRef:
group: karpenter.k8s.aws
kind: EC2NodeClass
name: ${EKS_CLUSTER}
name: ${EKS_CLUSTER}-nodeclass
16 changes: 3 additions & 13 deletions iam_karpenter.tf
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,15 @@ data "aws_iam_policy_document" "karpenter_policy" {
"ec2:DescribeInstances",
"ec2:DescribeSecurityGroups",
"ec2:DescribeSubnets",
"ec2:DescribeImages",
"ec2:DescribeInstanceTypes",
"ec2:DescribeInstanceTypeOfferings",
"ec2:DescribeAvailabilityZones",
"ec2:DescribeSpotPriceHistory",
"pricing:GetProducts",
"ec2:RunInstances",
"ec2:TerminateInstances",
"ec2:DeleteLaunchTemplate",
"ssm:GetParameter",
"iam:PassRole"
]
Expand All @@ -55,19 +58,6 @@ data "aws_iam_policy_document" "karpenter_policy" {

}

statement {

effect = "Allow"
actions = [
"ec2:TerminateInstances",
"ec2:DeleteLaunchTemplate",
]

resources = [
"*"
]

}

}

Expand Down
1 change: 1 addition & 0 deletions provider.tf
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,5 @@ provider "kubectl" {
host = aws_eks_cluster.main.endpoint
cluster_ca_certificate = base64decode(aws_eks_cluster.main.certificate_authority.0.data)
token = data.aws_eks_cluster_auth.default.token
apply_retry_count = 15
}
6 changes: 3 additions & 3 deletions samples/chip/chip-istio.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ metadata:
name: chip
namespace: chip
spec:
replicas: 2
replicas: 200
selector:
matchLabels:
app: chip
Expand Down Expand Up @@ -94,8 +94,8 @@ metadata:
name: chip
namespace: chip
spec:
maxReplicas: 10
minReplicas: 2
maxReplicas: 1000
minReplicas: 200
metrics:
- type: Resource
resource:
Expand Down

0 comments on commit a5d55ef

Please sign in to comment.