forked from crossplane-contrib/provider-jet-template
/
zz_project_types.go
executable file
·490 lines (352 loc) · 19 KB
/
zz_project_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
/*
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 terrajet. 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 DiskObservation struct {
ID *string `json:"id,omitempty" tf:"id,omitempty"`
}
type DiskParameters struct {
// Name of the device (required with AWS).
// +kubebuilder:validation:Optional
DeviceName *string `json:"deviceName,omitempty" tf:"device_name,omitempty"`
// LUN ID (required with Azure).
// +kubebuilder:validation:Optional
LunID *float64 `json:"lunId,omitempty" tf:"lun_id,omitempty"`
// Name of the disk.
// +kubebuilder:validation:Required
Name *string `json:"name" tf:"name,omitempty"`
// The disk size in GBs.
// +kubebuilder:validation:Required
Size *float64 `json:"size" tf:"size,omitempty"`
// Type of the volume (only valid with OpenStack).
// +kubebuilder:validation:Optional
VolumeType *string `json:"volumeType,omitempty" tf:"volume_type,omitempty"`
}
type KubernetesNodeLabelObservation struct {
}
type KubernetesNodeLabelParameters struct {
// Kubernetes node label key.
// +kubebuilder:validation:Required
Key *string `json:"key" tf:"key,omitempty"`
// Kubernetes node label value.
// +kubebuilder:validation:Required
Value *string `json:"value" tf:"value,omitempty"`
}
type ProjectObservation struct {
AccessIP *string `json:"accessIp,omitempty" tf:"access_ip,omitempty"`
AlertingProfileName *string `json:"alertingProfileName,omitempty" tf:"alerting_profile_name,omitempty"`
ID *string `json:"id,omitempty" tf:"id,omitempty"`
ServerBastion []ServerBastionObservation `json:"serverBastion,omitempty" tf:"server_bastion,omitempty"`
ServerKubemaster []ServerKubemasterObservation `json:"serverKubemaster,omitempty" tf:"server_kubemaster,omitempty"`
ServerKubeworker []ServerKubeworkerObservation `json:"serverKubeworker,omitempty" tf:"server_kubeworker,omitempty"`
VM []VMObservation `json:"vm,omitempty" tf:"vm,omitempty"`
}
type ProjectParameters struct {
// ID of the project's access profile. Defaults to the default access profile of the project's organization.
// +crossplane:generate:reference:type=github.com/nivraph/provider-jet-taikun/apis/accessprofile/v1alpha1.Profile
// +kubebuilder:validation:Optional
AccessProfileID *string `json:"accessProfileId,omitempty" tf:"access_profile_id,omitempty"`
// +kubebuilder:validation:Optional
AccessProfileIDRef *v1.Reference `json:"accessProfileIdRef,omitempty" tf:"-"`
// +kubebuilder:validation:Optional
AccessProfileIDSelector *v1.Selector `json:"accessProfileIdSelector,omitempty" tf:"-"`
// ID of the project's alerting profile.
// +crossplane:generate:reference:type=github.com/nivraph/provider-jet-taikun/apis/alertingprofile/v1alpha1.Profile
// +kubebuilder:validation:Optional
AlertingProfileID *string `json:"alertingProfileId,omitempty" tf:"alerting_profile_id,omitempty"`
// +kubebuilder:validation:Optional
AlertingProfileIDRef *v1.Reference `json:"alertingProfileIdRef,omitempty" tf:"-"`
// +kubebuilder:validation:Optional
AlertingProfileIDSelector *v1.Selector `json:"alertingProfileIdSelector,omitempty" tf:"-"`
// If enabled, the Kubespray version will be automatically upgraded when a new version is available. Defaults to `false`.
// +kubebuilder:validation:Optional
AutoUpgrade *bool `json:"autoUpgrade,omitempty" tf:"auto_upgrade,omitempty"`
// ID of the backup credential. If unspecified, backups are disabled.
// +crossplane:generate:reference:type=github.com/nivraph/provider-jet-taikun/apis/backupcredential/v1alpha1.Credential
// +kubebuilder:validation:Optional
BackupCredentialID *string `json:"backupCredentialId,omitempty" tf:"backup_credential_id,omitempty"`
// +kubebuilder:validation:Optional
BackupCredentialIDRef *v1.Reference `json:"backupCredentialIdRef,omitempty" tf:"-"`
// +kubebuilder:validation:Optional
BackupCredentialIDSelector *v1.Selector `json:"backupCredentialIdSelector,omitempty" tf:"-"`
// ID of the cloud credential used to create the project's servers.
// +crossplane:generate:reference:type=github.com/nivraph/provider-jet-taikun/apis/cloudcredential/v1alpha1.Credential
// +kubebuilder:validation:Optional
CloudCredentialID *string `json:"cloudCredentialId,omitempty" tf:"cloud_credential_id,omitempty"`
// +kubebuilder:validation:Optional
CloudCredentialIDRef *v1.Reference `json:"cloudCredentialIdRef,omitempty" tf:"-"`
// +kubebuilder:validation:Optional
CloudCredentialIDSelector *v1.Selector `json:"cloudCredentialIdSelector,omitempty" tf:"-"`
// If enabled, the project will be deleted on the expiration date and it will not be possible to recover it. Defaults to `false`. Required with: `expiration_date`.
// +kubebuilder:validation:Optional
DeleteOnExpiration *bool `json:"deleteOnExpiration,omitempty" tf:"delete_on_expiration,omitempty"`
// Project's expiration date in the format: 'dd/mm/yyyy'.
// +kubebuilder:validation:Optional
ExpirationDate *string `json:"expirationDate,omitempty" tf:"expiration_date,omitempty"`
// List of flavors bound to the project.
// +kubebuilder:validation:Optional
Flavors []*string `json:"flavors,omitempty" tf:"flavors,omitempty"`
// List of images bound to the project.
// +kubebuilder:validation:Optional
Images []*string `json:"images,omitempty" tf:"images,omitempty"`
// ID of the project's Kubernetes profile. Defaults to the default Kubernetes profile of the project's organization.
// +crossplane:generate:reference:type=github.com/nivraph/provider-jet-taikun/apis/kubernetesprofile/v1alpha1.Profile
// +kubebuilder:validation:Optional
KubernetesProfileID *string `json:"kubernetesProfileId,omitempty" tf:"kubernetes_profile_id,omitempty"`
// +kubebuilder:validation:Optional
KubernetesProfileIDRef *v1.Reference `json:"kubernetesProfileIdRef,omitempty" tf:"-"`
// +kubebuilder:validation:Optional
KubernetesProfileIDSelector *v1.Selector `json:"kubernetesProfileIdSelector,omitempty" tf:"-"`
// Kubernetes Version at project creation. Use the meta-argument `ignore_changes` to ignore future upgrades.
// +kubebuilder:validation:Optional
KubernetesVersion *string `json:"kubernetesVersion,omitempty" tf:"kubernetes_version,omitempty"`
// Indicates whether to lock the project. Defaults to `false`.
// +kubebuilder:validation:Optional
Lock *bool `json:"lock,omitempty" tf:"lock,omitempty"`
// Kubernetes cluster monitoring. Defaults to `false`.
// +kubebuilder:validation:Optional
Monitoring *bool `json:"monitoring,omitempty" tf:"monitoring,omitempty"`
// Project name.
// +kubebuilder:validation:Required
Name *string `json:"name" tf:"name,omitempty"`
// ID of the organization which owns the project.
// +crossplane:generate:reference:type=github.com/nivraph/provider-jet-taikun/apis/organization/v1alpha1.Organization
// +kubebuilder:validation:Optional
OrganizationID *string `json:"organizationId,omitempty" tf:"organization_id,omitempty"`
// +kubebuilder:validation:Optional
OrganizationIDRef *v1.Reference `json:"organizationIdRef,omitempty" tf:"-"`
// +kubebuilder:validation:Optional
OrganizationIDSelector *v1.Selector `json:"organizationIdSelector,omitempty" tf:"-"`
// ID of the Policy profile. If unspecified, Gatekeeper is disabled.
// +crossplane:generate:reference:type=github.com/nivraph/provider-jet-taikun/apis/policyprofile/v1alpha1.Profile
// +kubebuilder:validation:Optional
PolicyProfileID *string `json:"policyProfileId,omitempty" tf:"policy_profile_id,omitempty"`
// +kubebuilder:validation:Optional
PolicyProfileIDRef *v1.Reference `json:"policyProfileIdRef,omitempty" tf:"-"`
// +kubebuilder:validation:Optional
PolicyProfileIDSelector *v1.Selector `json:"policyProfileIdSelector,omitempty" tf:"-"`
// Maximum CPU units. Defaults to `1000000`.
// +kubebuilder:validation:Optional
QuotaCPUUnits *float64 `json:"quotaCpuUnits,omitempty" tf:"quota_cpu_units,omitempty"`
// Maximum disk size in GBs. Defaults to `102400`.
// +kubebuilder:validation:Optional
QuotaDiskSize *float64 `json:"quotaDiskSize,omitempty" tf:"quota_disk_size,omitempty"`
// Maximum RAM size in GBs. Defaults to `102400`.
// +kubebuilder:validation:Optional
QuotaRAMSize *float64 `json:"quotaRamSize,omitempty" tf:"quota_ram_size,omitempty"`
// Maximum CPU units for standalone VMs. Defaults to `1000000`.
// +kubebuilder:validation:Optional
QuotaVMCPUUnits *float64 `json:"quotaVmCpuUnits,omitempty" tf:"quota_vm_cpu_units,omitempty"`
// Maximum RAM size in GBs for standalone VMs. Defaults to `102400`.
// +kubebuilder:validation:Optional
QuotaVMRAMSize *float64 `json:"quotaVmRamSize,omitempty" tf:"quota_vm_ram_size,omitempty"`
// Maximum volume size in GBs for standalone VMs. Defaults to `102400`.
// +kubebuilder:validation:Optional
QuotaVMVolumeSize *float64 `json:"quotaVmVolumeSize,omitempty" tf:"quota_vm_volume_size,omitempty"`
// Router ID end range (specify only if using OpenStack cloud credentials with Taikun Load Balancer enabled). Required with: `router_id_start_range`, `taikun_lb_flavor`.
// +kubebuilder:validation:Optional
RouterIDEndRange *float64 `json:"routerIdEndRange,omitempty" tf:"router_id_end_range,omitempty"`
// Router ID start range (specify only if using OpenStack cloud credentials with Taikun Load Balancer enabled). Required with: `router_id_end_range`, `taikun_lb_flavor`.
// +kubebuilder:validation:Optional
RouterIDStartRange *float64 `json:"routerIdStartRange,omitempty" tf:"router_id_start_range,omitempty"`
// Bastion server. Required with: `server_kubemaster`, `server_kubeworker`.
// +kubebuilder:validation:Optional
ServerBastion []ServerBastionParameters `json:"serverBastion,omitempty" tf:"server_bastion,omitempty"`
// Kubemaster server. Required with: `server_bastion`, `server_kubeworker`.
// +kubebuilder:validation:Optional
ServerKubemaster []ServerKubemasterParameters `json:"serverKubemaster,omitempty" tf:"server_kubemaster,omitempty"`
// Kubeworker server. Required with: `server_bastion`, `server_kubemaster`.
// +kubebuilder:validation:Optional
ServerKubeworker []ServerKubeworkerParameters `json:"serverKubeworker,omitempty" tf:"server_kubeworker,omitempty"`
// OpenStack flavor for the Taikun load balancer (specify only if using OpenStack cloud credentials with Taikun Load Balancer enabled). Required with: `router_id_end_range`, `router_id_start_range`.
// +kubebuilder:validation:Optional
TaikunLBFlavor *string `json:"taikunLbFlavor,omitempty" tf:"taikun_lb_flavor,omitempty"`
// Virtual machines.
// +kubebuilder:validation:Optional
VM []VMParameters `json:"vm,omitempty" tf:"vm,omitempty"`
}
type ServerBastionObservation struct {
CreatedBy *string `json:"createdBy,omitempty" tf:"created_by,omitempty"`
ID *string `json:"id,omitempty" tf:"id,omitempty"`
IP *string `json:"ip,omitempty" tf:"ip,omitempty"`
LastModified *string `json:"lastModified,omitempty" tf:"last_modified,omitempty"`
LastModifiedBy *string `json:"lastModifiedBy,omitempty" tf:"last_modified_by,omitempty"`
Status *string `json:"status,omitempty" tf:"status,omitempty"`
}
type ServerBastionParameters struct {
// The server's disk size in GBs. Defaults to `30`.
// +kubebuilder:validation:Optional
DiskSize *float64 `json:"diskSize,omitempty" tf:"disk_size,omitempty"`
// The server's flavor.
// +kubebuilder:validation:Required
Flavor *string `json:"flavor" tf:"flavor,omitempty"`
// Name of the server.
// +kubebuilder:validation:Required
Name *string `json:"name" tf:"name,omitempty"`
}
type ServerKubemasterObservation struct {
CreatedBy *string `json:"createdBy,omitempty" tf:"created_by,omitempty"`
ID *string `json:"id,omitempty" tf:"id,omitempty"`
IP *string `json:"ip,omitempty" tf:"ip,omitempty"`
LastModified *string `json:"lastModified,omitempty" tf:"last_modified,omitempty"`
LastModifiedBy *string `json:"lastModifiedBy,omitempty" tf:"last_modified_by,omitempty"`
Status *string `json:"status,omitempty" tf:"status,omitempty"`
}
type ServerKubemasterParameters struct {
// The server's disk size in GBs. Defaults to `30`.
// +kubebuilder:validation:Optional
DiskSize *float64 `json:"diskSize,omitempty" tf:"disk_size,omitempty"`
// The server's flavor.
// +kubebuilder:validation:Required
Flavor *string `json:"flavor" tf:"flavor,omitempty"`
// Attach Kubernetes node labels.
// +kubebuilder:validation:Optional
KubernetesNodeLabel []KubernetesNodeLabelParameters `json:"kubernetesNodeLabel,omitempty" tf:"kubernetes_node_label,omitempty"`
// Name of the server.
// +kubebuilder:validation:Required
Name *string `json:"name" tf:"name,omitempty"`
}
type ServerKubeworkerKubernetesNodeLabelObservation struct {
}
type ServerKubeworkerKubernetesNodeLabelParameters struct {
// Kubernetes node label key.
// +kubebuilder:validation:Required
Key *string `json:"key" tf:"key,omitempty"`
// Kubernetes node label value.
// +kubebuilder:validation:Required
Value *string `json:"value" tf:"value,omitempty"`
}
type ServerKubeworkerObservation struct {
CreatedBy *string `json:"createdBy,omitempty" tf:"created_by,omitempty"`
ID *string `json:"id,omitempty" tf:"id,omitempty"`
IP *string `json:"ip,omitempty" tf:"ip,omitempty"`
LastModified *string `json:"lastModified,omitempty" tf:"last_modified,omitempty"`
LastModifiedBy *string `json:"lastModifiedBy,omitempty" tf:"last_modified_by,omitempty"`
Status *string `json:"status,omitempty" tf:"status,omitempty"`
}
type ServerKubeworkerParameters struct {
// The server's disk size in GBs. Defaults to `30`.
// +kubebuilder:validation:Optional
DiskSize *float64 `json:"diskSize,omitempty" tf:"disk_size,omitempty"`
// The server's flavor.
// +kubebuilder:validation:Required
Flavor *string `json:"flavor" tf:"flavor,omitempty"`
// Attach Kubernetes node labels.
// +kubebuilder:validation:Optional
KubernetesNodeLabel []ServerKubeworkerKubernetesNodeLabelParameters `json:"kubernetesNodeLabel,omitempty" tf:"kubernetes_node_label,omitempty"`
// Name of the server.
// +kubebuilder:validation:Required
Name *string `json:"name" tf:"name,omitempty"`
}
type TagObservation struct {
}
type TagParameters struct {
// Key of the tag.
// +kubebuilder:validation:Required
Key *string `json:"key" tf:"key,omitempty"`
// Value of the tag.
// +kubebuilder:validation:Required
Value *string `json:"value" tf:"value,omitempty"`
}
type VMObservation struct {
AccessIP *string `json:"accessIp,omitempty" tf:"access_ip,omitempty"`
CreatedBy *string `json:"createdBy,omitempty" tf:"created_by,omitempty"`
Disk []DiskObservation `json:"disk,omitempty" tf:"disk,omitempty"`
ID *string `json:"id,omitempty" tf:"id,omitempty"`
IP *string `json:"ip,omitempty" tf:"ip,omitempty"`
ImageName *string `json:"imageName,omitempty" tf:"image_name,omitempty"`
LastModified *string `json:"lastModified,omitempty" tf:"last_modified,omitempty"`
LastModifiedBy *string `json:"lastModifiedBy,omitempty" tf:"last_modified_by,omitempty"`
Status *string `json:"status,omitempty" tf:"status,omitempty"`
}
type VMParameters struct {
// Cloud init (updating this field will recreate the VM). Defaults to ` `.
// +kubebuilder:validation:Optional
CloudInit *string `json:"cloudInit,omitempty" tf:"cloud_init,omitempty"`
// Disks associated with the VM.
// +kubebuilder:validation:Optional
Disk []DiskParameters `json:"disk,omitempty" tf:"disk,omitempty"`
// The VM's flavor.
// +kubebuilder:validation:Required
Flavor *string `json:"flavor" tf:"flavor,omitempty"`
// The VM's image ID (updating this field will recreate the VM).
// +kubebuilder:validation:Required
ImageID *string `json:"imageId" tf:"image_id,omitempty"`
// Name of the VM (updating this field will recreate the VM).
// +kubebuilder:validation:Required
Name *string `json:"name" tf:"name,omitempty"`
// Whether a public IP will be available (updating this field will recreate the VM if the project isn't hosted on OpenStack). Defaults to `false`.
// +kubebuilder:validation:Optional
PublicIP *bool `json:"publicIp,omitempty" tf:"public_ip,omitempty"`
// Standalone profile ID bound to the VM (updating this field will recreate the VM).
// +kubebuilder:validation:Required
StandaloneProfileID *string `json:"standaloneProfileId" tf:"standalone_profile_id,omitempty"`
// Tags linked to the VM (updating this field will recreate the VM).
// +kubebuilder:validation:Optional
Tag []TagParameters `json:"tag,omitempty" tf:"tag,omitempty"`
// The VM's username (required for Azure).
// +kubebuilder:validation:Optional
Username *string `json:"username,omitempty" tf:"username,omitempty"`
// The VM's volume size in GBs (updating this field will recreate the VM).
// +kubebuilder:validation:Required
VolumeSize *float64 `json:"volumeSize" tf:"volume_size,omitempty"`
// Volume type (updating this field will recreate the VM).
// +kubebuilder:validation:Optional
VolumeType *string `json:"volumeType,omitempty" tf:"volume_type,omitempty"`
}
// ProjectSpec defines the desired state of Project
type ProjectSpec struct {
v1.ResourceSpec `json:",inline"`
ForProvider ProjectParameters `json:"forProvider"`
}
// ProjectStatus defines the observed state of Project.
type ProjectStatus struct {
v1.ResourceStatus `json:",inline"`
AtProvider ProjectObservation `json:"atProvider,omitempty"`
}
// +kubebuilder:object:root=true
// Project is the Schema for the Projects API
// +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,taikunjet}
type Project struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec ProjectSpec `json:"spec"`
Status ProjectStatus `json:"status,omitempty"`
}
// +kubebuilder:object:root=true
// ProjectList contains a list of Projects
type ProjectList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Project `json:"items"`
}
// Repository type metadata.
var (
Project_Kind = "Project"
Project_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: Project_Kind}.String()
Project_KindAPIVersion = Project_Kind + "." + CRDGroupVersion.String()
Project_GroupVersionKind = CRDGroupVersion.WithKind(Project_Kind)
)
func init() {
SchemeBuilder.Register(&Project{}, &ProjectList{})
}