File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
cluster/node-pools/worker-karpenter Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -124,7 +124,7 @@ spec:
124
124
# {{ end}}
125
125
#{{ end}}
126
126
127
- #{{ if and (eq (len .NodePool.InstanceTypes) 1) (eq (index .NodePool.InstanceTypes 0) "default-for-karpenter") }}
127
+ #{{ if (eq .NodePool.KarpenterInstanceTypeStrategy "default-for-karpenter" ) }}
128
128
- key : " karpenter.k8s.aws/instance-family"
129
129
operator : In
130
130
values :
@@ -155,7 +155,7 @@ spec:
155
155
- " c7in"
156
156
- " m7in"
157
157
- " r7in"
158
- #{{ else if (gt (len .NodePool.InstanceTypes) 0 ) }}
158
+ #{{ else if (eq .NodePool.KarpenterInstanceTypeStrategy "custom" ) }}
159
159
- key : " node.kubernetes.io/instance-type"
160
160
operator : In
161
161
values :
@@ -165,7 +165,7 @@ spec:
165
165
#{{ end }}
166
166
167
167
# safety guards to prevent the use of unwanted instance types in case the user has not specified any specific instance types
168
- #{{ if or (eq .NodePool.KarpenterInstanceTypeStrategy "default-for-karpenter") (eq .NodePool.KarpenterInstanceTypeStrategy "not-specified") }}
168
+ #{{ if ne .NodePool.KarpenterInstanceTypeStrategy "custom" }}
169
169
# exclude unwanted sizes
170
170
- key : " karpenter.k8s.aws/instance-size"
171
171
operator : " NotIn"
You can’t perform that action at this time.
0 commit comments