-
Notifications
You must be signed in to change notification settings - Fork 64
/
zz_serviceattachment_types.go
executable file
·335 lines (262 loc) · 16.5 KB
/
zz_serviceattachment_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
// SPDX-FileCopyrightText: 2024 The Crossplane Authors <https://crossplane.io>
//
// SPDX-License-Identifier: Apache-2.0
// 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 ConnectedEndpointsInitParameters struct {
}
type ConnectedEndpointsObservation struct {
// (Output)
// The URL of the consumer forwarding rule.
Endpoint *string `json:"endpoint,omitempty" tf:"endpoint,omitempty"`
// (Output)
// The status of the connection from the consumer forwarding rule to
// this service attachment.
Status *string `json:"status,omitempty" tf:"status,omitempty"`
}
type ConnectedEndpointsParameters struct {
}
type ConsumerAcceptListsInitParameters struct {
// The number of consumer forwarding rules the consumer project can
// create.
ConnectionLimit *float64 `json:"connectionLimit,omitempty" tf:"connection_limit,omitempty"`
// A project that is allowed to connect to this service attachment.
ProjectIDOrNum *string `json:"projectIdOrNum,omitempty" tf:"project_id_or_num,omitempty"`
}
type ConsumerAcceptListsObservation struct {
// The number of consumer forwarding rules the consumer project can
// create.
ConnectionLimit *float64 `json:"connectionLimit,omitempty" tf:"connection_limit,omitempty"`
// A project that is allowed to connect to this service attachment.
ProjectIDOrNum *string `json:"projectIdOrNum,omitempty" tf:"project_id_or_num,omitempty"`
}
type ConsumerAcceptListsParameters struct {
// The number of consumer forwarding rules the consumer project can
// create.
// +kubebuilder:validation:Optional
ConnectionLimit *float64 `json:"connectionLimit" tf:"connection_limit,omitempty"`
// A project that is allowed to connect to this service attachment.
// +kubebuilder:validation:Optional
ProjectIDOrNum *string `json:"projectIdOrNum" tf:"project_id_or_num,omitempty"`
}
type ServiceAttachmentInitParameters struct {
// The connection preference to use for this service attachment. Valid
// values include "ACCEPT_AUTOMATIC", "ACCEPT_MANUAL".
ConnectionPreference *string `json:"connectionPreference,omitempty" tf:"connection_preference,omitempty"`
// An array of projects that are allowed to connect to this service
// attachment.
// Structure is documented below.
ConsumerAcceptLists []ConsumerAcceptListsInitParameters `json:"consumerAcceptLists,omitempty" tf:"consumer_accept_lists,omitempty"`
// An array of projects that are not allowed to connect to this service
// attachment.
ConsumerRejectLists []*string `json:"consumerRejectLists,omitempty" tf:"consumer_reject_lists,omitempty"`
// An optional description of this resource.
Description *string `json:"description,omitempty" tf:"description,omitempty"`
// If specified, the domain name will be used during the integration between
// the PSC connected endpoints and the Cloud DNS. For example, this is a
// valid domain name: "p.mycompany.com.". Current max number of domain names
// supported is 1.
DomainNames []*string `json:"domainNames,omitempty" tf:"domain_names,omitempty"`
// If true, enable the proxy protocol which is for supplying client TCP/IP
// address data in TCP connections that traverse proxies on their way to
// destination servers.
EnableProxyProtocol *bool `json:"enableProxyProtocol,omitempty" tf:"enable_proxy_protocol,omitempty"`
// An array of subnets that is provided for NAT in this service attachment.
// +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/compute/v1beta2.Subnetwork
NATSubnets []*string `json:"natSubnets,omitempty" tf:"nat_subnets,omitempty"`
// References to Subnetwork in compute to populate natSubnets.
// +kubebuilder:validation:Optional
NATSubnetsRefs []v1.Reference `json:"natSubnetsRefs,omitempty" tf:"-"`
// Selector for a list of Subnetwork in compute to populate natSubnets.
// +kubebuilder:validation:Optional
NATSubnetsSelector *v1.Selector `json:"natSubnetsSelector,omitempty" tf:"-"`
// 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"`
// This flag determines whether a consumer accept/reject list change can reconcile the statuses of existing ACCEPTED or REJECTED PSC endpoints.
// If false, connection policy update will only affect existing PENDING PSC endpoints. Existing ACCEPTED/REJECTED endpoints will remain untouched regardless how the connection policy is modified .
// If true, update will affect both PENDING and ACCEPTED/REJECTED PSC endpoints. For example, an ACCEPTED PSC endpoint will be moved to REJECTED if its project is added to the reject list.
ReconcileConnections *bool `json:"reconcileConnections,omitempty" tf:"reconcile_connections,omitempty"`
// The URL of a forwarding rule that represents the service identified by
// this service attachment.
// +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/compute/v1beta2.ForwardingRule
// +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID()
TargetService *string `json:"targetService,omitempty" tf:"target_service,omitempty"`
// Reference to a ForwardingRule in compute to populate targetService.
// +kubebuilder:validation:Optional
TargetServiceRef *v1.Reference `json:"targetServiceRef,omitempty" tf:"-"`
// Selector for a ForwardingRule in compute to populate targetService.
// +kubebuilder:validation:Optional
TargetServiceSelector *v1.Selector `json:"targetServiceSelector,omitempty" tf:"-"`
}
type ServiceAttachmentObservation struct {
// An array of the consumer forwarding rules connected to this service
// attachment.
// Structure is documented below.
ConnectedEndpoints []ConnectedEndpointsObservation `json:"connectedEndpoints,omitempty" tf:"connected_endpoints,omitempty"`
// The connection preference to use for this service attachment. Valid
// values include "ACCEPT_AUTOMATIC", "ACCEPT_MANUAL".
ConnectionPreference *string `json:"connectionPreference,omitempty" tf:"connection_preference,omitempty"`
// An array of projects that are allowed to connect to this service
// attachment.
// Structure is documented below.
ConsumerAcceptLists []ConsumerAcceptListsObservation `json:"consumerAcceptLists,omitempty" tf:"consumer_accept_lists,omitempty"`
// An array of projects that are not allowed to connect to this service
// attachment.
ConsumerRejectLists []*string `json:"consumerRejectLists,omitempty" tf:"consumer_reject_lists,omitempty"`
// An optional description of this resource.
Description *string `json:"description,omitempty" tf:"description,omitempty"`
// If specified, the domain name will be used during the integration between
// the PSC connected endpoints and the Cloud DNS. For example, this is a
// valid domain name: "p.mycompany.com.". Current max number of domain names
// supported is 1.
DomainNames []*string `json:"domainNames,omitempty" tf:"domain_names,omitempty"`
// If true, enable the proxy protocol which is for supplying client TCP/IP
// address data in TCP connections that traverse proxies on their way to
// destination servers.
EnableProxyProtocol *bool `json:"enableProxyProtocol,omitempty" tf:"enable_proxy_protocol,omitempty"`
// Fingerprint of this resource. This field is used internally during
// updates of this resource.
Fingerprint *string `json:"fingerprint,omitempty" tf:"fingerprint,omitempty"`
// an identifier for the resource with format projects/{{project}}/regions/{{region}}/serviceAttachments/{{name}}
ID *string `json:"id,omitempty" tf:"id,omitempty"`
// An array of subnets that is provided for NAT in this service attachment.
NATSubnets []*string `json:"natSubnets,omitempty" tf:"nat_subnets,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"`
// This flag determines whether a consumer accept/reject list change can reconcile the statuses of existing ACCEPTED or REJECTED PSC endpoints.
// If false, connection policy update will only affect existing PENDING PSC endpoints. Existing ACCEPTED/REJECTED endpoints will remain untouched regardless how the connection policy is modified .
// If true, update will affect both PENDING and ACCEPTED/REJECTED PSC endpoints. For example, an ACCEPTED PSC endpoint will be moved to REJECTED if its project is added to the reject list.
ReconcileConnections *bool `json:"reconcileConnections,omitempty" tf:"reconcile_connections,omitempty"`
// URL of the region where the resource resides.
Region *string `json:"region,omitempty" tf:"region,omitempty"`
// The URI of the created resource.
SelfLink *string `json:"selfLink,omitempty" tf:"self_link,omitempty"`
// The URL of a forwarding rule that represents the service identified by
// this service attachment.
TargetService *string `json:"targetService,omitempty" tf:"target_service,omitempty"`
}
type ServiceAttachmentParameters struct {
// The connection preference to use for this service attachment. Valid
// values include "ACCEPT_AUTOMATIC", "ACCEPT_MANUAL".
// +kubebuilder:validation:Optional
ConnectionPreference *string `json:"connectionPreference,omitempty" tf:"connection_preference,omitempty"`
// An array of projects that are allowed to connect to this service
// attachment.
// Structure is documented below.
// +kubebuilder:validation:Optional
ConsumerAcceptLists []ConsumerAcceptListsParameters `json:"consumerAcceptLists,omitempty" tf:"consumer_accept_lists,omitempty"`
// An array of projects that are not allowed to connect to this service
// attachment.
// +kubebuilder:validation:Optional
ConsumerRejectLists []*string `json:"consumerRejectLists,omitempty" tf:"consumer_reject_lists,omitempty"`
// An optional description of this resource.
// +kubebuilder:validation:Optional
Description *string `json:"description,omitempty" tf:"description,omitempty"`
// If specified, the domain name will be used during the integration between
// the PSC connected endpoints and the Cloud DNS. For example, this is a
// valid domain name: "p.mycompany.com.". Current max number of domain names
// supported is 1.
// +kubebuilder:validation:Optional
DomainNames []*string `json:"domainNames,omitempty" tf:"domain_names,omitempty"`
// If true, enable the proxy protocol which is for supplying client TCP/IP
// address data in TCP connections that traverse proxies on their way to
// destination servers.
// +kubebuilder:validation:Optional
EnableProxyProtocol *bool `json:"enableProxyProtocol,omitempty" tf:"enable_proxy_protocol,omitempty"`
// An array of subnets that is provided for NAT in this service attachment.
// +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/compute/v1beta2.Subnetwork
// +kubebuilder:validation:Optional
NATSubnets []*string `json:"natSubnets,omitempty" tf:"nat_subnets,omitempty"`
// References to Subnetwork in compute to populate natSubnets.
// +kubebuilder:validation:Optional
NATSubnetsRefs []v1.Reference `json:"natSubnetsRefs,omitempty" tf:"-"`
// Selector for a list of Subnetwork in compute to populate natSubnets.
// +kubebuilder:validation:Optional
NATSubnetsSelector *v1.Selector `json:"natSubnetsSelector,omitempty" tf:"-"`
// 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"`
// This flag determines whether a consumer accept/reject list change can reconcile the statuses of existing ACCEPTED or REJECTED PSC endpoints.
// If false, connection policy update will only affect existing PENDING PSC endpoints. Existing ACCEPTED/REJECTED endpoints will remain untouched regardless how the connection policy is modified .
// If true, update will affect both PENDING and ACCEPTED/REJECTED PSC endpoints. For example, an ACCEPTED PSC endpoint will be moved to REJECTED if its project is added to the reject list.
// +kubebuilder:validation:Optional
ReconcileConnections *bool `json:"reconcileConnections,omitempty" tf:"reconcile_connections,omitempty"`
// URL of the region where the resource resides.
// +kubebuilder:validation:Required
Region *string `json:"region" tf:"region,omitempty"`
// The URL of a forwarding rule that represents the service identified by
// this service attachment.
// +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/compute/v1beta2.ForwardingRule
// +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID()
// +kubebuilder:validation:Optional
TargetService *string `json:"targetService,omitempty" tf:"target_service,omitempty"`
// Reference to a ForwardingRule in compute to populate targetService.
// +kubebuilder:validation:Optional
TargetServiceRef *v1.Reference `json:"targetServiceRef,omitempty" tf:"-"`
// Selector for a ForwardingRule in compute to populate targetService.
// +kubebuilder:validation:Optional
TargetServiceSelector *v1.Selector `json:"targetServiceSelector,omitempty" tf:"-"`
}
// ServiceAttachmentSpec defines the desired state of ServiceAttachment
type ServiceAttachmentSpec struct {
v1.ResourceSpec `json:",inline"`
ForProvider ServiceAttachmentParameters `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 ServiceAttachmentInitParameters `json:"initProvider,omitempty"`
}
// ServiceAttachmentStatus defines the observed state of ServiceAttachment.
type ServiceAttachmentStatus struct {
v1.ResourceStatus `json:",inline"`
AtProvider ServiceAttachmentObservation `json:"atProvider,omitempty"`
}
// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:storageversion
// ServiceAttachment is the Schema for the ServiceAttachments API. Represents a ServiceAttachment resource.
// +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,gcp}
type ServiceAttachment 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.connectionPreference) || (has(self.initProvider) && has(self.initProvider.connectionPreference))",message="spec.forProvider.connectionPreference is a required parameter"
// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.enableProxyProtocol) || (has(self.initProvider) && has(self.initProvider.enableProxyProtocol))",message="spec.forProvider.enableProxyProtocol is a required parameter"
Spec ServiceAttachmentSpec `json:"spec"`
Status ServiceAttachmentStatus `json:"status,omitempty"`
}
// +kubebuilder:object:root=true
// ServiceAttachmentList contains a list of ServiceAttachments
type ServiceAttachmentList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []ServiceAttachment `json:"items"`
}
// Repository type metadata.
var (
ServiceAttachment_Kind = "ServiceAttachment"
ServiceAttachment_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: ServiceAttachment_Kind}.String()
ServiceAttachment_KindAPIVersion = ServiceAttachment_Kind + "." + CRDGroupVersion.String()
ServiceAttachment_GroupVersionKind = CRDGroupVersion.WithKind(ServiceAttachment_Kind)
)
func init() {
SchemeBuilder.Register(&ServiceAttachment{}, &ServiceAttachmentList{})
}