-
Notifications
You must be signed in to change notification settings - Fork 59
/
zz_regioninstancegroupmanager_types.go
executable file
·529 lines (401 loc) · 32.4 KB
/
zz_regioninstancegroupmanager_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
/*
Copyright 2021 The Crossplane Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by upjet. DO NOT EDIT.
package v1beta1
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 RegionInstanceGroupManagerAutoHealingPoliciesObservation struct {
// The health check resource that signals autohealing.
HealthCheck *string `json:"healthCheck,omitempty" tf:"health_check,omitempty"`
// The number of seconds that the managed instance group waits before
// it applies autohealing policies to new instances or recently recreated instances. Between 0 and 3600.
InitialDelaySec *float64 `json:"initialDelaySec,omitempty" tf:"initial_delay_sec,omitempty"`
}
type RegionInstanceGroupManagerAutoHealingPoliciesParameters struct {
// The health check resource that signals autohealing.
// +crossplane:generate:reference:type=HealthCheck
// +crossplane:generate:reference:extractor=github.com/upbound/provider-gcp/config/common.ExtractResourceID()
// +kubebuilder:validation:Optional
HealthCheck *string `json:"healthCheck,omitempty" tf:"health_check,omitempty"`
// Reference to a HealthCheck to populate healthCheck.
// +kubebuilder:validation:Optional
HealthCheckRef *v1.Reference `json:"healthCheckRef,omitempty" tf:"-"`
// Selector for a HealthCheck to populate healthCheck.
// +kubebuilder:validation:Optional
HealthCheckSelector *v1.Selector `json:"healthCheckSelector,omitempty" tf:"-"`
// The number of seconds that the managed instance group waits before
// it applies autohealing policies to new instances or recently recreated instances. Between 0 and 3600.
// +kubebuilder:validation:Required
InitialDelaySec *float64 `json:"initialDelaySec" tf:"initial_delay_sec,omitempty"`
}
type RegionInstanceGroupManagerNamedPortObservation struct {
// The name of the port.
Name *string `json:"name,omitempty" tf:"name,omitempty"`
// The port number.
Port *float64 `json:"port,omitempty" tf:"port,omitempty"`
}
type RegionInstanceGroupManagerNamedPortParameters struct {
// The name of the port.
// +kubebuilder:validation:Required
Name *string `json:"name" tf:"name,omitempty"`
// The port number.
// +kubebuilder:validation:Required
Port *float64 `json:"port" tf:"port,omitempty"`
}
type RegionInstanceGroupManagerObservation struct {
// The autohealing policies for this managed instance
// group. You can specify only one value. Structure is documented below. For more information, see the official documentation.
AutoHealingPolicies []RegionInstanceGroupManagerAutoHealingPoliciesObservation `json:"autoHealingPolicies,omitempty" tf:"auto_healing_policies,omitempty"`
// The base instance name to use for
// instances in this group. The value must be a valid
// RFC1035 name. Supported characters
// are lowercase letters, numbers, and hyphens (-). Instances are named by
// appending a hyphen and a random four-character string to the base instance
// name.
BaseInstanceName *string `json:"baseInstanceName,omitempty" tf:"base_instance_name,omitempty"`
// An optional textual description of the instance
// group manager.
Description *string `json:"description,omitempty" tf:"description,omitempty"`
// The shape to which the group converges either proactively or on resize events (depending on the value set in update_policy.0.instance_redistribution_type). For more information see the official documentation.
DistributionPolicyTargetShape *string `json:"distributionPolicyTargetShape,omitempty" tf:"distribution_policy_target_shape,omitempty"`
// The distribution policy for this managed instance
// group. You can specify one or more values. For more information, see the official documentation.
DistributionPolicyZones []*string `json:"distributionPolicyZones,omitempty" tf:"distribution_policy_zones,omitempty"`
// The fingerprint of the instance group manager.
Fingerprint *string `json:"fingerprint,omitempty" tf:"fingerprint,omitempty"`
// an identifier for the resource with format {{disk.name}}
ID *string `json:"id,omitempty" tf:"id,omitempty"`
// The full URL of the instance group created by the manager.
InstanceGroup *string `json:"instanceGroup,omitempty" tf:"instance_group,omitempty"`
// Pagination behavior of the listManagedInstances API
// method for this managed instance group. Valid values are: PAGELESS, PAGINATED.
// If PAGELESS (default), Pagination is disabled for the group's listManagedInstances API method.
// maxResults and pageToken query parameters are ignored and all instances are returned in a single
// response. If PAGINATED, pagination is enabled, maxResults and pageToken query parameters are
// respected.
ListManagedInstancesResults *string `json:"listManagedInstancesResults,omitempty" tf:"list_managed_instances_results,omitempty"`
// The name of the instance group manager. Must be 1-63
// characters long and comply with
// RFC1035. Supported characters
// include lowercase letters, numbers, and hyphens.
Name *string `json:"name,omitempty" tf:"name,omitempty"`
// The named port configuration. See the section below
// for details on configuration.
NamedPort []RegionInstanceGroupManagerNamedPortObservation `json:"namedPort,omitempty" tf:"named_port,omitempty"`
// The ID of the project in which the resource belongs. If it
// is not provided, the provider project is used.
Project *string `json:"project,omitempty" tf:"project,omitempty"`
// The region where the managed instance group resides. If not provided, the provider region is used.
Region *string `json:"region,omitempty" tf:"region,omitempty"`
// The URL of the created resource.
SelfLink *string `json:"selfLink,omitempty" tf:"self_link,omitempty"`
// Disks created on the instances that will be preserved on instance delete, update, etc. Structure is documented below. For more information see the official documentation. Proactive cross zone instance redistribution must be disabled before you can update stateful disks on existing instance group managers. This can be controlled via the update_policy.
StatefulDisk []RegionInstanceGroupManagerStatefulDiskObservation `json:"statefulDisk,omitempty" tf:"stateful_disk,omitempty"`
Status []RegionInstanceGroupManagerStatusObservation `json:"status,omitempty" tf:"status,omitempty"`
// The full URL of all target pools to which new
// instances in the group are added. Updating the target pools attribute does
// not affect existing instances.
TargetPools []*string `json:"targetPools,omitempty" tf:"target_pools,omitempty"`
// The target number of running instances for this managed
// instance group. This value should always be explicitly set unless this resource is attached to
// an autoscaler, in which case it should never be set. Defaults to 0.
TargetSize *float64 `json:"targetSize,omitempty" tf:"target_size,omitempty"`
// The update policy for this managed instance group. Structure is documented below. For more information, see the official documentation and API
UpdatePolicy []RegionInstanceGroupManagerUpdatePolicyObservation `json:"updatePolicy,omitempty" tf:"update_policy,omitempty"`
// Application versions managed by this instance group. Each
// version deals with a specific instance template, allowing canary release scenarios.
// Structure is documented below.
Version []RegionInstanceGroupManagerVersionObservation `json:"version,omitempty" tf:"version,omitempty"`
// Whether to wait for all instances to be created/updated before
// returning.
WaitForInstances *bool `json:"waitForInstances,omitempty" tf:"wait_for_instances,omitempty"`
// When used with wait_for_instances it specifies the status to wait for.
// When STABLE is specified this resource will wait until the instances are stable before returning. When UPDATED is
// set, it will wait for the version target to be reached and any per instance configs to be effective as well as all
// instances to be stable before returning. The possible values are STABLE and UPDATED
WaitForInstancesStatus *string `json:"waitForInstancesStatus,omitempty" tf:"wait_for_instances_status,omitempty"`
}
type RegionInstanceGroupManagerParameters struct {
// The autohealing policies for this managed instance
// group. You can specify only one value. Structure is documented below. For more information, see the official documentation.
// +kubebuilder:validation:Optional
AutoHealingPolicies []RegionInstanceGroupManagerAutoHealingPoliciesParameters `json:"autoHealingPolicies,omitempty" tf:"auto_healing_policies,omitempty"`
// The base instance name to use for
// instances in this group. The value must be a valid
// RFC1035 name. Supported characters
// are lowercase letters, numbers, and hyphens (-). Instances are named by
// appending a hyphen and a random four-character string to the base instance
// name.
// +kubebuilder:validation:Optional
BaseInstanceName *string `json:"baseInstanceName,omitempty" tf:"base_instance_name,omitempty"`
// An optional textual description of the instance
// group manager.
// +kubebuilder:validation:Optional
Description *string `json:"description,omitempty" tf:"description,omitempty"`
// The shape to which the group converges either proactively or on resize events (depending on the value set in update_policy.0.instance_redistribution_type). For more information see the official documentation.
// +kubebuilder:validation:Optional
DistributionPolicyTargetShape *string `json:"distributionPolicyTargetShape,omitempty" tf:"distribution_policy_target_shape,omitempty"`
// The distribution policy for this managed instance
// group. You can specify one or more values. For more information, see the official documentation.
// +kubebuilder:validation:Optional
DistributionPolicyZones []*string `json:"distributionPolicyZones,omitempty" tf:"distribution_policy_zones,omitempty"`
// Pagination behavior of the listManagedInstances API
// method for this managed instance group. Valid values are: PAGELESS, PAGINATED.
// If PAGELESS (default), Pagination is disabled for the group's listManagedInstances API method.
// maxResults and pageToken query parameters are ignored and all instances are returned in a single
// response. If PAGINATED, pagination is enabled, maxResults and pageToken query parameters are
// respected.
// +kubebuilder:validation:Optional
ListManagedInstancesResults *string `json:"listManagedInstancesResults,omitempty" tf:"list_managed_instances_results,omitempty"`
// The name of the instance group manager. Must be 1-63
// characters long and comply with
// RFC1035. Supported characters
// include lowercase letters, numbers, and hyphens.
// +kubebuilder:validation:Optional
Name *string `json:"name,omitempty" tf:"name,omitempty"`
// The named port configuration. See the section below
// for details on configuration.
// +kubebuilder:validation:Optional
NamedPort []RegionInstanceGroupManagerNamedPortParameters `json:"namedPort,omitempty" tf:"named_port,omitempty"`
// The ID of the project in which the resource belongs. If it
// is not provided, the provider project is used.
// +kubebuilder:validation:Optional
Project *string `json:"project,omitempty" tf:"project,omitempty"`
// The region where the managed instance group resides. If not provided, the provider region is used.
// +kubebuilder:validation:Optional
Region *string `json:"region,omitempty" tf:"region,omitempty"`
// Disks created on the instances that will be preserved on instance delete, update, etc. Structure is documented below. For more information see the official documentation. Proactive cross zone instance redistribution must be disabled before you can update stateful disks on existing instance group managers. This can be controlled via the update_policy.
// +kubebuilder:validation:Optional
StatefulDisk []RegionInstanceGroupManagerStatefulDiskParameters `json:"statefulDisk,omitempty" tf:"stateful_disk,omitempty"`
// The full URL of all target pools to which new
// instances in the group are added. Updating the target pools attribute does
// not affect existing instances.
// +crossplane:generate:reference:type=TargetPool
// +crossplane:generate:reference:extractor=github.com/upbound/provider-gcp/config/common.SelfLinkExtractor()
// +kubebuilder:validation:Optional
TargetPools []*string `json:"targetPools,omitempty" tf:"target_pools,omitempty"`
// References to TargetPool to populate targetPools.
// +kubebuilder:validation:Optional
TargetPoolsRefs []v1.Reference `json:"targetPoolsRefs,omitempty" tf:"-"`
// Selector for a list of TargetPool to populate targetPools.
// +kubebuilder:validation:Optional
TargetPoolsSelector *v1.Selector `json:"targetPoolsSelector,omitempty" tf:"-"`
// The target number of running instances for this managed
// instance group. This value should always be explicitly set unless this resource is attached to
// an autoscaler, in which case it should never be set. Defaults to 0.
// +kubebuilder:validation:Optional
TargetSize *float64 `json:"targetSize,omitempty" tf:"target_size,omitempty"`
// The update policy for this managed instance group. Structure is documented below. For more information, see the official documentation and API
// +kubebuilder:validation:Optional
UpdatePolicy []RegionInstanceGroupManagerUpdatePolicyParameters `json:"updatePolicy,omitempty" tf:"update_policy,omitempty"`
// Application versions managed by this instance group. Each
// version deals with a specific instance template, allowing canary release scenarios.
// Structure is documented below.
// +kubebuilder:validation:Optional
Version []RegionInstanceGroupManagerVersionParameters `json:"version,omitempty" tf:"version,omitempty"`
// Whether to wait for all instances to be created/updated before
// returning.
// +kubebuilder:validation:Optional
WaitForInstances *bool `json:"waitForInstances,omitempty" tf:"wait_for_instances,omitempty"`
// When used with wait_for_instances it specifies the status to wait for.
// When STABLE is specified this resource will wait until the instances are stable before returning. When UPDATED is
// set, it will wait for the version target to be reached and any per instance configs to be effective as well as all
// instances to be stable before returning. The possible values are STABLE and UPDATED
// +kubebuilder:validation:Optional
WaitForInstancesStatus *string `json:"waitForInstancesStatus,omitempty" tf:"wait_for_instances_status,omitempty"`
}
type RegionInstanceGroupManagerStatefulDiskObservation struct {
// , A value that prescribes what should happen to the stateful disk when the VM instance is deleted. The available options are NEVER and ON_PERMANENT_INSTANCE_DELETION. NEVER - detach the disk when the VM is deleted, but do not delete the disk. ON_PERMANENT_INSTANCE_DELETION will delete the stateful disk when the VM is permanently deleted from the instance group. The default is NEVER.
DeleteRule *string `json:"deleteRule,omitempty" tf:"delete_rule,omitempty"`
// , The device name of the disk to be attached.
DeviceName *string `json:"deviceName,omitempty" tf:"device_name,omitempty"`
}
type RegionInstanceGroupManagerStatefulDiskParameters struct {
// , A value that prescribes what should happen to the stateful disk when the VM instance is deleted. The available options are NEVER and ON_PERMANENT_INSTANCE_DELETION. NEVER - detach the disk when the VM is deleted, but do not delete the disk. ON_PERMANENT_INSTANCE_DELETION will delete the stateful disk when the VM is permanently deleted from the instance group. The default is NEVER.
// +kubebuilder:validation:Optional
DeleteRule *string `json:"deleteRule,omitempty" tf:"delete_rule,omitempty"`
// , The device name of the disk to be attached.
// +kubebuilder:validation:Required
DeviceName *string `json:"deviceName" tf:"device_name,omitempty"`
}
type RegionInstanceGroupManagerStatusObservation struct {
// A bit indicating whether the managed instance group is in a stable state. A stable state means that: none of the instances in the managed instance group is currently undergoing any type of change (for example, creation, restart, or deletion); no future changes are scheduled for instances in the managed instance group; and the managed instance group itself is not being modified.
IsStable *bool `json:"isStable,omitempty" tf:"is_stable,omitempty"`
// Stateful status of the given Instance Group Manager.
Stateful []StatusStatefulObservation `json:"stateful,omitempty" tf:"stateful,omitempty"`
// A status of consistency of Instances' versions with their target version specified by version field on Instance Group Manager.
VersionTarget []StatusVersionTargetObservation `json:"versionTarget,omitempty" tf:"version_target,omitempty"`
}
type RegionInstanceGroupManagerStatusParameters struct {
}
type RegionInstanceGroupManagerUpdatePolicyObservation struct {
// - The instance redistribution policy for regional managed instance groups. Valid values are: "PROACTIVE", "NONE". If PROACTIVE (default), the group attempts to maintain an even distribution of VM instances across zones in the region. If NONE, proactive redistribution is disabled.
InstanceRedistributionType *string `json:"instanceRedistributionType,omitempty" tf:"instance_redistribution_type,omitempty"`
// , The maximum number of instances that can be created above the specified targetSize during the update process. Conflicts with max_surge_percent. It has to be either 0 or at least equal to the number of zones. If fixed values are used, at least one of max_unavailable_fixed or max_surge_fixed must be greater than 0.
MaxSurgeFixed *float64 `json:"maxSurgeFixed,omitempty" tf:"max_surge_fixed,omitempty"`
// , The maximum number of instances(calculated as percentage) that can be created above the specified targetSize during the update process. Conflicts with max_surge_fixed. Percent value is only allowed for regional managed instance groups with size at least 10.
MaxSurgePercent *float64 `json:"maxSurgePercent,omitempty" tf:"max_surge_percent,omitempty"`
// , The maximum number of instances that can be unavailable during the update process. Conflicts with max_unavailable_percent. It has to be either 0 or at least equal to the number of zones. If fixed values are used, at least one of max_unavailable_fixed or max_surge_fixed must be greater than 0.
MaxUnavailableFixed *float64 `json:"maxUnavailableFixed,omitempty" tf:"max_unavailable_fixed,omitempty"`
// , The maximum number of instances(calculated as percentage) that can be unavailable during the update process. Conflicts with max_unavailable_fixed. Percent value is only allowed for regional managed instance groups with size at least 10.
MaxUnavailablePercent *float64 `json:"maxUnavailablePercent,omitempty" tf:"max_unavailable_percent,omitempty"`
// - Minimal action to be taken on an instance. You can specify either REFRESH to update without stopping instances, RESTART to restart existing instances or REPLACE to delete and create new instances from the target template. If you specify a REFRESH, the Updater will attempt to perform that action only. However, if the Updater determines that the minimal action you specify is not enough to perform the update, it might perform a more disruptive action.
MinimalAction *string `json:"minimalAction,omitempty" tf:"minimal_action,omitempty"`
// - Most disruptive action that is allowed to be taken on an instance. You can specify either NONE to forbid any actions, REFRESH to allow actions that do not need instance restart, RESTART to allow actions that can be applied without instance replacing or REPLACE to allow all possible actions. If the Updater determines that the minimal update action needed is more disruptive than most disruptive allowed action you specify it will not perform the update at all.
MostDisruptiveAllowedAction *string `json:"mostDisruptiveAllowedAction,omitempty" tf:"most_disruptive_allowed_action,omitempty"`
// , The instance replacement method for managed instance groups. Valid values are: "RECREATE", "SUBSTITUTE". If SUBSTITUTE (default), the group replaces VM instances with new instances that have randomly generated names. If RECREATE, instance names are preserved. You must also set max_unavailable_fixed or max_unavailable_percent to be greater than 0.
ReplacementMethod *string `json:"replacementMethod,omitempty" tf:"replacement_method,omitempty"`
// - The type of update process. You can specify either PROACTIVE so that the instance group manager proactively executes actions in order to bring instances to their target versions or OPPORTUNISTIC so that no action is proactively executed but the update will be performed as part of other actions (for example, resizes or recreateInstances calls).
Type *string `json:"type,omitempty" tf:"type,omitempty"`
}
type RegionInstanceGroupManagerUpdatePolicyParameters struct {
// - The instance redistribution policy for regional managed instance groups. Valid values are: "PROACTIVE", "NONE". If PROACTIVE (default), the group attempts to maintain an even distribution of VM instances across zones in the region. If NONE, proactive redistribution is disabled.
// +kubebuilder:validation:Optional
InstanceRedistributionType *string `json:"instanceRedistributionType,omitempty" tf:"instance_redistribution_type,omitempty"`
// , The maximum number of instances that can be created above the specified targetSize during the update process. Conflicts with max_surge_percent. It has to be either 0 or at least equal to the number of zones. If fixed values are used, at least one of max_unavailable_fixed or max_surge_fixed must be greater than 0.
// +kubebuilder:validation:Optional
MaxSurgeFixed *float64 `json:"maxSurgeFixed,omitempty" tf:"max_surge_fixed,omitempty"`
// , The maximum number of instances(calculated as percentage) that can be created above the specified targetSize during the update process. Conflicts with max_surge_fixed. Percent value is only allowed for regional managed instance groups with size at least 10.
// +kubebuilder:validation:Optional
MaxSurgePercent *float64 `json:"maxSurgePercent,omitempty" tf:"max_surge_percent,omitempty"`
// , The maximum number of instances that can be unavailable during the update process. Conflicts with max_unavailable_percent. It has to be either 0 or at least equal to the number of zones. If fixed values are used, at least one of max_unavailable_fixed or max_surge_fixed must be greater than 0.
// +kubebuilder:validation:Optional
MaxUnavailableFixed *float64 `json:"maxUnavailableFixed,omitempty" tf:"max_unavailable_fixed,omitempty"`
// , The maximum number of instances(calculated as percentage) that can be unavailable during the update process. Conflicts with max_unavailable_fixed. Percent value is only allowed for regional managed instance groups with size at least 10.
// +kubebuilder:validation:Optional
MaxUnavailablePercent *float64 `json:"maxUnavailablePercent,omitempty" tf:"max_unavailable_percent,omitempty"`
// - Minimal action to be taken on an instance. You can specify either REFRESH to update without stopping instances, RESTART to restart existing instances or REPLACE to delete and create new instances from the target template. If you specify a REFRESH, the Updater will attempt to perform that action only. However, if the Updater determines that the minimal action you specify is not enough to perform the update, it might perform a more disruptive action.
// +kubebuilder:validation:Required
MinimalAction *string `json:"minimalAction" tf:"minimal_action,omitempty"`
// - Most disruptive action that is allowed to be taken on an instance. You can specify either NONE to forbid any actions, REFRESH to allow actions that do not need instance restart, RESTART to allow actions that can be applied without instance replacing or REPLACE to allow all possible actions. If the Updater determines that the minimal update action needed is more disruptive than most disruptive allowed action you specify it will not perform the update at all.
// +kubebuilder:validation:Optional
MostDisruptiveAllowedAction *string `json:"mostDisruptiveAllowedAction,omitempty" tf:"most_disruptive_allowed_action,omitempty"`
// , The instance replacement method for managed instance groups. Valid values are: "RECREATE", "SUBSTITUTE". If SUBSTITUTE (default), the group replaces VM instances with new instances that have randomly generated names. If RECREATE, instance names are preserved. You must also set max_unavailable_fixed or max_unavailable_percent to be greater than 0.
// +kubebuilder:validation:Optional
ReplacementMethod *string `json:"replacementMethod,omitempty" tf:"replacement_method,omitempty"`
// - The type of update process. You can specify either PROACTIVE so that the instance group manager proactively executes actions in order to bring instances to their target versions or OPPORTUNISTIC so that no action is proactively executed but the update will be performed as part of other actions (for example, resizes or recreateInstances calls).
// +kubebuilder:validation:Required
Type *string `json:"type" tf:"type,omitempty"`
}
type RegionInstanceGroupManagerVersionObservation struct {
// - The full URL to an instance template from which all new instances of this version will be created.
InstanceTemplate *string `json:"instanceTemplate,omitempty" tf:"instance_template,omitempty"`
// - Version name.
Name *string `json:"name,omitempty" tf:"name,omitempty"`
// - The number of instances calculated as a fixed number or a percentage depending on the settings. Structure is documented below.
TargetSize []VersionTargetSizeObservation `json:"targetSize,omitempty" tf:"target_size,omitempty"`
}
type RegionInstanceGroupManagerVersionParameters struct {
// - The full URL to an instance template from which all new instances of this version will be created.
// +crossplane:generate:reference:type=InstanceTemplate
// +crossplane:generate:reference:extractor=github.com/upbound/provider-gcp/config/common.ExtractResourceID()
// +kubebuilder:validation:Optional
InstanceTemplate *string `json:"instanceTemplate,omitempty" tf:"instance_template,omitempty"`
// Reference to a InstanceTemplate to populate instanceTemplate.
// +kubebuilder:validation:Optional
InstanceTemplateRef *v1.Reference `json:"instanceTemplateRef,omitempty" tf:"-"`
// Selector for a InstanceTemplate to populate instanceTemplate.
// +kubebuilder:validation:Optional
InstanceTemplateSelector *v1.Selector `json:"instanceTemplateSelector,omitempty" tf:"-"`
// - Version name.
// +kubebuilder:validation:Optional
Name *string `json:"name,omitempty" tf:"name,omitempty"`
// - The number of instances calculated as a fixed number or a percentage depending on the settings. Structure is documented below.
// +kubebuilder:validation:Optional
TargetSize []VersionTargetSizeParameters `json:"targetSize,omitempty" tf:"target_size,omitempty"`
}
type StatefulPerInstanceConfigsObservation struct {
// A bit indicating if all of the group's per-instance configs (listed in the output of a listPerInstanceConfigs API call) have status EFFECTIVE or there are no per-instance-configs.
AllEffective *bool `json:"allEffective,omitempty" tf:"all_effective,omitempty"`
}
type StatefulPerInstanceConfigsParameters struct {
}
type StatusStatefulObservation struct {
// A bit indicating whether the managed instance group has stateful configuration, that is, if you have configured any items in a stateful policy or in per-instance configs. The group might report that it has no stateful config even when there is still some preserved state on a managed instance, for example, if you have deleted all PICs but not yet applied those deletions.
HasStatefulConfig *bool `json:"hasStatefulConfig,omitempty" tf:"has_stateful_config,omitempty"`
// Status of per-instance configs on the instance.
PerInstanceConfigs []StatefulPerInstanceConfigsObservation `json:"perInstanceConfigs,omitempty" tf:"per_instance_configs,omitempty"`
}
type StatusStatefulParameters struct {
}
type StatusVersionTargetObservation struct {
IsReached *bool `json:"isReached,omitempty" tf:"is_reached,omitempty"`
}
type StatusVersionTargetParameters struct {
}
type VersionTargetSizeObservation struct {
// , The number of instances which are managed for this version. Conflicts with percent.
Fixed *float64 `json:"fixed,omitempty" tf:"fixed,omitempty"`
// , The number of instances (calculated as percentage) which are managed for this version. Conflicts with fixed.
// Note that when using percent, rounding will be in favor of explicitly set target_size values; a managed instance group with 2 instances and 2 versions,
// one of which has a target_size.percent of 60 will create 2 instances of that version.
Percent *float64 `json:"percent,omitempty" tf:"percent,omitempty"`
}
type VersionTargetSizeParameters struct {
// , The number of instances which are managed for this version. Conflicts with percent.
// +kubebuilder:validation:Optional
Fixed *float64 `json:"fixed,omitempty" tf:"fixed,omitempty"`
// , The number of instances (calculated as percentage) which are managed for this version. Conflicts with fixed.
// Note that when using percent, rounding will be in favor of explicitly set target_size values; a managed instance group with 2 instances and 2 versions,
// one of which has a target_size.percent of 60 will create 2 instances of that version.
// +kubebuilder:validation:Optional
Percent *float64 `json:"percent,omitempty" tf:"percent,omitempty"`
}
// RegionInstanceGroupManagerSpec defines the desired state of RegionInstanceGroupManager
type RegionInstanceGroupManagerSpec struct {
v1.ResourceSpec `json:",inline"`
ForProvider RegionInstanceGroupManagerParameters `json:"forProvider"`
}
// RegionInstanceGroupManagerStatus defines the observed state of RegionInstanceGroupManager.
type RegionInstanceGroupManagerStatus struct {
v1.ResourceStatus `json:",inline"`
AtProvider RegionInstanceGroupManagerObservation `json:"atProvider,omitempty"`
}
// +kubebuilder:object:root=true
// RegionInstanceGroupManager is the Schema for the RegionInstanceGroupManagers API. Manages an Regional Instance Group within GCE.
// +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:subresource:status
// +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,gcp}
type RegionInstanceGroupManager struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.baseInstanceName)",message="baseInstanceName is a required parameter"
// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.name)",message="name is a required parameter"
// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.region)",message="region is a required parameter"
// +kubebuilder:validation:XValidation:rule="self.managementPolicy == 'ObserveOnly' || has(self.forProvider.version)",message="version is a required parameter"
Spec RegionInstanceGroupManagerSpec `json:"spec"`
Status RegionInstanceGroupManagerStatus `json:"status,omitempty"`
}
// +kubebuilder:object:root=true
// RegionInstanceGroupManagerList contains a list of RegionInstanceGroupManagers
type RegionInstanceGroupManagerList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []RegionInstanceGroupManager `json:"items"`
}
// Repository type metadata.
var (
RegionInstanceGroupManager_Kind = "RegionInstanceGroupManager"
RegionInstanceGroupManager_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: RegionInstanceGroupManager_Kind}.String()
RegionInstanceGroupManager_KindAPIVersion = RegionInstanceGroupManager_Kind + "." + CRDGroupVersion.String()
RegionInstanceGroupManager_GroupVersionKind = CRDGroupVersion.WithKind(RegionInstanceGroupManager_Kind)
)
func init() {
SchemeBuilder.Register(&RegionInstanceGroupManager{}, &RegionInstanceGroupManagerList{})
}