generated from crossplane/upjet-provider-template
-
Notifications
You must be signed in to change notification settings - Fork 8
/
zz_postgresql_types.go
executable file
·339 lines (264 loc) · 17.9 KB
/
zz_postgresql_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
/*
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 PostgreSQLInitParameters struct {
// A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format. Use linode_database_access_controls to manage your allow list separately.
// A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format.
// +listType=set
AllowList []*string `json:"allowList,omitempty" tf:"allow_list,omitempty"`
// The number of Linode Instance nodes deployed to the Managed Database. (default 1)
// The number of Linode Instance nodes deployed to the Managed Database. Defaults to 1.
ClusterSize *float64 `json:"clusterSize,omitempty" tf:"cluster_size,omitempty"`
// Whether the Managed Databases is encrypted. (default false)
// Whether the Managed Databases is encrypted.
Encrypted *bool `json:"encrypted,omitempty" tf:"encrypted,omitempty"`
// The Managed Database engine in engine/version format. (e.g. postgresql/13.2)
// The Managed Database engine in engine/version format. (e.g. mysql/8.0.30)
EngineID *string `json:"engineId,omitempty" tf:"engine_id,omitempty"`
// A unique, user-defined string referring to the Managed Database.
// A unique, user-defined string referring to the Managed Database.
Label *string `json:"label,omitempty" tf:"label,omitempty"`
// The region to use for the Managed Database.
// The region to use for the Managed Database.
Region *string `json:"region,omitempty" tf:"region,omitempty"`
// The synchronization level of the replicating server. (on, local, remote_write, remote_apply, off; default off)
// The synchronization level of the replicating server.Must be `local` or `off` for the `asynch` replication type. Must be `on`, `remote_write`, or `remote_apply` for the `semi_synch` replication type.
ReplicationCommitType *string `json:"replicationCommitType,omitempty" tf:"replication_commit_type,omitempty"`
// The replication method used for the Managed Database. (none, asynch, semi_synch; default none)
// The replication method used for the Managed Database. Must be `none` for a single node cluster. Must be `asynch` or `semi_synch` for a high availability cluster.
ReplicationType *string `json:"replicationType,omitempty" tf:"replication_type,omitempty"`
// Whether to require SSL credentials to establish a connection to the Managed Database. (default false)
// Whether to require SSL credentials to establish a connection to the Managed Database.
SSLConnection *bool `json:"sslConnection,omitempty" tf:"ssl_connection,omitempty"`
// The Linode Instance type used for the nodes of the Managed Database instance.
// The Linode Instance type used by the Managed Database for its nodes.
Type *string `json:"type,omitempty" tf:"type,omitempty"`
// Configuration settings for automated patch update maintenance for the Managed Database.
Updates []PostgreSQLUpdatesInitParameters `json:"updates,omitempty" tf:"updates,omitempty"`
}
type PostgreSQLObservation struct {
// A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format. Use linode_database_access_controls to manage your allow list separately.
// A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format.
// +listType=set
AllowList []*string `json:"allowList,omitempty" tf:"allow_list,omitempty"`
// The number of Linode Instance nodes deployed to the Managed Database. (default 1)
// The number of Linode Instance nodes deployed to the Managed Database. Defaults to 1.
ClusterSize *float64 `json:"clusterSize,omitempty" tf:"cluster_size,omitempty"`
// When this Managed Database was created.
// When this Managed Database was created.
Created *string `json:"created,omitempty" tf:"created,omitempty"`
// Whether the Managed Databases is encrypted. (default false)
// Whether the Managed Databases is encrypted.
Encrypted *bool `json:"encrypted,omitempty" tf:"encrypted,omitempty"`
// The Managed Database engine. (e.g. postgresql)
// The Managed Database engine.
Engine *string `json:"engine,omitempty" tf:"engine,omitempty"`
// The Managed Database engine in engine/version format. (e.g. postgresql/13.2)
// The Managed Database engine in engine/version format. (e.g. mysql/8.0.30)
EngineID *string `json:"engineId,omitempty" tf:"engine_id,omitempty"`
// The primary host for the Managed Database.
// The primary host for the Managed Database.
HostPrimary *string `json:"hostPrimary,omitempty" tf:"host_primary,omitempty"`
// The secondary/private network host for the Managed Database.
// The secondary host for the Managed Database.
HostSecondary *string `json:"hostSecondary,omitempty" tf:"host_secondary,omitempty"`
// The ID of the Managed Database.
ID *string `json:"id,omitempty" tf:"id,omitempty"`
// A unique, user-defined string referring to the Managed Database.
// A unique, user-defined string referring to the Managed Database.
Label *string `json:"label,omitempty" tf:"label,omitempty"`
// The access port for this Managed Database.
Port *float64 `json:"port,omitempty" tf:"port,omitempty"`
// The region to use for the Managed Database.
// The region to use for the Managed Database.
Region *string `json:"region,omitempty" tf:"region,omitempty"`
// The synchronization level of the replicating server. (on, local, remote_write, remote_apply, off; default off)
// The synchronization level of the replicating server.Must be `local` or `off` for the `asynch` replication type. Must be `on`, `remote_write`, or `remote_apply` for the `semi_synch` replication type.
ReplicationCommitType *string `json:"replicationCommitType,omitempty" tf:"replication_commit_type,omitempty"`
// The replication method used for the Managed Database. (none, asynch, semi_synch; default none)
// The replication method used for the Managed Database. Must be `none` for a single node cluster. Must be `asynch` or `semi_synch` for a high availability cluster.
ReplicationType *string `json:"replicationType,omitempty" tf:"replication_type,omitempty"`
// Whether to require SSL credentials to establish a connection to the Managed Database. (default false)
// Whether to require SSL credentials to establish a connection to the Managed Database.
SSLConnection *bool `json:"sslConnection,omitempty" tf:"ssl_connection,omitempty"`
// The operating status of the Managed Database.
// The operating status of the Managed Database.
Status *string `json:"status,omitempty" tf:"status,omitempty"`
// The Linode Instance type used for the nodes of the Managed Database instance.
// The Linode Instance type used by the Managed Database for its nodes.
Type *string `json:"type,omitempty" tf:"type,omitempty"`
// When this Managed Database was last updated.
// When this Managed Database was last updated.
Updated *string `json:"updated,omitempty" tf:"updated,omitempty"`
// Configuration settings for automated patch update maintenance for the Managed Database.
Updates []PostgreSQLUpdatesObservation `json:"updates,omitempty" tf:"updates,omitempty"`
// The Managed Database engine version. (e.g. 13.2)
// The Managed Database engine version.
Version *string `json:"version,omitempty" tf:"version,omitempty"`
}
type PostgreSQLParameters struct {
// A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format. Use linode_database_access_controls to manage your allow list separately.
// A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format.
// +kubebuilder:validation:Optional
// +listType=set
AllowList []*string `json:"allowList,omitempty" tf:"allow_list,omitempty"`
// The number of Linode Instance nodes deployed to the Managed Database. (default 1)
// The number of Linode Instance nodes deployed to the Managed Database. Defaults to 1.
// +kubebuilder:validation:Optional
ClusterSize *float64 `json:"clusterSize,omitempty" tf:"cluster_size,omitempty"`
// Whether the Managed Databases is encrypted. (default false)
// Whether the Managed Databases is encrypted.
// +kubebuilder:validation:Optional
Encrypted *bool `json:"encrypted,omitempty" tf:"encrypted,omitempty"`
// The Managed Database engine in engine/version format. (e.g. postgresql/13.2)
// The Managed Database engine in engine/version format. (e.g. mysql/8.0.30)
// +kubebuilder:validation:Optional
EngineID *string `json:"engineId,omitempty" tf:"engine_id,omitempty"`
// A unique, user-defined string referring to the Managed Database.
// A unique, user-defined string referring to the Managed Database.
// +kubebuilder:validation:Optional
Label *string `json:"label,omitempty" tf:"label,omitempty"`
// The region to use for the Managed Database.
// The region to use for the Managed Database.
// +kubebuilder:validation:Optional
Region *string `json:"region,omitempty" tf:"region,omitempty"`
// The synchronization level of the replicating server. (on, local, remote_write, remote_apply, off; default off)
// The synchronization level of the replicating server.Must be `local` or `off` for the `asynch` replication type. Must be `on`, `remote_write`, or `remote_apply` for the `semi_synch` replication type.
// +kubebuilder:validation:Optional
ReplicationCommitType *string `json:"replicationCommitType,omitempty" tf:"replication_commit_type,omitempty"`
// The replication method used for the Managed Database. (none, asynch, semi_synch; default none)
// The replication method used for the Managed Database. Must be `none` for a single node cluster. Must be `asynch` or `semi_synch` for a high availability cluster.
// +kubebuilder:validation:Optional
ReplicationType *string `json:"replicationType,omitempty" tf:"replication_type,omitempty"`
// Whether to require SSL credentials to establish a connection to the Managed Database. (default false)
// Whether to require SSL credentials to establish a connection to the Managed Database.
// +kubebuilder:validation:Optional
SSLConnection *bool `json:"sslConnection,omitempty" tf:"ssl_connection,omitempty"`
// The Linode Instance type used for the nodes of the Managed Database instance.
// The Linode Instance type used by the Managed Database for its nodes.
// +kubebuilder:validation:Optional
Type *string `json:"type,omitempty" tf:"type,omitempty"`
// Configuration settings for automated patch update maintenance for the Managed Database.
// +kubebuilder:validation:Optional
Updates []PostgreSQLUpdatesParameters `json:"updates,omitempty" tf:"updates,omitempty"`
}
type PostgreSQLUpdatesInitParameters struct {
// The day to perform maintenance. (monday, tuesday, ...)
// The day to perform maintenance.
DayOfWeek *string `json:"dayOfWeek,omitempty" tf:"day_of_week,omitempty"`
// The maximum maintenance window time in hours. (1..3)
// The maximum maintenance window time in hours.
Duration *float64 `json:"duration,omitempty" tf:"duration,omitempty"`
// Whether maintenance occurs on a weekly or monthly basis. (weekly, monthly)
// Whether maintenance occurs on a weekly or monthly basis.
Frequency *string `json:"frequency,omitempty" tf:"frequency,omitempty"`
// The hour to begin maintenance based in UTC time. (0..23)
// The hour to begin maintenance based in UTC time.
HourOfDay *float64 `json:"hourOfDay,omitempty" tf:"hour_of_day,omitempty"`
// The week of the month to perform monthly frequency updates. Required for monthly frequency updates. (1..4)
// The week of the month to perform monthly frequency updates. Required for monthly frequency updates.
WeekOfMonth *float64 `json:"weekOfMonth,omitempty" tf:"week_of_month,omitempty"`
}
type PostgreSQLUpdatesObservation struct {
// The day to perform maintenance. (monday, tuesday, ...)
// The day to perform maintenance.
DayOfWeek *string `json:"dayOfWeek,omitempty" tf:"day_of_week,omitempty"`
// The maximum maintenance window time in hours. (1..3)
// The maximum maintenance window time in hours.
Duration *float64 `json:"duration,omitempty" tf:"duration,omitempty"`
// Whether maintenance occurs on a weekly or monthly basis. (weekly, monthly)
// Whether maintenance occurs on a weekly or monthly basis.
Frequency *string `json:"frequency,omitempty" tf:"frequency,omitempty"`
// The hour to begin maintenance based in UTC time. (0..23)
// The hour to begin maintenance based in UTC time.
HourOfDay *float64 `json:"hourOfDay,omitempty" tf:"hour_of_day,omitempty"`
// The week of the month to perform monthly frequency updates. Required for monthly frequency updates. (1..4)
// The week of the month to perform monthly frequency updates. Required for monthly frequency updates.
WeekOfMonth *float64 `json:"weekOfMonth,omitempty" tf:"week_of_month,omitempty"`
}
type PostgreSQLUpdatesParameters struct {
// The day to perform maintenance. (monday, tuesday, ...)
// The day to perform maintenance.
// +kubebuilder:validation:Optional
DayOfWeek *string `json:"dayOfWeek" tf:"day_of_week,omitempty"`
// The maximum maintenance window time in hours. (1..3)
// The maximum maintenance window time in hours.
// +kubebuilder:validation:Optional
Duration *float64 `json:"duration" tf:"duration,omitempty"`
// Whether maintenance occurs on a weekly or monthly basis. (weekly, monthly)
// Whether maintenance occurs on a weekly or monthly basis.
// +kubebuilder:validation:Optional
Frequency *string `json:"frequency" tf:"frequency,omitempty"`
// The hour to begin maintenance based in UTC time. (0..23)
// The hour to begin maintenance based in UTC time.
// +kubebuilder:validation:Optional
HourOfDay *float64 `json:"hourOfDay" tf:"hour_of_day,omitempty"`
// The week of the month to perform monthly frequency updates. Required for monthly frequency updates. (1..4)
// The week of the month to perform monthly frequency updates. Required for monthly frequency updates.
// +kubebuilder:validation:Optional
WeekOfMonth *float64 `json:"weekOfMonth,omitempty" tf:"week_of_month,omitempty"`
}
// PostgreSQLSpec defines the desired state of PostgreSQL
type PostgreSQLSpec struct {
v1.ResourceSpec `json:",inline"`
ForProvider PostgreSQLParameters `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 PostgreSQLInitParameters `json:"initProvider,omitempty"`
}
// PostgreSQLStatus defines the observed state of PostgreSQL.
type PostgreSQLStatus struct {
v1.ResourceStatus `json:",inline"`
AtProvider PostgreSQLObservation `json:"atProvider,omitempty"`
}
// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:storageversion
// PostgreSQL is the Schema for the PostgreSQLs API. Manages a Linode PostgreSQL Database.
// +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status"
// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].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,linode}
type PostgreSQL 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.engineId) || (has(self.initProvider) && has(self.initProvider.engineId))",message="spec.forProvider.engineId is a required parameter"
// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.label) || (has(self.initProvider) && has(self.initProvider.label))",message="spec.forProvider.label is a required parameter"
// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.region) || (has(self.initProvider) && has(self.initProvider.region))",message="spec.forProvider.region is a required parameter"
// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.type) || (has(self.initProvider) && has(self.initProvider.type))",message="spec.forProvider.type is a required parameter"
Spec PostgreSQLSpec `json:"spec"`
Status PostgreSQLStatus `json:"status,omitempty"`
}
// +kubebuilder:object:root=true
// PostgreSQLList contains a list of PostgreSQLs
type PostgreSQLList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []PostgreSQL `json:"items"`
}
// Repository type metadata.
var (
PostgreSQL_Kind = "PostgreSQL"
PostgreSQL_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: PostgreSQL_Kind}.String()
PostgreSQL_KindAPIVersion = PostgreSQL_Kind + "." + CRDGroupVersion.String()
PostgreSQL_GroupVersionKind = CRDGroupVersion.WithKind(PostgreSQL_Kind)
)
func init() {
SchemeBuilder.Register(&PostgreSQL{}, &PostgreSQLList{})
}