@@ -59,7 +59,7 @@ privateCluster:
59
59
- " autoscaling"
60
60
- " logs"
61
61
62
- nodeGroups :
62
+ managedNodeGroups :
63
63
- name : workspaces
64
64
desiredCapacity : 1
65
65
minSize : 1
@@ -78,28 +78,10 @@ nodeGroups:
78
78
# https://eksctl.io/usage/vpc-networking/#use-private-subnets-for-initial-nodegroup
79
79
privateNetworking : true
80
80
ami : ami-0ea449d16eb31a003
81
- amiFamily : Ubuntu2004
82
- asgMetricsCollection : &asgMetricsCollection
83
- - granularity : 1Minute
84
- metrics :
85
- - GroupMinSize
86
- - GroupMaxSize
87
- - GroupDesiredCapacity
88
- - GroupInServiceInstances
89
- - GroupPendingInstances
90
- - GroupStandbyInstances
91
- - GroupTerminatingInstances
92
- - GroupTotalInstances
93
- ssh :
94
- enableSsm : true
95
- taints :
96
- dedicated : workspaces:NoSchedule
97
81
tags :
98
82
# EC2 tags required for cluster-autoscaler auto-discovery
99
83
k8s.io/cluster-autoscaler/enabled : " true"
100
84
k8s.io/cluster-autoscaler/gitpod : " owned"
101
- k8s.io/cluster-autoscaler/node-template/label/lifecycle : OnDemand
102
- k8s.io/cluster-autoscaler/node-template/label/aws.amazon.com/spot : " true"
103
85
k8s.io/cluster-autoscaler/node-template/label/purpose : workspaces
104
86
k8s.io/cluster-autoscaler/node-template/taint/dedicated : " workspaces:NoSchedule"
105
87
iam :
@@ -120,33 +102,22 @@ nodeGroups:
120
102
overrideBootstrapCommand : |
121
103
#!/bin/bash
122
104
123
- export AMI=ami-0ea449d16eb31a003
124
105
export CLUSTERNAME=gitpod
125
106
export NODEGROUP=workspaces
126
107
127
108
declare -a LABELS=(
128
- alpha.eksctl.io/cluster-name="${CLUSTERNAME}"
129
- alpha.eksctl.io/nodegroup-name="${NODEGROUP}"
130
- eks.amazonaws.com/capacityType=ON_DEMAND
131
109
eks.amazonaws.com/nodegroup="${NODEGROUP}"
132
- eks.amazonaws.com/nodegroup-image="${AMI}"
133
- alpha.eksctl.io/nodegroup-type=unmanaged
134
110
purpose="${NODEGROUP}"
135
111
)
136
112
137
113
export USE_MAX_PODS=false
138
114
export KUBELET_EXTRA_ARGS="$(printf -- "--max-pods=110 --node-labels=%s" $(IFS=$','; echo "${LABELS[*]}"))"
139
115
/etc/eks/bootstrap.sh ${CLUSTERNAME}
140
116
141
- # disabled when using spot instances
142
- # instanceType: r5n.xlarge
143
- # Spot instances documentation https://eksctl.io/usage/spot-instances/
144
- instancesDistribution :
145
- instanceTypes : ["r5n.xlarge","r5n.2xlarge"]
146
- maxPrice : 0.15
147
- onDemandBaseCapacity : 0
148
- onDemandPercentageAboveBaseCapacity : 0
149
- spotInstancePools : 1
117
+ instanceTypes : [r5n.xlarge, r5n.2xlarge]
118
+ # Create a spot nodegroup
119
+ # Please change to false for production
120
+ spot : true
150
121
151
122
- name : services
152
123
desiredCapacity : 1
@@ -166,20 +137,11 @@ nodeGroups:
166
137
# https://eksctl.io/usage/vpc-networking/#use-private-subnets-for-initial-nodegroup
167
138
privateNetworking : true
168
139
ami : ami-0ea449d16eb31a003
169
- amiFamily : Ubuntu2004
170
- asgMetricsCollection : *asgMetricsCollection
171
- ssh :
172
- enableSsm : true
173
- # taints:
174
- # dedicated: services:NoSchedule
175
140
tags :
176
141
# EC2 tags required for cluster-autoscaler auto-discovery
177
142
k8s.io/cluster-autoscaler/enabled : " true"
178
143
k8s.io/cluster-autoscaler/gitpod : " owned"
179
- k8s.io/cluster-autoscaler/node-template/label/lifecycle : OnDemand
180
- k8s.io/cluster-autoscaler/node-template/label/aws.amazon.com/spot : " true"
181
144
k8s.io/cluster-autoscaler/node-template/label/purpose : services
182
- # k8s.io/cluster-autoscaler/node-template/taint/dedicated: "services:NoSchedule"
183
145
iam :
184
146
attachPolicyARNs : *attachPolicyARNs
185
147
withAddonPolicies : *withAddonPolicies
@@ -188,30 +150,19 @@ nodeGroups:
188
150
overrideBootstrapCommand : |
189
151
#!/bin/bash
190
152
191
- export AMI=ami-0ea449d16eb31a003
192
153
export CLUSTERNAME=gitpod
193
154
export NODEGROUP=services
194
155
195
156
declare -a LABELS=(
196
- alpha.eksctl.io/cluster-name="${CLUSTERNAME}"
197
- alpha.eksctl.io/nodegroup-name="${NODEGROUP}"
198
- eks.amazonaws.com/capacityType=ON_DEMAND
199
157
eks.amazonaws.com/nodegroup="${NODEGROUP}"
200
- eks.amazonaws.com/nodegroup-image="${AMI}"
201
- alpha.eksctl.io/nodegroup-type=unmanaged
202
158
purpose="${NODEGROUP}"
203
159
)
204
160
205
161
export USE_MAX_PODS=false
206
162
export KUBELET_EXTRA_ARGS="$(printf -- "--max-pods=110 --node-labels=%s" $(IFS=$','; echo "${LABELS[*]}"))"
207
163
/etc/eks/bootstrap.sh ${CLUSTERNAME}
208
164
209
- # disabled when using spot instances
210
- # instanceType: r5n.xlarge
211
- # Spot instances documentation https://eksctl.io/usage/spot-instances/
212
- instancesDistribution :
213
- maxPrice : 0.15
214
- instanceTypes : ["r5n.xlarge","r5n.2xlarge"]
215
- onDemandBaseCapacity : 0
216
- onDemandPercentageAboveBaseCapacity : 0
217
- spotInstancePools : 1
165
+ instanceTypes : [r5n.xlarge, r5n.2xlarge]
166
+ # Create a spot nodegroup
167
+ # Please change to false for production
168
+ spot : true
0 commit comments