@@ -36,6 +36,8 @@ const (
36
36
scaleDownDelayAfterAddFlag = "scale-down-delay-after-add"
37
37
scaleDownDelayAfterDeleteFlag = "scale-down-delay-after-delete"
38
38
scaleDownDelayAfterFailureFlag = "scale-down-delay-after-failure"
39
+
40
+ classicOnlyHelpMsg = "Only supported for self-hosted (Classic) control plane clusters."
39
41
)
40
42
41
43
type AutoscalerArgs struct {
@@ -100,22 +102,24 @@ func AddClusterAutoscalerFlags(cmd *cobra.Command, prefix string) *AutoscalerArg
100
102
& args .BalanceSimilarNodeGroups ,
101
103
fmt .Sprintf ("%s%s" , prefix , balanceSimilarNodeGroupsFlag ),
102
104
false ,
103
- "Identify node groups with the same instance type and label set, " +
104
- "and aim to balance respective sizes of those node groups." ,
105
+ fmt . Sprintf ( "Identify node groups with the same instance type and label set, " +
106
+ "and aim to balance respective sizes of those node groups. %s" , classicOnlyHelpMsg ) ,
105
107
)
106
108
107
109
cmd .Flags ().BoolVar (
108
110
& args .SkipNodesWithLocalStorage ,
109
111
fmt .Sprintf ("%s%s" , prefix , skipNodesWithLocalStorageFlag ),
110
112
false ,
111
- "If true cluster autoscaler will never delete nodes with pods with local storage, e.g. EmptyDir or HostPath." ,
113
+ fmt .Sprintf ("If true cluster autoscaler will never delete nodes with pods with local storage, e.g." +
114
+ " EmptyDir or HostPath. %s" , classicOnlyHelpMsg ),
112
115
)
113
116
114
117
cmd .Flags ().IntVar (
115
118
& args .LogVerbosity ,
116
119
fmt .Sprintf ("%s%s" , prefix , logVerbosityFlag ),
117
120
1 ,
118
- "Autoscaler log level. Default is 1, 4 is a good option when trying to debug the autoscaler." ,
121
+ fmt .Sprintf ("Autoscaler log level. Default is 1, 4 is a good option when trying to debug the autoscaler." +
122
+ " %s" , classicOnlyHelpMsg ),
119
123
)
120
124
121
125
cmd .Flags ().IntVar (
@@ -137,7 +141,8 @@ func AddClusterAutoscalerFlags(cmd *cobra.Command, prefix string) *AutoscalerArg
137
141
& args .IgnoreDaemonsetsUtilization ,
138
142
fmt .Sprintf ("%s%s" , prefix , ignoreDaemonsetsUtilizationFlag ),
139
143
false ,
140
- "Should cluster-autoscaler ignore DaemonSet pods when calculating resource utilization for scaling down." ,
144
+ fmt .Sprintf ("Should cluster-autoscaler ignore DaemonSet pods when calculating resource utilization for " +
145
+ "scaling down. %s" , classicOnlyHelpMsg ),
141
146
)
142
147
143
148
cmd .Flags ().StringVar (
@@ -152,7 +157,8 @@ func AddClusterAutoscalerFlags(cmd *cobra.Command, prefix string) *AutoscalerArg
152
157
& args .BalancingIgnoredLabels ,
153
158
fmt .Sprintf ("%s%s" , prefix , balancingIgnoredLabelsFlag ),
154
159
nil ,
155
- "A comma-separated list of label keys that cluster autoscaler should ignore when considering node group similarity." ,
160
+ fmt .Sprintf ("A comma-separated list of label keys that cluster autoscaler should ignore when " +
161
+ "considering node group similarity. %s" , classicOnlyHelpMsg ),
156
162
)
157
163
158
164
// Resource Limits
@@ -168,14 +174,14 @@ func AddClusterAutoscalerFlags(cmd *cobra.Command, prefix string) *AutoscalerArg
168
174
& args .ResourceLimits .Cores .Min ,
169
175
fmt .Sprintf ("%s%s" , prefix , minCoresFlag ),
170
176
0 ,
171
- "Minimum limit for the amount of cores to deploy in the cluster." ,
177
+ fmt . Sprintf ( "Minimum limit for the amount of cores to deploy in the cluster. %s" , classicOnlyHelpMsg ) ,
172
178
)
173
179
174
180
cmd .Flags ().IntVar (
175
181
& args .ResourceLimits .Cores .Max ,
176
182
fmt .Sprintf ("%s%s" , prefix , maxCoresFlag ),
177
183
180 * 64 ,
178
- "Maximum limit for the amount of cores to deploy in the cluster." ,
184
+ fmt . Sprintf ( "Maximum limit for the amount of cores to deploy in the cluster. %s" , classicOnlyHelpMsg ) ,
179
185
)
180
186
181
187
cmd .MarkFlagsRequiredTogether (
@@ -187,14 +193,14 @@ func AddClusterAutoscalerFlags(cmd *cobra.Command, prefix string) *AutoscalerArg
187
193
& args .ResourceLimits .Memory .Min ,
188
194
fmt .Sprintf ("%s%s" , prefix , minMemoryFlag ),
189
195
0 ,
190
- "Minimum limit for the amount of memory, in GiB, in the cluster." ,
196
+ fmt . Sprintf ( "Minimum limit for the amount of memory, in GiB, in the cluster. %s" , classicOnlyHelpMsg ) ,
191
197
)
192
198
193
199
cmd .Flags ().IntVar (
194
200
& args .ResourceLimits .Memory .Max ,
195
201
fmt .Sprintf ("%s%s" , prefix , maxMemoryFlag ),
196
202
180 * 64 * 20 ,
197
- "Maximum limit for the amount of memory, in GiB, in the cluster." ,
203
+ fmt . Sprintf ( "Maximum limit for the amount of memory, in GiB, in the cluster. %s" , classicOnlyHelpMsg ) ,
198
204
)
199
205
200
206
cmd .MarkFlagsRequiredTogether (
@@ -211,8 +217,9 @@ func AddClusterAutoscalerFlags(cmd *cobra.Command, prefix string) *AutoscalerArg
211
217
"Limit GPUs consumption. It should be comprised of 3 values separated " +
212
218
"with commas: the GPU hardware type, a minimal count for that type " +
213
219
"and a maximal count for that type. This option can be repeated multiple " +
214
- "times in order to apply multiple restrictions for different GPU types. For example: " +
215
- "--%[1]s nvidia.com/gpu,0,10 --%[1]s amd.com/gpu,1,5" , flag ),
220
+ "times in order to apply multiple restrictions for different GPU types. " +
221
+ "Only supported for self-hosted (Classic) control plane clusters. " +
222
+ "For example: --%[1]s nvidia.com/gpu,0,10 --%[1]s amd.com/gpu,1,5" , flag ),
216
223
)
217
224
218
225
// Scale down Configuration
@@ -221,44 +228,48 @@ func AddClusterAutoscalerFlags(cmd *cobra.Command, prefix string) *AutoscalerArg
221
228
& args .ScaleDown .Enabled ,
222
229
fmt .Sprintf ("%s%s" , prefix , scaleDownEnabledFlag ),
223
230
false ,
224
- "Should cluster-autoscaler be able to scale down the cluster." ,
231
+ fmt . Sprintf ( "Should cluster-autoscaler be able to scale down the cluster. %s" , classicOnlyHelpMsg ) ,
225
232
)
226
233
227
234
cmd .Flags ().StringVar (
228
235
& args .ScaleDown .UnneededTime ,
229
236
fmt .Sprintf ("%s%s" , prefix , scaleDownUnneededTimeFlag ),
230
237
"" ,
231
- "Increasing value will make nodes stay up longer, waiting for pods to be scheduled " +
232
- "while decreasing value will make nodes be deleted sooner." ,
238
+ fmt . Sprintf ( "Increasing value will make nodes stay up longer, waiting for pods to be scheduled " +
239
+ "while decreasing value will make nodes be deleted sooner. %s" , classicOnlyHelpMsg ) ,
233
240
)
234
241
235
242
cmd .Flags ().Float64Var (
236
243
& args .ScaleDown .UtilizationThreshold ,
237
244
fmt .Sprintf ("%s%s" , prefix , scaleDownUtilizationThresholdFlag ),
238
245
0.5 ,
239
- "Node utilization level, defined as sum of requested resources divided by capacity, " +
240
- "below which a node can be considered for scale down. Value should be between 0 and 1." ,
246
+ fmt .Sprintf ("Node utilization level, defined as sum of requested resources divided by capacity, " +
247
+ "below which a node can be considered for scale down. Value should be between 0 and 1. %s" ,
248
+ classicOnlyHelpMsg ),
241
249
)
242
250
243
251
cmd .Flags ().StringVar (
244
252
& args .ScaleDown .DelayAfterAdd ,
245
253
fmt .Sprintf ("%s%s" , prefix , scaleDownDelayAfterAddFlag ),
246
254
"" ,
247
- "After a scale-up, consider scaling down only after this amount of time." ,
255
+ fmt .Sprintf ("After a scale-up, consider scaling down only after this amount of time. %s" ,
256
+ classicOnlyHelpMsg ),
248
257
)
249
258
250
259
cmd .Flags ().StringVar (
251
260
& args .ScaleDown .DelayAfterDelete ,
252
261
fmt .Sprintf ("%s%s" , prefix , scaleDownDelayAfterDeleteFlag ),
253
262
"" ,
254
- "After a scale-down, consider scaling down again only after this amount of time." ,
263
+ fmt .Sprintf ("After a scale-down, consider scaling down again only after this amount of time. %s" ,
264
+ classicOnlyHelpMsg ),
255
265
)
256
266
257
267
cmd .Flags ().StringVar (
258
268
& args .ScaleDown .DelayAfterFailure ,
259
269
fmt .Sprintf ("%s%s" , prefix , scaleDownDelayAfterFailureFlag ),
260
270
"" ,
261
- "After a failing scale-down, consider scaling down again only after this amount of time." ,
271
+ fmt .Sprintf ("After a failing scale-down, consider scaling down again only after this amount of time. %s" ,
272
+ classicOnlyHelpMsg ),
262
273
)
263
274
264
275
return args
0 commit comments