generated from crossplane/upjet-provider-template
/
zz_nodetemplate_types.go
executable file
·613 lines (438 loc) · 29.5 KB
/
zz_nodetemplate_types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
// SPDX-FileCopyrightText: 2023 The Crossplane Authors <https://crossplane.io>
//
// SPDX-License-Identifier: Apache-2.0
/*
Copyright 2022 Upbound Inc.
*/
// Code generated by upjet. DO NOT EDIT.
package v1alpha1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime/schema"
v1 "github.com/crossplane/crossplane-runtime/apis/common/v1"
)
type ConstraintsInitParameters struct {
// List of acceptable instance CPU architectures, the default is amd64. Allowed values: amd64, arm64.
Architectures []*string `json:"architectures,omitempty" tf:"architectures,omitempty"`
// Compute optimized instance constraint - will only pick compute optimized nodes if true.
ComputeOptimized *bool `json:"computeOptimized,omitempty" tf:"compute_optimized,omitempty"`
CustomPriority []CustomPriorityInitParameters `json:"customPriority,omitempty" tf:"custom_priority,omitempty"`
// Enable/disable spot diversity policy. When enabled, autoscaler will try to balance between diverse and cost optimal instance types.
EnableSpotDiversity *bool `json:"enableSpotDiversity,omitempty" tf:"enable_spot_diversity,omitempty"`
// Fallback restore rate in seconds: defines how much time should pass before spot fallback should be attempted to be restored to real spot.
FallbackRestoreRateSeconds *float64 `json:"fallbackRestoreRateSeconds,omitempty" tf:"fallback_restore_rate_seconds,omitempty"`
Gpu []GpuInitParameters `json:"gpu,omitempty" tf:"gpu,omitempty"`
InstanceFamilies []InstanceFamiliesInitParameters `json:"instanceFamilies,omitempty" tf:"instance_families,omitempty"`
// GPU instance constraint - will only pick nodes with GPU if true
IsGpuOnly *bool `json:"isGpuOnly,omitempty" tf:"is_gpu_only,omitempty"`
// Max CPU cores per node.
MaxCPU *float64 `json:"maxCpu,omitempty" tf:"max_cpu,omitempty"`
// Max Memory (Mib) per node.
MaxMemory *float64 `json:"maxMemory,omitempty" tf:"max_memory,omitempty"`
// Min CPU cores per node.
MinCPU *float64 `json:"minCpu,omitempty" tf:"min_cpu,omitempty"`
// Min Memory (Mib) per node.
MinMemory *float64 `json:"minMemory,omitempty" tf:"min_memory,omitempty"`
// Should include on-demand instances in the considered pool.
OnDemand *bool `json:"onDemand,omitempty" tf:"on_demand,omitempty"`
// List of acceptable instance Operating Systems, the default is linux. Allowed values: linux, windows.
Os []*string `json:"os,omitempty" tf:"os,omitempty"`
// Should include spot instances in the considered pool.
Spot *bool `json:"spot,omitempty" tf:"spot,omitempty"`
// Allowed node configuration price increase when diversifying instance types. E.g. if the value is 10%, then the overall price of diversified instance types can be 10% higher than the price of the optimal configuration.
SpotDiversityPriceIncreaseLimitPercent *float64 `json:"spotDiversityPriceIncreaseLimitPercent,omitempty" tf:"spot_diversity_price_increase_limit_percent,omitempty"`
// Enable/disable spot interruption predictions.
SpotInterruptionPredictionsEnabled *bool `json:"spotInterruptionPredictionsEnabled,omitempty" tf:"spot_interruption_predictions_enabled,omitempty"`
// Spot interruption predictions type. Can be either "aws-rebalance-recommendations" or "interruption-predictions".
SpotInterruptionPredictionsType *string `json:"spotInterruptionPredictionsType,omitempty" tf:"spot_interruption_predictions_type,omitempty"`
// Storage optimized instance constraint - will only pick storage optimized nodes if true
StorageOptimized *bool `json:"storageOptimized,omitempty" tf:"storage_optimized,omitempty"`
// Spot instance fallback constraint - when true, on-demand instances will be created, when spots are unavailable.
UseSpotFallbacks *bool `json:"useSpotFallbacks,omitempty" tf:"use_spot_fallbacks,omitempty"`
}
type ConstraintsObservation struct {
// List of acceptable instance CPU architectures, the default is amd64. Allowed values: amd64, arm64.
Architectures []*string `json:"architectures,omitempty" tf:"architectures,omitempty"`
// Compute optimized instance constraint - will only pick compute optimized nodes if true.
ComputeOptimized *bool `json:"computeOptimized,omitempty" tf:"compute_optimized,omitempty"`
CustomPriority []CustomPriorityObservation `json:"customPriority,omitempty" tf:"custom_priority,omitempty"`
// Enable/disable spot diversity policy. When enabled, autoscaler will try to balance between diverse and cost optimal instance types.
EnableSpotDiversity *bool `json:"enableSpotDiversity,omitempty" tf:"enable_spot_diversity,omitempty"`
// Fallback restore rate in seconds: defines how much time should pass before spot fallback should be attempted to be restored to real spot.
FallbackRestoreRateSeconds *float64 `json:"fallbackRestoreRateSeconds,omitempty" tf:"fallback_restore_rate_seconds,omitempty"`
Gpu []GpuObservation `json:"gpu,omitempty" tf:"gpu,omitempty"`
InstanceFamilies []InstanceFamiliesObservation `json:"instanceFamilies,omitempty" tf:"instance_families,omitempty"`
// GPU instance constraint - will only pick nodes with GPU if true
IsGpuOnly *bool `json:"isGpuOnly,omitempty" tf:"is_gpu_only,omitempty"`
// Max CPU cores per node.
MaxCPU *float64 `json:"maxCpu,omitempty" tf:"max_cpu,omitempty"`
// Max Memory (Mib) per node.
MaxMemory *float64 `json:"maxMemory,omitempty" tf:"max_memory,omitempty"`
// Min CPU cores per node.
MinCPU *float64 `json:"minCpu,omitempty" tf:"min_cpu,omitempty"`
// Min Memory (Mib) per node.
MinMemory *float64 `json:"minMemory,omitempty" tf:"min_memory,omitempty"`
// Should include on-demand instances in the considered pool.
OnDemand *bool `json:"onDemand,omitempty" tf:"on_demand,omitempty"`
// List of acceptable instance Operating Systems, the default is linux. Allowed values: linux, windows.
Os []*string `json:"os,omitempty" tf:"os,omitempty"`
// Should include spot instances in the considered pool.
Spot *bool `json:"spot,omitempty" tf:"spot,omitempty"`
// Allowed node configuration price increase when diversifying instance types. E.g. if the value is 10%, then the overall price of diversified instance types can be 10% higher than the price of the optimal configuration.
SpotDiversityPriceIncreaseLimitPercent *float64 `json:"spotDiversityPriceIncreaseLimitPercent,omitempty" tf:"spot_diversity_price_increase_limit_percent,omitempty"`
// Enable/disable spot interruption predictions.
SpotInterruptionPredictionsEnabled *bool `json:"spotInterruptionPredictionsEnabled,omitempty" tf:"spot_interruption_predictions_enabled,omitempty"`
// Spot interruption predictions type. Can be either "aws-rebalance-recommendations" or "interruption-predictions".
SpotInterruptionPredictionsType *string `json:"spotInterruptionPredictionsType,omitempty" tf:"spot_interruption_predictions_type,omitempty"`
// Storage optimized instance constraint - will only pick storage optimized nodes if true
StorageOptimized *bool `json:"storageOptimized,omitempty" tf:"storage_optimized,omitempty"`
// Spot instance fallback constraint - when true, on-demand instances will be created, when spots are unavailable.
UseSpotFallbacks *bool `json:"useSpotFallbacks,omitempty" tf:"use_spot_fallbacks,omitempty"`
}
type ConstraintsParameters struct {
// List of acceptable instance CPU architectures, the default is amd64. Allowed values: amd64, arm64.
// +kubebuilder:validation:Optional
Architectures []*string `json:"architectures,omitempty" tf:"architectures,omitempty"`
// Compute optimized instance constraint - will only pick compute optimized nodes if true.
// +kubebuilder:validation:Optional
ComputeOptimized *bool `json:"computeOptimized,omitempty" tf:"compute_optimized,omitempty"`
// +kubebuilder:validation:Optional
CustomPriority []CustomPriorityParameters `json:"customPriority,omitempty" tf:"custom_priority,omitempty"`
// Enable/disable spot diversity policy. When enabled, autoscaler will try to balance between diverse and cost optimal instance types.
// +kubebuilder:validation:Optional
EnableSpotDiversity *bool `json:"enableSpotDiversity,omitempty" tf:"enable_spot_diversity,omitempty"`
// Fallback restore rate in seconds: defines how much time should pass before spot fallback should be attempted to be restored to real spot.
// +kubebuilder:validation:Optional
FallbackRestoreRateSeconds *float64 `json:"fallbackRestoreRateSeconds,omitempty" tf:"fallback_restore_rate_seconds,omitempty"`
// +kubebuilder:validation:Optional
Gpu []GpuParameters `json:"gpu,omitempty" tf:"gpu,omitempty"`
// +kubebuilder:validation:Optional
InstanceFamilies []InstanceFamiliesParameters `json:"instanceFamilies,omitempty" tf:"instance_families,omitempty"`
// GPU instance constraint - will only pick nodes with GPU if true
// +kubebuilder:validation:Optional
IsGpuOnly *bool `json:"isGpuOnly,omitempty" tf:"is_gpu_only,omitempty"`
// Max CPU cores per node.
// +kubebuilder:validation:Optional
MaxCPU *float64 `json:"maxCpu,omitempty" tf:"max_cpu,omitempty"`
// Max Memory (Mib) per node.
// +kubebuilder:validation:Optional
MaxMemory *float64 `json:"maxMemory,omitempty" tf:"max_memory,omitempty"`
// Min CPU cores per node.
// +kubebuilder:validation:Optional
MinCPU *float64 `json:"minCpu,omitempty" tf:"min_cpu,omitempty"`
// Min Memory (Mib) per node.
// +kubebuilder:validation:Optional
MinMemory *float64 `json:"minMemory,omitempty" tf:"min_memory,omitempty"`
// Should include on-demand instances in the considered pool.
// +kubebuilder:validation:Optional
OnDemand *bool `json:"onDemand,omitempty" tf:"on_demand,omitempty"`
// List of acceptable instance Operating Systems, the default is linux. Allowed values: linux, windows.
// +kubebuilder:validation:Optional
Os []*string `json:"os,omitempty" tf:"os,omitempty"`
// Should include spot instances in the considered pool.
// +kubebuilder:validation:Optional
Spot *bool `json:"spot,omitempty" tf:"spot,omitempty"`
// Allowed node configuration price increase when diversifying instance types. E.g. if the value is 10%, then the overall price of diversified instance types can be 10% higher than the price of the optimal configuration.
// +kubebuilder:validation:Optional
SpotDiversityPriceIncreaseLimitPercent *float64 `json:"spotDiversityPriceIncreaseLimitPercent,omitempty" tf:"spot_diversity_price_increase_limit_percent,omitempty"`
// Enable/disable spot interruption predictions.
// +kubebuilder:validation:Optional
SpotInterruptionPredictionsEnabled *bool `json:"spotInterruptionPredictionsEnabled,omitempty" tf:"spot_interruption_predictions_enabled,omitempty"`
// Spot interruption predictions type. Can be either "aws-rebalance-recommendations" or "interruption-predictions".
// +kubebuilder:validation:Optional
SpotInterruptionPredictionsType *string `json:"spotInterruptionPredictionsType,omitempty" tf:"spot_interruption_predictions_type,omitempty"`
// Storage optimized instance constraint - will only pick storage optimized nodes if true
// +kubebuilder:validation:Optional
StorageOptimized *bool `json:"storageOptimized,omitempty" tf:"storage_optimized,omitempty"`
// Spot instance fallback constraint - when true, on-demand instances will be created, when spots are unavailable.
// +kubebuilder:validation:Optional
UseSpotFallbacks *bool `json:"useSpotFallbacks,omitempty" tf:"use_spot_fallbacks,omitempty"`
}
type CustomPriorityInitParameters struct {
// Instance families to prioritize in this tier.
InstanceFamilies []*string `json:"instanceFamilies,omitempty" tf:"instance_families,omitempty"`
// If true, this tier will apply to on-demand instances.
OnDemand *bool `json:"onDemand,omitempty" tf:"on_demand,omitempty"`
// If true, this tier will apply to spot instances.
Spot *bool `json:"spot,omitempty" tf:"spot,omitempty"`
}
type CustomPriorityObservation struct {
// Instance families to prioritize in this tier.
InstanceFamilies []*string `json:"instanceFamilies,omitempty" tf:"instance_families,omitempty"`
// If true, this tier will apply to on-demand instances.
OnDemand *bool `json:"onDemand,omitempty" tf:"on_demand,omitempty"`
// If true, this tier will apply to spot instances.
Spot *bool `json:"spot,omitempty" tf:"spot,omitempty"`
}
type CustomPriorityParameters struct {
// Instance families to prioritize in this tier.
// +kubebuilder:validation:Optional
InstanceFamilies []*string `json:"instanceFamilies,omitempty" tf:"instance_families,omitempty"`
// If true, this tier will apply to on-demand instances.
// +kubebuilder:validation:Optional
OnDemand *bool `json:"onDemand,omitempty" tf:"on_demand,omitempty"`
// If true, this tier will apply to spot instances.
// +kubebuilder:validation:Optional
Spot *bool `json:"spot,omitempty" tf:"spot,omitempty"`
}
type CustomTaintsInitParameters struct {
// Effect of a taint to be added to nodes created from this template, the default is NoSchedule. Allowed values: NoSchedule, NoExecute.
Effect *string `json:"effect,omitempty" tf:"effect,omitempty"`
// Key of a taint to be added to nodes created from this template.
Key *string `json:"key,omitempty" tf:"key,omitempty"`
// Value of a taint to be added to nodes created from this template.
Value *string `json:"value,omitempty" tf:"value,omitempty"`
}
type CustomTaintsObservation struct {
// Effect of a taint to be added to nodes created from this template, the default is NoSchedule. Allowed values: NoSchedule, NoExecute.
Effect *string `json:"effect,omitempty" tf:"effect,omitempty"`
// Key of a taint to be added to nodes created from this template.
Key *string `json:"key,omitempty" tf:"key,omitempty"`
// Value of a taint to be added to nodes created from this template.
Value *string `json:"value,omitempty" tf:"value,omitempty"`
}
type CustomTaintsParameters struct {
// Effect of a taint to be added to nodes created from this template, the default is NoSchedule. Allowed values: NoSchedule, NoExecute.
// +kubebuilder:validation:Optional
Effect *string `json:"effect,omitempty" tf:"effect,omitempty"`
// Key of a taint to be added to nodes created from this template.
// +kubebuilder:validation:Optional
Key *string `json:"key" tf:"key,omitempty"`
// Value of a taint to be added to nodes created from this template.
// +kubebuilder:validation:Optional
Value *string `json:"value,omitempty" tf:"value,omitempty"`
}
type GpuInitParameters struct {
// Names of the GPUs to exclude.
ExcludeNames []*string `json:"excludeNames,omitempty" tf:"exclude_names,omitempty"`
// Instance families to include when filtering (excludes all other families).
IncludeNames []*string `json:"includeNames,omitempty" tf:"include_names,omitempty"`
// Manufacturers of the gpus to select - NVIDIA, AMD.
Manufacturers []*string `json:"manufacturers,omitempty" tf:"manufacturers,omitempty"`
// Max GPU count for the instance type to have.
MaxCount *float64 `json:"maxCount,omitempty" tf:"max_count,omitempty"`
// Min GPU count for the instance type to have.
MinCount *float64 `json:"minCount,omitempty" tf:"min_count,omitempty"`
}
type GpuObservation struct {
// Names of the GPUs to exclude.
ExcludeNames []*string `json:"excludeNames,omitempty" tf:"exclude_names,omitempty"`
// Instance families to include when filtering (excludes all other families).
IncludeNames []*string `json:"includeNames,omitempty" tf:"include_names,omitempty"`
// Manufacturers of the gpus to select - NVIDIA, AMD.
Manufacturers []*string `json:"manufacturers,omitempty" tf:"manufacturers,omitempty"`
// Max GPU count for the instance type to have.
MaxCount *float64 `json:"maxCount,omitempty" tf:"max_count,omitempty"`
// Min GPU count for the instance type to have.
MinCount *float64 `json:"minCount,omitempty" tf:"min_count,omitempty"`
}
type GpuParameters struct {
// Names of the GPUs to exclude.
// +kubebuilder:validation:Optional
ExcludeNames []*string `json:"excludeNames,omitempty" tf:"exclude_names,omitempty"`
// Instance families to include when filtering (excludes all other families).
// +kubebuilder:validation:Optional
IncludeNames []*string `json:"includeNames,omitempty" tf:"include_names,omitempty"`
// Manufacturers of the gpus to select - NVIDIA, AMD.
// +kubebuilder:validation:Optional
Manufacturers []*string `json:"manufacturers,omitempty" tf:"manufacturers,omitempty"`
// Max GPU count for the instance type to have.
// +kubebuilder:validation:Optional
MaxCount *float64 `json:"maxCount,omitempty" tf:"max_count,omitempty"`
// Min GPU count for the instance type to have.
// +kubebuilder:validation:Optional
MinCount *float64 `json:"minCount,omitempty" tf:"min_count,omitempty"`
}
type InstanceFamiliesInitParameters struct {
// Instance families to include when filtering (excludes all other families).
Exclude []*string `json:"exclude,omitempty" tf:"exclude,omitempty"`
// Instance families to exclude when filtering (includes all other families).
Include []*string `json:"include,omitempty" tf:"include,omitempty"`
}
type InstanceFamiliesObservation struct {
// Instance families to include when filtering (excludes all other families).
Exclude []*string `json:"exclude,omitempty" tf:"exclude,omitempty"`
// Instance families to exclude when filtering (includes all other families).
Include []*string `json:"include,omitempty" tf:"include,omitempty"`
}
type InstanceFamiliesParameters struct {
// Instance families to include when filtering (excludes all other families).
// +kubebuilder:validation:Optional
Exclude []*string `json:"exclude,omitempty" tf:"exclude,omitempty"`
// Instance families to exclude when filtering (includes all other families).
// +kubebuilder:validation:Optional
Include []*string `json:"include,omitempty" tf:"include,omitempty"`
}
type NodeTemplateInitParameters struct {
// CAST AI cluster id.
// +crossplane:generate:reference:type=github.com/crossplane-contrib/crossplane-provider-castai/apis/castai/v1alpha1.EksClusterId
ClusterID *string `json:"clusterId,omitempty" tf:"cluster_id,omitempty"`
// Reference to a EksClusterId in castai to populate clusterId.
// +kubebuilder:validation:Optional
ClusterIDRef *v1.Reference `json:"clusterIdRef,omitempty" tf:"-"`
// Selector for a EksClusterId in castai to populate clusterId.
// +kubebuilder:validation:Optional
ClusterIDSelector *v1.Selector `json:"clusterIdSelector,omitempty" tf:"-"`
// CAST AI node configuration id to be used for node template.
// +crossplane:generate:reference:type=github.com/crossplane-contrib/crossplane-provider-castai/apis/castai/v1alpha1.NodeConfiguration
ConfigurationID *string `json:"configurationId,omitempty" tf:"configuration_id,omitempty"`
// Reference to a NodeConfiguration in castai to populate configurationId.
// +kubebuilder:validation:Optional
ConfigurationIDRef *v1.Reference `json:"configurationIdRef,omitempty" tf:"-"`
// Selector for a NodeConfiguration in castai to populate configurationId.
// +kubebuilder:validation:Optional
ConfigurationIDSelector *v1.Selector `json:"configurationIdSelector,omitempty" tf:"-"`
Constraints []ConstraintsInitParameters `json:"constraints,omitempty" tf:"constraints,omitempty"`
// Marks whether custom instances should be used when deciding which parts of inventory are available. Custom instances are only supported in GCP.
CustomInstancesEnabled *bool `json:"customInstancesEnabled,omitempty" tf:"custom_instances_enabled,omitempty"`
// Marks whether custom instances with extended memory should be used when deciding which parts of inventory are available. Custom instances are only supported in GCP.
CustomInstancesWithExtendedMemoryEnabled *bool `json:"customInstancesWithExtendedMemoryEnabled,omitempty" tf:"custom_instances_with_extended_memory_enabled,omitempty"`
// Custom labels to be added to nodes created from this template.
// +mapType=granular
CustomLabels map[string]*string `json:"customLabels,omitempty" tf:"custom_labels,omitempty"`
// Custom taints to be added to the nodes created from this template. `shouldTaint` has to be `true` in order to create/update the node template with custom taints. If `shouldTaint` is `true`, but no custom taints are provided, the nodes will be tainted with the default node template taint.
CustomTaints []CustomTaintsInitParameters `json:"customTaints,omitempty" tf:"custom_taints,omitempty"`
// Flag whether the node template is default.
IsDefault *bool `json:"isDefault,omitempty" tf:"is_default,omitempty"`
// Flag whether the node template is enabled and considered for autoscaling.
IsEnabled *bool `json:"isEnabled,omitempty" tf:"is_enabled,omitempty"`
// Name of the node template.
Name *string `json:"name,omitempty" tf:"name,omitempty"`
// Minimum nodes that will be kept when rebalancing nodes using this node template.
RebalancingConfigMinNodes *float64 `json:"rebalancingConfigMinNodes,omitempty" tf:"rebalancing_config_min_nodes,omitempty"`
// Marks whether the templated nodes will have a taint.
ShouldTaint *bool `json:"shouldTaint,omitempty" tf:"should_taint,omitempty"`
}
type NodeTemplateObservation struct {
// CAST AI cluster id.
ClusterID *string `json:"clusterId,omitempty" tf:"cluster_id,omitempty"`
// CAST AI node configuration id to be used for node template.
ConfigurationID *string `json:"configurationId,omitempty" tf:"configuration_id,omitempty"`
Constraints []ConstraintsObservation `json:"constraints,omitempty" tf:"constraints,omitempty"`
// Marks whether custom instances should be used when deciding which parts of inventory are available. Custom instances are only supported in GCP.
CustomInstancesEnabled *bool `json:"customInstancesEnabled,omitempty" tf:"custom_instances_enabled,omitempty"`
// Marks whether custom instances with extended memory should be used when deciding which parts of inventory are available. Custom instances are only supported in GCP.
CustomInstancesWithExtendedMemoryEnabled *bool `json:"customInstancesWithExtendedMemoryEnabled,omitempty" tf:"custom_instances_with_extended_memory_enabled,omitempty"`
// Custom labels to be added to nodes created from this template.
// +mapType=granular
CustomLabels map[string]*string `json:"customLabels,omitempty" tf:"custom_labels,omitempty"`
// Custom taints to be added to the nodes created from this template. `shouldTaint` has to be `true` in order to create/update the node template with custom taints. If `shouldTaint` is `true`, but no custom taints are provided, the nodes will be tainted with the default node template taint.
CustomTaints []CustomTaintsObservation `json:"customTaints,omitempty" tf:"custom_taints,omitempty"`
ID *string `json:"id,omitempty" tf:"id,omitempty"`
// Flag whether the node template is default.
IsDefault *bool `json:"isDefault,omitempty" tf:"is_default,omitempty"`
// Flag whether the node template is enabled and considered for autoscaling.
IsEnabled *bool `json:"isEnabled,omitempty" tf:"is_enabled,omitempty"`
// Name of the node template.
Name *string `json:"name,omitempty" tf:"name,omitempty"`
// Minimum nodes that will be kept when rebalancing nodes using this node template.
RebalancingConfigMinNodes *float64 `json:"rebalancingConfigMinNodes,omitempty" tf:"rebalancing_config_min_nodes,omitempty"`
// Marks whether the templated nodes will have a taint.
ShouldTaint *bool `json:"shouldTaint,omitempty" tf:"should_taint,omitempty"`
}
type NodeTemplateParameters struct {
// CAST AI cluster id.
// +crossplane:generate:reference:type=github.com/crossplane-contrib/crossplane-provider-castai/apis/castai/v1alpha1.EksClusterId
// +kubebuilder:validation:Optional
ClusterID *string `json:"clusterId,omitempty" tf:"cluster_id,omitempty"`
// Reference to a EksClusterId in castai to populate clusterId.
// +kubebuilder:validation:Optional
ClusterIDRef *v1.Reference `json:"clusterIdRef,omitempty" tf:"-"`
// Selector for a EksClusterId in castai to populate clusterId.
// +kubebuilder:validation:Optional
ClusterIDSelector *v1.Selector `json:"clusterIdSelector,omitempty" tf:"-"`
// CAST AI node configuration id to be used for node template.
// +crossplane:generate:reference:type=github.com/crossplane-contrib/crossplane-provider-castai/apis/castai/v1alpha1.NodeConfiguration
// +kubebuilder:validation:Optional
ConfigurationID *string `json:"configurationId,omitempty" tf:"configuration_id,omitempty"`
// Reference to a NodeConfiguration in castai to populate configurationId.
// +kubebuilder:validation:Optional
ConfigurationIDRef *v1.Reference `json:"configurationIdRef,omitempty" tf:"-"`
// Selector for a NodeConfiguration in castai to populate configurationId.
// +kubebuilder:validation:Optional
ConfigurationIDSelector *v1.Selector `json:"configurationIdSelector,omitempty" tf:"-"`
// +kubebuilder:validation:Optional
Constraints []ConstraintsParameters `json:"constraints,omitempty" tf:"constraints,omitempty"`
// Marks whether custom instances should be used when deciding which parts of inventory are available. Custom instances are only supported in GCP.
// +kubebuilder:validation:Optional
CustomInstancesEnabled *bool `json:"customInstancesEnabled,omitempty" tf:"custom_instances_enabled,omitempty"`
// Marks whether custom instances with extended memory should be used when deciding which parts of inventory are available. Custom instances are only supported in GCP.
// +kubebuilder:validation:Optional
CustomInstancesWithExtendedMemoryEnabled *bool `json:"customInstancesWithExtendedMemoryEnabled,omitempty" tf:"custom_instances_with_extended_memory_enabled,omitempty"`
// Custom labels to be added to nodes created from this template.
// +kubebuilder:validation:Optional
// +mapType=granular
CustomLabels map[string]*string `json:"customLabels,omitempty" tf:"custom_labels,omitempty"`
// Custom taints to be added to the nodes created from this template. `shouldTaint` has to be `true` in order to create/update the node template with custom taints. If `shouldTaint` is `true`, but no custom taints are provided, the nodes will be tainted with the default node template taint.
// +kubebuilder:validation:Optional
CustomTaints []CustomTaintsParameters `json:"customTaints,omitempty" tf:"custom_taints,omitempty"`
// Flag whether the node template is default.
// +kubebuilder:validation:Optional
IsDefault *bool `json:"isDefault,omitempty" tf:"is_default,omitempty"`
// Flag whether the node template is enabled and considered for autoscaling.
// +kubebuilder:validation:Optional
IsEnabled *bool `json:"isEnabled,omitempty" tf:"is_enabled,omitempty"`
// Name of the node template.
// +kubebuilder:validation:Optional
Name *string `json:"name,omitempty" tf:"name,omitempty"`
// Minimum nodes that will be kept when rebalancing nodes using this node template.
// +kubebuilder:validation:Optional
RebalancingConfigMinNodes *float64 `json:"rebalancingConfigMinNodes,omitempty" tf:"rebalancing_config_min_nodes,omitempty"`
// Marks whether the templated nodes will have a taint.
// +kubebuilder:validation:Optional
ShouldTaint *bool `json:"shouldTaint,omitempty" tf:"should_taint,omitempty"`
}
// NodeTemplateSpec defines the desired state of NodeTemplate
type NodeTemplateSpec struct {
v1.ResourceSpec `json:",inline"`
ForProvider NodeTemplateParameters `json:"forProvider"`
// THIS IS A BETA FIELD. It will be honored
// unless the Management Policies feature flag is disabled.
// InitProvider holds the same fields as ForProvider, with the exception
// of Identifier and other resource reference fields. The fields that are
// in InitProvider are merged into ForProvider when the resource is created.
// The same fields are also added to the terraform ignore_changes hook, to
// avoid updating them after creation. This is useful for fields that are
// required on creation, but we do not desire to update them after creation,
// for example because of an external controller is managing them, like an
// autoscaler.
InitProvider NodeTemplateInitParameters `json:"initProvider,omitempty"`
}
// NodeTemplateStatus defines the observed state of NodeTemplate.
type NodeTemplateStatus struct {
v1.ResourceStatus `json:",inline"`
AtProvider NodeTemplateObservation `json:"atProvider,omitempty"`
}
// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:storageversion
// NodeTemplate is the Schema for the NodeTemplates API. <no value>
// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status"
// +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status"
// +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name"
// +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp"
// +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,castai}
type NodeTemplate struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.name) || (has(self.initProvider) && has(self.initProvider.name))",message="spec.forProvider.name is a required parameter"
Spec NodeTemplateSpec `json:"spec"`
Status NodeTemplateStatus `json:"status,omitempty"`
}
// +kubebuilder:object:root=true
// NodeTemplateList contains a list of NodeTemplates
type NodeTemplateList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []NodeTemplate `json:"items"`
}
// Repository type metadata.
var (
NodeTemplate_Kind = "NodeTemplate"
NodeTemplate_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: NodeTemplate_Kind}.String()
NodeTemplate_KindAPIVersion = NodeTemplate_Kind + "." + CRDGroupVersion.String()
NodeTemplate_GroupVersionKind = CRDGroupVersion.WithKind(NodeTemplate_Kind)
)
func init() {
SchemeBuilder.Register(&NodeTemplate{}, &NodeTemplateList{})
}