-
Notifications
You must be signed in to change notification settings - Fork 59
/
zz_forwardingrule_types.go
executable file
·461 lines (380 loc) · 22.2 KB
/
zz_forwardingrule_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
/*
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 ForwardingRuleObservation struct {
// This field can only be used:
AllPorts *bool `json:"allPorts,omitempty" tf:"all_ports,omitempty"`
// This field is used along with the backend_service field for
// internal load balancing or with the target field for internal
// TargetInstance.
// If the field is set to TRUE, clients can access ILB from all
// regions.
// Otherwise only allows access from clients in the same region as the
// internal load balancer.
AllowGlobalAccess *bool `json:"allowGlobalAccess,omitempty" tf:"allow_global_access,omitempty"`
// Identifies the backend service to which the forwarding rule sends traffic.
// Required for Internal TCP/UDP Load Balancing and Network Load Balancing;
// must be omitted for all other load balancer types.
BackendService *string `json:"backendService,omitempty" tf:"backend_service,omitempty"`
// [Output Only] The URL for the corresponding base Forwarding Rule. By base Forwarding Rule, we mean the Forwarding Rule that has the same IP address, protocol, and port settings with the current Forwarding Rule, but without sourceIPRanges specified. Always empty if the current Forwarding Rule does not have sourceIPRanges specified.
BaseForwardingRule *string `json:"baseForwardingRule,omitempty" tf:"base_forwarding_rule,omitempty"`
// Creation timestamp in RFC3339 text format.
CreationTimestamp *string `json:"creationTimestamp,omitempty" tf:"creation_timestamp,omitempty"`
// An optional description of this resource. Provide this property when
// you create the resource.
Description *string `json:"description,omitempty" tf:"description,omitempty"`
// an identifier for the resource with format projects/{{project}}/regions/{{region}}/forwardingRules/{{name}}
ID *string `json:"id,omitempty" tf:"id,omitempty"`
// IP address for which this forwarding rule accepts traffic. When a client
// sends traffic to this IP address, the forwarding rule directs the traffic
// to the referenced target or backendService.
// While creating a forwarding rule, specifying an IPAddress is
// required under the following circumstances:
IPAddress *string `json:"ipAddress,omitempty" tf:"ip_address,omitempty"`
// The IP protocol to which this rule applies.
// For protocol forwarding, valid
// options are TCP, UDP, ESP,
// AH, SCTP, ICMP and
// L3_DEFAULT.
// The valid IP protocols are different for different load balancing products
// as described in Load balancing
// features.
// Possible values are: TCP, UDP, ESP, AH, SCTP, ICMP, L3_DEFAULT.
IPProtocol *string `json:"ipProtocol,omitempty" tf:"ip_protocol,omitempty"`
// Indicates whether or not this load balancer can be used as a collector for
// packet mirroring. To prevent mirroring loops, instances behind this
// load balancer will not have their traffic mirrored even if a
// PacketMirroring rule applies to them.
// This can only be set to true for load balancers that have their
// loadBalancingScheme set to INTERNAL.
IsMirroringCollector *bool `json:"isMirroringCollector,omitempty" tf:"is_mirroring_collector,omitempty"`
// The fingerprint used for optimistic locking of this resource. Used
// internally during updates.
LabelFingerprint *string `json:"labelFingerprint,omitempty" tf:"label_fingerprint,omitempty"`
// Labels to apply to this forwarding rule. A list of key->value pairs.
Labels map[string]*string `json:"labels,omitempty" tf:"labels,omitempty"`
// Specifies the forwarding rule type.
// For more information about forwarding rules, refer to
// Forwarding rule concepts.
// Default value is EXTERNAL.
// Possible values are: EXTERNAL, EXTERNAL_MANAGED, INTERNAL, INTERNAL_MANAGED.
LoadBalancingScheme *string `json:"loadBalancingScheme,omitempty" tf:"load_balancing_scheme,omitempty"`
// This field is not used for external load balancing.
// For Internal TCP/UDP Load Balancing, this field identifies the network that
// the load balanced IP should belong to for this Forwarding Rule.
// If the subnetwork is specified, the network of the subnetwork will be used.
// If neither subnetwork nor this field is specified, the default network will
// be used.
// For Private Service Connect forwarding rules that forward traffic to Google
// APIs, a network must be provided.
Network *string `json:"network,omitempty" tf:"network,omitempty"`
// This signifies the networking tier used for configuring
// this load balancer and can only take the following values:
// PREMIUM, STANDARD.
// For regional ForwardingRule, the valid values are PREMIUM and
// STANDARD. For GlobalForwardingRule, the valid value is
// PREMIUM.
// If this field is not specified, it is assumed to be PREMIUM.
// If IPAddress is specified, this value must be equal to the
// networkTier of the Address.
// Possible values are: PREMIUM, STANDARD.
NetworkTier *string `json:"networkTier,omitempty" tf:"network_tier,omitempty"`
// This field can only be used:
PortRange *string `json:"portRange,omitempty" tf:"port_range,omitempty"`
// and port_range fields are mutually exclusive.
// For external forwarding rules, two or more forwarding rules cannot use the
// same [IPAddress, IPProtocol] pair, and cannot have
// overlapping portRanges.
// For internal forwarding rules within the same VPC network, two or more
// forwarding rules cannot use the same [IPAddress, IPProtocol]
// pair, and cannot have overlapping portRanges.
Ports []*string `json:"ports,omitempty" tf:"ports,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 PSC connection id of the PSC Forwarding Rule.
PscConnectionID *string `json:"pscConnectionId,omitempty" tf:"psc_connection_id,omitempty"`
// The PSC connection status of the PSC Forwarding Rule. Possible values: STATUS_UNSPECIFIED, PENDING, ACCEPTED, REJECTED, CLOSED
PscConnectionStatus *string `json:"pscConnectionStatus,omitempty" tf:"psc_connection_status,omitempty"`
// A reference to the region where the regional forwarding rule resides.
// This field is not applicable to global forwarding rules.
Region *string `json:"region,omitempty" tf:"region,omitempty"`
// The URI of the created resource.
SelfLink *string `json:"selfLink,omitempty" tf:"self_link,omitempty"`
// Service Directory resources to register this forwarding rule with.
// Currently, only supports a single Service Directory resource.
// Structure is documented below.
ServiceDirectoryRegistrations []ServiceDirectoryRegistrationsObservation `json:"serviceDirectoryRegistrations,omitempty" tf:"service_directory_registrations,omitempty"`
// An optional prefix to the service name for this Forwarding Rule.
// If specified, will be the first label of the fully qualified service
// name.
// The label must be 1-63 characters long, and comply with RFC1035.
// Specifically, the label must be 1-63 characters long and match the
// regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first
// character must be a lowercase letter, and all following characters
// must be a dash, lowercase letter, or digit, except the last
// character, which cannot be a dash.
// This field is only used for INTERNAL load balancing.
ServiceLabel *string `json:"serviceLabel,omitempty" tf:"service_label,omitempty"`
// The internal fully qualified service name for this Forwarding Rule.
// This field is only used for INTERNAL load balancing.
ServiceName *string `json:"serviceName,omitempty" tf:"service_name,omitempty"`
// If not empty, this Forwarding Rule will only forward the traffic when the source IP address matches one of the IP addresses or CIDR ranges set here. Note that a Forwarding Rule can only have up to 64 source IP ranges, and this field can only be used with a regional Forwarding Rule whose scheme is EXTERNAL. Each sourceIpRange entry should be either an IP address (for example, 1.2.3.4) or a CIDR range (for example, 1.2.3.0/24).
SourceIPRanges []*string `json:"sourceIpRanges,omitempty" tf:"source_ip_ranges,omitempty"`
// This field identifies the subnetwork that the load balanced IP should
// belong to for this Forwarding Rule, used in internal load balancing and
// network load balancing with IPv6.
// If the network specified is in auto subnet mode, this field is optional.
// However, a subnetwork must be specified if the network is in custom subnet
// mode or when creating external forwarding rule with IPv6.
Subnetwork *string `json:"subnetwork,omitempty" tf:"subnetwork,omitempty"`
// is set to targetGrpcProxy and
// validateForProxyless is set to true, the
// IPAddress should be set to 0.0.0.0.
Target *string `json:"target,omitempty" tf:"target,omitempty"`
}
type ForwardingRuleParameters struct {
// This field can only be used:
// +kubebuilder:validation:Optional
AllPorts *bool `json:"allPorts,omitempty" tf:"all_ports,omitempty"`
// This field is used along with the backend_service field for
// internal load balancing or with the target field for internal
// TargetInstance.
// If the field is set to TRUE, clients can access ILB from all
// regions.
// Otherwise only allows access from clients in the same region as the
// internal load balancer.
// +kubebuilder:validation:Optional
AllowGlobalAccess *bool `json:"allowGlobalAccess,omitempty" tf:"allow_global_access,omitempty"`
// Identifies the backend service to which the forwarding rule sends traffic.
// Required for Internal TCP/UDP Load Balancing and Network Load Balancing;
// must be omitted for all other load balancer types.
// +crossplane:generate:reference:type=RegionBackendService
// +crossplane:generate:reference:extractor=github.com/upbound/provider-gcp/config/common.SelfLinkExtractor()
// +kubebuilder:validation:Optional
BackendService *string `json:"backendService,omitempty" tf:"backend_service,omitempty"`
// Reference to a RegionBackendService to populate backendService.
// +kubebuilder:validation:Optional
BackendServiceRef *v1.Reference `json:"backendServiceRef,omitempty" tf:"-"`
// Selector for a RegionBackendService to populate backendService.
// +kubebuilder:validation:Optional
BackendServiceSelector *v1.Selector `json:"backendServiceSelector,omitempty" tf:"-"`
// An optional description of this resource. Provide this property when
// you create the resource.
// +kubebuilder:validation:Optional
Description *string `json:"description,omitempty" tf:"description,omitempty"`
// IP address for which this forwarding rule accepts traffic. When a client
// sends traffic to this IP address, the forwarding rule directs the traffic
// to the referenced target or backendService.
// While creating a forwarding rule, specifying an IPAddress is
// required under the following circumstances:
// +crossplane:generate:reference:type=Address
// +crossplane:generate:reference:extractor=github.com/upbound/provider-gcp/config/common.SelfLinkExtractor()
// +kubebuilder:validation:Optional
IPAddress *string `json:"ipAddress,omitempty" tf:"ip_address,omitempty"`
// Reference to a Address to populate ipAddress.
// +kubebuilder:validation:Optional
IPAddressRef *v1.Reference `json:"ipAddressRef,omitempty" tf:"-"`
// Selector for a Address to populate ipAddress.
// +kubebuilder:validation:Optional
IPAddressSelector *v1.Selector `json:"ipAddressSelector,omitempty" tf:"-"`
// The IP protocol to which this rule applies.
// For protocol forwarding, valid
// options are TCP, UDP, ESP,
// AH, SCTP, ICMP and
// L3_DEFAULT.
// The valid IP protocols are different for different load balancing products
// as described in Load balancing
// features.
// Possible values are: TCP, UDP, ESP, AH, SCTP, ICMP, L3_DEFAULT.
// +kubebuilder:validation:Optional
IPProtocol *string `json:"ipProtocol,omitempty" tf:"ip_protocol,omitempty"`
// Indicates whether or not this load balancer can be used as a collector for
// packet mirroring. To prevent mirroring loops, instances behind this
// load balancer will not have their traffic mirrored even if a
// PacketMirroring rule applies to them.
// This can only be set to true for load balancers that have their
// loadBalancingScheme set to INTERNAL.
// +kubebuilder:validation:Optional
IsMirroringCollector *bool `json:"isMirroringCollector,omitempty" tf:"is_mirroring_collector,omitempty"`
// Labels to apply to this forwarding rule. A list of key->value pairs.
// +kubebuilder:validation:Optional
Labels map[string]*string `json:"labels,omitempty" tf:"labels,omitempty"`
// Specifies the forwarding rule type.
// For more information about forwarding rules, refer to
// Forwarding rule concepts.
// Default value is EXTERNAL.
// Possible values are: EXTERNAL, EXTERNAL_MANAGED, INTERNAL, INTERNAL_MANAGED.
// +kubebuilder:validation:Optional
LoadBalancingScheme *string `json:"loadBalancingScheme,omitempty" tf:"load_balancing_scheme,omitempty"`
// This field is not used for external load balancing.
// For Internal TCP/UDP Load Balancing, this field identifies the network that
// the load balanced IP should belong to for this Forwarding Rule.
// If the subnetwork is specified, the network of the subnetwork will be used.
// If neither subnetwork nor this field is specified, the default network will
// be used.
// For Private Service Connect forwarding rules that forward traffic to Google
// APIs, a network must be provided.
// +crossplane:generate:reference:type=Network
// +crossplane:generate:reference:extractor=github.com/upbound/provider-gcp/config/common.SelfLinkExtractor()
// +kubebuilder:validation:Optional
Network *string `json:"network,omitempty" tf:"network,omitempty"`
// Reference to a Network to populate network.
// +kubebuilder:validation:Optional
NetworkRef *v1.Reference `json:"networkRef,omitempty" tf:"-"`
// Selector for a Network to populate network.
// +kubebuilder:validation:Optional
NetworkSelector *v1.Selector `json:"networkSelector,omitempty" tf:"-"`
// This signifies the networking tier used for configuring
// this load balancer and can only take the following values:
// PREMIUM, STANDARD.
// For regional ForwardingRule, the valid values are PREMIUM and
// STANDARD. For GlobalForwardingRule, the valid value is
// PREMIUM.
// If this field is not specified, it is assumed to be PREMIUM.
// If IPAddress is specified, this value must be equal to the
// networkTier of the Address.
// Possible values are: PREMIUM, STANDARD.
// +kubebuilder:validation:Optional
NetworkTier *string `json:"networkTier,omitempty" tf:"network_tier,omitempty"`
// This field can only be used:
// +kubebuilder:validation:Optional
PortRange *string `json:"portRange,omitempty" tf:"port_range,omitempty"`
// and port_range fields are mutually exclusive.
// For external forwarding rules, two or more forwarding rules cannot use the
// same [IPAddress, IPProtocol] pair, and cannot have
// overlapping portRanges.
// For internal forwarding rules within the same VPC network, two or more
// forwarding rules cannot use the same [IPAddress, IPProtocol]
// pair, and cannot have overlapping portRanges.
// +kubebuilder:validation:Optional
Ports []*string `json:"ports,omitempty" tf:"ports,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"`
// A reference to the region where the regional forwarding rule resides.
// This field is not applicable to global forwarding rules.
// +kubebuilder:validation:Required
Region *string `json:"region" tf:"region,omitempty"`
// Service Directory resources to register this forwarding rule with.
// Currently, only supports a single Service Directory resource.
// Structure is documented below.
// +kubebuilder:validation:Optional
ServiceDirectoryRegistrations []ServiceDirectoryRegistrationsParameters `json:"serviceDirectoryRegistrations,omitempty" tf:"service_directory_registrations,omitempty"`
// An optional prefix to the service name for this Forwarding Rule.
// If specified, will be the first label of the fully qualified service
// name.
// The label must be 1-63 characters long, and comply with RFC1035.
// Specifically, the label must be 1-63 characters long and match the
// regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first
// character must be a lowercase letter, and all following characters
// must be a dash, lowercase letter, or digit, except the last
// character, which cannot be a dash.
// This field is only used for INTERNAL load balancing.
// +kubebuilder:validation:Optional
ServiceLabel *string `json:"serviceLabel,omitempty" tf:"service_label,omitempty"`
// If not empty, this Forwarding Rule will only forward the traffic when the source IP address matches one of the IP addresses or CIDR ranges set here. Note that a Forwarding Rule can only have up to 64 source IP ranges, and this field can only be used with a regional Forwarding Rule whose scheme is EXTERNAL. Each sourceIpRange entry should be either an IP address (for example, 1.2.3.4) or a CIDR range (for example, 1.2.3.0/24).
// +kubebuilder:validation:Optional
SourceIPRanges []*string `json:"sourceIpRanges,omitempty" tf:"source_ip_ranges,omitempty"`
// This field identifies the subnetwork that the load balanced IP should
// belong to for this Forwarding Rule, used in internal load balancing and
// network load balancing with IPv6.
// If the network specified is in auto subnet mode, this field is optional.
// However, a subnetwork must be specified if the network is in custom subnet
// mode or when creating external forwarding rule with IPv6.
// +crossplane:generate:reference:type=Subnetwork
// +crossplane:generate:reference:extractor=github.com/upbound/provider-gcp/config/common.SelfLinkExtractor()
// +kubebuilder:validation:Optional
Subnetwork *string `json:"subnetwork,omitempty" tf:"subnetwork,omitempty"`
// Reference to a Subnetwork to populate subnetwork.
// +kubebuilder:validation:Optional
SubnetworkRef *v1.Reference `json:"subnetworkRef,omitempty" tf:"-"`
// Selector for a Subnetwork to populate subnetwork.
// +kubebuilder:validation:Optional
SubnetworkSelector *v1.Selector `json:"subnetworkSelector,omitempty" tf:"-"`
// is set to targetGrpcProxy and
// validateForProxyless is set to true, the
// IPAddress should be set to 0.0.0.0.
// +crossplane:generate:reference:type=RegionTargetHTTPProxy
// +crossplane:generate:reference:extractor=github.com/upbound/provider-gcp/config/common.SelfLinkExtractor()
// +kubebuilder:validation:Optional
Target *string `json:"target,omitempty" tf:"target,omitempty"`
// Reference to a RegionTargetHTTPProxy to populate target.
// +kubebuilder:validation:Optional
TargetRef *v1.Reference `json:"targetRef,omitempty" tf:"-"`
// Selector for a RegionTargetHTTPProxy to populate target.
// +kubebuilder:validation:Optional
TargetSelector *v1.Selector `json:"targetSelector,omitempty" tf:"-"`
}
type ServiceDirectoryRegistrationsObservation struct {
// Service Directory namespace to register the forwarding rule under.
Namespace *string `json:"namespace,omitempty" tf:"namespace,omitempty"`
// Service Directory service to register the forwarding rule under.
Service *string `json:"service,omitempty" tf:"service,omitempty"`
}
type ServiceDirectoryRegistrationsParameters struct {
// Service Directory namespace to register the forwarding rule under.
// +kubebuilder:validation:Optional
Namespace *string `json:"namespace,omitempty" tf:"namespace,omitempty"`
// Service Directory service to register the forwarding rule under.
// +kubebuilder:validation:Optional
Service *string `json:"service,omitempty" tf:"service,omitempty"`
}
// ForwardingRuleSpec defines the desired state of ForwardingRule
type ForwardingRuleSpec struct {
v1.ResourceSpec `json:",inline"`
ForProvider ForwardingRuleParameters `json:"forProvider"`
}
// ForwardingRuleStatus defines the observed state of ForwardingRule.
type ForwardingRuleStatus struct {
v1.ResourceStatus `json:",inline"`
AtProvider ForwardingRuleObservation `json:"atProvider,omitempty"`
}
// +kubebuilder:object:root=true
// ForwardingRule is the Schema for the ForwardingRules API. A ForwardingRule resource.
// +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 ForwardingRule struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec ForwardingRuleSpec `json:"spec"`
Status ForwardingRuleStatus `json:"status,omitempty"`
}
// +kubebuilder:object:root=true
// ForwardingRuleList contains a list of ForwardingRules
type ForwardingRuleList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []ForwardingRule `json:"items"`
}
// Repository type metadata.
var (
ForwardingRule_Kind = "ForwardingRule"
ForwardingRule_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: ForwardingRule_Kind}.String()
ForwardingRule_KindAPIVersion = ForwardingRule_Kind + "." + CRDGroupVersion.String()
ForwardingRule_GroupVersionKind = CRDGroupVersion.WithKind(ForwardingRule_Kind)
)
func init() {
SchemeBuilder.Register(&ForwardingRule{}, &ForwardingRuleList{})
}