Skip to content

Commit

Permalink
fix: Error for KubeletConfiguration
Browse files Browse the repository at this point in the history
fix to add Error for KubeletConfiguration that isnt suported for
AMIFamily
Fixes aws/karpenter/aws#3722
  • Loading branch information
Minjia Chen committed Apr 8, 2023
1 parent 629859c commit a2ce712
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/providers/amifamily/bootstrap/bottlerocket.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ func (b Bottlerocket) Script() (string, error) {
if b.KubeletConfig.ImageGCLowThresholdPercent != nil {
s.Settings.Kubernetes.ImageGCLowThresholdPercent = lo.ToPtr(strconv.FormatInt(int64(*b.KubeletConfig.ImageGCLowThresholdPercent), 10))
}
if b.KubeletConfig.PodsPerCore != nil {
return "", fmt.Errorf("invalid kubelet config: Bottlerocket AMIFamily currently does not support podsPerCore configuration")
}
}

s.Settings.Kubernetes.NodeTaints = map[string][]string{}
Expand Down

0 comments on commit a2ce712

Please sign in to comment.