diff --git a/apis/compute/v1beta1/computeforwardingrule_types.go b/apis/compute/v1beta1/computeforwardingrule_types.go new file mode 100644 index 0000000000..8d8ee8b375 --- /dev/null +++ b/apis/compute/v1beta1/computeforwardingrule_types.go @@ -0,0 +1,431 @@ +/* +Copyright 2024. + +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. +*/ + +package v1beta1 + +import ( + "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/k8s/v1alpha1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/scheme" +) + +var ( + // SchemeBuilder is used to add go types to the GroupVersionKind scheme. + SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} + + // AddToScheme is a global function that registers this API group & version to a scheme + AddToScheme = SchemeBuilder.AddToScheme + + ComputeForwardingRuleGVK = schema.GroupVersionKind{ + Group: SchemeGroupVersion.Group, + Version: SchemeGroupVersion.Version, + Kind: "ComputeForwardingRule", + } +) + +type ForwardingruleFilterLabels struct { + /* Immutable. Name of the metadata label. The length must be between + 1 and 1024 characters, inclusive. */ + Name string `json:"name"` + + /* Immutable. The value that the label must match. The value has a maximum + length of 1024 characters. */ + Value string `json:"value"` +} + +type ForwardingruleIpAddress struct { + // +optional + AddressRef *v1alpha1.ResourceRef `json:"addressRef,omitempty"` + + // +optional + Ip *string `json:"ip,omitempty"` +} + +type ForwardingruleMetadataFilters struct { + /* Immutable. The list of label value pairs that must match labels in the + provided metadata based on filterMatchCriteria + + This list must not be empty and can have at the most 64 entries. */ + FilterLabels []ForwardingruleFilterLabels `json:"filterLabels"` + + /* Immutable. Specifies how individual filterLabel matches within the list of + filterLabels contribute towards the overall metadataFilter match. + + MATCH_ANY - At least one of the filterLabels must have a matching + label in the provided metadata. + MATCH_ALL - All filterLabels must have matching labels in the + provided metadata. Possible values: ["MATCH_ANY", "MATCH_ALL"]. */ + FilterMatchCriteria string `json:"filterMatchCriteria"` +} + +type ForwardingruleServiceDirectoryRegistrations struct { + /* Immutable. Service Directory namespace to register the forwarding rule under. */ + // +optional + Namespace *string `json:"namespace,omitempty"` + + /* Immutable. Service Directory service to register the forwarding rule under. */ + // +optional + Service *string `json:"service,omitempty"` +} + +type ForwardingruleTarget struct { + // +optional + ServiceAttachmentRef *v1alpha1.ResourceRef `json:"serviceAttachmentRef,omitempty"` + + // +optional + TargetGRPCProxyRef *v1alpha1.ResourceRef `json:"targetGRPCProxyRef,omitempty"` + + // +optional + TargetHTTPProxyRef *v1alpha1.ResourceRef `json:"targetHTTPProxyRef,omitempty"` + + // +optional + TargetHTTPSProxyRef *v1alpha1.ResourceRef `json:"targetHTTPSProxyRef,omitempty"` + + // +optional + TargetSSLProxyRef *v1alpha1.ResourceRef `json:"targetSSLProxyRef,omitempty"` + + // +optional + TargetTCPProxyRef *v1alpha1.ResourceRef `json:"targetTCPProxyRef,omitempty"` + + // +optional + TargetVPNGatewayRef *v1alpha1.ResourceRef `json:"targetVPNGatewayRef,omitempty"` +} + +type ComputeForwardingRuleSpec struct { + /* Immutable. This field can only be used: + * If 'IPProtocol' is one of TCP, UDP, or SCTP. + * By internal TCP/UDP load balancers, backend service-based network load + balancers, and internal and external protocol forwarding. + + This option should be set to TRUE when the Forwarding Rule + IPProtocol is set to L3_DEFAULT. + + Set this field to true to allow packets addressed to any port or packets + lacking destination port information (for example, UDP fragments after the + first fragment) to be forwarded to the backends configured with this + forwarding rule. + + The 'ports', 'port_range', and + 'allPorts' fields are mutually exclusive. */ + // +optional + AllPorts *bool `json:"allPorts,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. */ + // +optional + AllowGlobalAccess *bool `json:"allowGlobalAccess,omitempty"` + + /* This is used in PSC consumer ForwardingRule to control whether the PSC endpoint can be accessed from another region. */ + // +optional + AllowPscGlobalAccess *bool `json:"allowPscGlobalAccess,omitempty"` + + /* A ComputeBackendService to receive the matched traffic. This is + used only for internal load balancing. */ + // +optional + BackendServiceRef *v1alpha1.ResourceRef `json:"backendServiceRef,omitempty"` + + /* Immutable. An optional description of this resource. Provide this property when + you create the resource. */ + // +optional + Description *string `json:"description,omitempty"` + + /* The IP address that this forwarding rule is serving on behalf of. + + Addresses are restricted based on the forwarding rule's load + balancing scheme (EXTERNAL or INTERNAL) and scope (global or + regional). + + When the load balancing scheme is EXTERNAL, for global forwarding + rules, the address must be a global IP, and for regional forwarding + rules, the address must live in the same region as the forwarding + rule. If this field is empty, an ephemeral IPv4 address from the + same scope (global or regional) will be assigned. A regional + forwarding rule supports IPv4 only. A global forwarding rule + supports either IPv4 or IPv6. + + When the load balancing scheme is INTERNAL, this can only be an RFC + 1918 IP address belonging to the network/subnet configured for the + forwarding rule. By default, if this field is empty, an ephemeral + internal IP address will be automatically allocated from the IP + range of the subnet or network configured for this forwarding rule. */ + // +optional + IpAddress *ForwardingruleIpAddress `json:"ipAddress,omitempty"` + + /* Immutable. 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](https://cloud.google.com/load-balancing/docs/features#protocols_from_the_load_balancer_to_the_backends). + + A Forwarding Rule with protocol L3_DEFAULT can attach with target instance or + backend service with UNSPECIFIED protocol. + A forwarding rule with "L3_DEFAULT" IPProtocal cannot be attached to a backend service with TCP or UDP. Possible values: ["TCP", "UDP", "ESP", "AH", "SCTP", "ICMP", "L3_DEFAULT"]. */ + // +optional + IpProtocol *string `json:"ipProtocol,omitempty"` + + /* Immutable. The IP address version that will be used by this forwarding rule. + Valid options are IPV4 and IPV6. + + If not set, the IPv4 address will be used by default. Possible values: ["IPV4", "IPV6"]. */ + // +optional + IpVersion *string `json:"ipVersion,omitempty"` + + /* Immutable. 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'. */ + // +optional + IsMirroringCollector *bool `json:"isMirroringCollector,omitempty"` + + /* Immutable. Specifies the forwarding rule type. + + Must set to empty for private service connect forwarding rule. For more information about forwarding rules, refer to + [Forwarding rule concepts](https://cloud.google.com/load-balancing/docs/forwarding-rule-concepts). Default value: "EXTERNAL" Possible values: ["EXTERNAL", "EXTERNAL_MANAGED", "INTERNAL", "INTERNAL_MANAGED", ""]. */ + // +optional + LoadBalancingScheme *string `json:"loadBalancingScheme,omitempty"` + + /* Location represents the geographical location of the ComputeForwardingRule. Specify a region name or "global" for global resources. Reference: GCP definition of regions/zones (https://cloud.google.com/compute/docs/regions-zones/) */ + Location string `json:"location"` + + /* Immutable. Opaque filter criteria used by Loadbalancer to restrict routing + configuration to a limited set xDS compliant clients. In their xDS + requests to Loadbalancer, xDS clients present node metadata. If a + match takes place, the relevant routing configuration is made available + to those proxies. + + For each metadataFilter in this list, if its filterMatchCriteria is set + to MATCH_ANY, at least one of the filterLabels must match the + corresponding label provided in the metadata. If its filterMatchCriteria + is set to MATCH_ALL, then all of its filterLabels must match with + corresponding labels in the provided metadata. + + metadataFilters specified here can be overridden by those specified in + the UrlMap that this ForwardingRule references. + + metadataFilters only applies to Loadbalancers that have their + loadBalancingScheme set to INTERNAL_SELF_MANAGED. */ + // +optional + MetadataFilters []ForwardingruleMetadataFilters `json:"metadataFilters,omitempty"` + + /* This field is not used for external load balancing. For internal + load balancing, this field identifies the network that the load + balanced IP should belong to for this forwarding rule. If this + field is not specified, the default network will be used. */ + // +optional + NetworkRef *v1alpha1.ResourceRef `json:"networkRef,omitempty"` + + /* Immutable. 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: ["PREMIUM", "STANDARD"]. */ + // +optional + NetworkTier *string `json:"networkTier,omitempty"` + + /* Immutable. This is used in PSC consumer ForwardingRule to control whether it should try to auto-generate a DNS zone or not. Non-PSC forwarding rules do not use this field. */ + // +optional + NoAutomateDnsZone *bool `json:"noAutomateDnsZone,omitempty"` + + /* Immutable. This field can only be used: + + * If 'IPProtocol' is one of TCP, UDP, or SCTP. + * By backend service-based network load balancers, target pool-based + network load balancers, internal proxy load balancers, external proxy load + balancers, Traffic Director, external protocol forwarding, and Classic VPN. + Some products have restrictions on what ports can be used. See + [port specifications](https://cloud.google.com/load-balancing/docs/forwarding-rule-concepts#port_specifications) + for details. + + + Only packets addressed to ports in the specified range will be forwarded to + the backends configured with this forwarding rule. + + The 'ports' 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 'portRange's. + + 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 'portRange's. */ + // +optional + PortRange *string `json:"portRange,omitempty"` + + /* Immutable. This field can only be used: + + * If 'IPProtocol' is one of TCP, UDP, or SCTP. + * By internal TCP/UDP load balancers, backend service-based network load + balancers, internal protocol forwarding and when protocol is not L3_DEFAULT. + + + You can specify a list of up to five ports by number, separated by commas. + The ports can be contiguous or discontiguous. Only packets addressed to + these ports will be forwarded to the backends configured with this + forwarding rule. + + For external forwarding rules, two or more forwarding rules cannot use the + same '[IPAddress, IPProtocol]' pair, and cannot share any values + defined in 'ports'. + + For internal forwarding rules within the same VPC network, two or more + forwarding rules cannot use the same '[IPAddress, IPProtocol]' + pair, and cannot share any values defined in 'ports'. + + The 'ports' and 'port_range' fields are mutually exclusive. */ + // +optional + Ports []string `json:"ports,omitempty"` + + /* Immutable. Optional. The name of the resource. Used for creation and acquisition. When unset, the value of `metadata.name` is used as the default. */ + // +optional + ResourceID *string `json:"resourceID,omitempty"` + + /* Immutable. Service Directory resources to register this forwarding rule with. + + Currently, only supports a single Service Directory resource. */ + // +optional + ServiceDirectoryRegistrations []ForwardingruleServiceDirectoryRegistrations `json:"serviceDirectoryRegistrations,omitempty"` + + /* Immutable. 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. */ + // +optional + ServiceLabel *string `json:"serviceLabel,omitempty"` + + /* Immutable. 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). */ + // +optional + SourceIpRanges []string `json:"sourceIpRanges,omitempty"` + + /* Immutable. The subnetwork that the load balanced IP should belong to for this + forwarding rule. This field is only used for internal load + balancing. + + If the network specified is in auto subnet mode, this field is + optional. However, if the network is in custom subnet mode, a + subnetwork must be specified. */ + // +optional + SubnetworkRef *v1alpha1.ResourceRef `json:"subnetworkRef,omitempty"` + + /* The target resource to receive the matched traffic. The forwarded + traffic must be of a type appropriate to the target object. For + INTERNAL_SELF_MANAGED load balancing, only HTTP and HTTPS targets + are valid. */ + // +optional + Target *ForwardingruleTarget `json:"target,omitempty"` +} + +type ComputeForwardingRuleStatus struct { + /* Conditions represent the latest available observations of the + ComputeForwardingRule's current state. */ + Conditions []v1alpha1.Condition `json:"conditions,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. */ + // +optional + BaseForwardingRule *string `json:"baseForwardingRule,omitempty"` + + /* Creation timestamp in RFC3339 text format. */ + // +optional + CreationTimestamp *string `json:"creationTimestamp,omitempty"` + + /* The fingerprint used for optimistic locking of this resource. Used + internally during updates. */ + // +optional + LabelFingerprint *string `json:"labelFingerprint,omitempty"` + + /* ObservedGeneration is the generation of the resource that was most recently observed by the Config Connector controller. If this is equal to metadata.generation, then that means that the current reported status reflects the most recent desired state of the resource. */ + // +optional + ObservedGeneration *int64 `json:"observedGeneration,omitempty"` + + /* The PSC connection id of the PSC Forwarding Rule. */ + // +optional + PscConnectionId *string `json:"pscConnectionId,omitempty"` + + /* The PSC connection status of the PSC Forwarding Rule. Possible values: 'STATUS_UNSPECIFIED', 'PENDING', 'ACCEPTED', 'REJECTED', 'CLOSED'. */ + // +optional + PscConnectionStatus *string `json:"pscConnectionStatus,omitempty"` + + // +optional + SelfLink *string `json:"selfLink,omitempty"` + + /* The internal fully qualified service name for this Forwarding Rule. + + This field is only used for INTERNAL load balancing. */ + // +optional + ServiceName *string `json:"serviceName,omitempty"` +} + +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:resource:categories=gcp,shortName=gcpcomputeforwardingrule;gcpcomputeforwardingrules +// +kubebuilder:subresource:status +// +kubebuilder:metadata:labels="cnrm.cloud.google.com/managed-by-kcc=true";"cnrm.cloud.google.com/stability-level=stable";"cnrm.cloud.google.com/system=true";"cnrm.cloud.google.com/tf2crd=true" +// +kubebuilder:printcolumn:name="Age",JSONPath=".metadata.creationTimestamp",type="date" +// +kubebuilder:printcolumn:name="Ready",JSONPath=".status.conditions[?(@.type=='Ready')].status",type="string",description="When 'True', the most recent reconcile of the resource succeeded" +// +kubebuilder:printcolumn:name="Status",JSONPath=".status.conditions[?(@.type=='Ready')].reason",type="string",description="The reason for the value in 'Ready'" +// +kubebuilder:printcolumn:name="Status Age",JSONPath=".status.conditions[?(@.type=='Ready')].lastTransitionTime",type="date",description="The last transition time for the value in 'Status'" + +// ComputeForwardingRule is the Schema for the compute API +// +k8s:openapi-gen=true +type ComputeForwardingRule struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec ComputeForwardingRuleSpec `json:"spec,omitempty"` + Status ComputeForwardingRuleStatus `json:"status,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ComputeForwardingRuleList contains a list of ComputeForwardingRule +type ComputeForwardingRuleList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []ComputeForwardingRule `json:"items"` +} + +func init() { + SchemeBuilder.Register(&ComputeForwardingRule{}, &ComputeForwardingRuleList{}) +} diff --git a/apis/compute/v1beta1/doc.go b/apis/compute/v1beta1/doc.go new file mode 100644 index 0000000000..bcfba99e57 --- /dev/null +++ b/apis/compute/v1beta1/doc.go @@ -0,0 +1,21 @@ +// Copyright 2024 Google LLC +// +// 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. + +// +k8s:openapi-gen=true +// +k8s:deepcopy-gen=package,register +// +groupName=compute.cnrm.cloud.google.com + +// +kcc:proto=google.cloud.compute.v1 + +package v1beta1 diff --git a/apis/compute/v1beta1/register.go b/apis/compute/v1beta1/register.go new file mode 100644 index 0000000000..7f328f8130 --- /dev/null +++ b/apis/compute/v1beta1/register.go @@ -0,0 +1,22 @@ +// Copyright 2024 Google LLC +// +// 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. + +package v1beta1 + +import "k8s.io/apimachinery/pkg/runtime/schema" + +var ( + // SchemeGroupVersion is the group version used to register these objects. + SchemeGroupVersion = schema.GroupVersion{Group: "compute.cnrm.cloud.google.com", Version: "v1beta1"} +) diff --git a/apis/compute/v1beta1/zz_generated.deepcopy.go b/apis/compute/v1beta1/zz_generated.deepcopy.go new file mode 100644 index 0000000000..43e403cb0c --- /dev/null +++ b/apis/compute/v1beta1/zz_generated.deepcopy.go @@ -0,0 +1,416 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Copyright 2020 Google LLC +// +// 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 deepcopy-gen. DO NOT EDIT. + +package v1beta1 + +import ( + v1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/k8s/v1alpha1" + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ComputeForwardingRule) DeepCopyInto(out *ComputeForwardingRule) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComputeForwardingRule. +func (in *ComputeForwardingRule) DeepCopy() *ComputeForwardingRule { + if in == nil { + return nil + } + out := new(ComputeForwardingRule) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ComputeForwardingRule) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ComputeForwardingRuleList) DeepCopyInto(out *ComputeForwardingRuleList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ComputeForwardingRule, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComputeForwardingRuleList. +func (in *ComputeForwardingRuleList) DeepCopy() *ComputeForwardingRuleList { + if in == nil { + return nil + } + out := new(ComputeForwardingRuleList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ComputeForwardingRuleList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ComputeForwardingRuleSpec) DeepCopyInto(out *ComputeForwardingRuleSpec) { + *out = *in + if in.AllPorts != nil { + in, out := &in.AllPorts, &out.AllPorts + *out = new(bool) + **out = **in + } + if in.AllowGlobalAccess != nil { + in, out := &in.AllowGlobalAccess, &out.AllowGlobalAccess + *out = new(bool) + **out = **in + } + if in.AllowPscGlobalAccess != nil { + in, out := &in.AllowPscGlobalAccess, &out.AllowPscGlobalAccess + *out = new(bool) + **out = **in + } + if in.BackendServiceRef != nil { + in, out := &in.BackendServiceRef, &out.BackendServiceRef + *out = new(v1alpha1.ResourceRef) + **out = **in + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.IpAddress != nil { + in, out := &in.IpAddress, &out.IpAddress + *out = new(ForwardingruleIpAddress) + (*in).DeepCopyInto(*out) + } + if in.IpProtocol != nil { + in, out := &in.IpProtocol, &out.IpProtocol + *out = new(string) + **out = **in + } + if in.IpVersion != nil { + in, out := &in.IpVersion, &out.IpVersion + *out = new(string) + **out = **in + } + if in.IsMirroringCollector != nil { + in, out := &in.IsMirroringCollector, &out.IsMirroringCollector + *out = new(bool) + **out = **in + } + if in.LoadBalancingScheme != nil { + in, out := &in.LoadBalancingScheme, &out.LoadBalancingScheme + *out = new(string) + **out = **in + } + if in.MetadataFilters != nil { + in, out := &in.MetadataFilters, &out.MetadataFilters + *out = make([]ForwardingruleMetadataFilters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.NetworkRef != nil { + in, out := &in.NetworkRef, &out.NetworkRef + *out = new(v1alpha1.ResourceRef) + **out = **in + } + if in.NetworkTier != nil { + in, out := &in.NetworkTier, &out.NetworkTier + *out = new(string) + **out = **in + } + if in.NoAutomateDnsZone != nil { + in, out := &in.NoAutomateDnsZone, &out.NoAutomateDnsZone + *out = new(bool) + **out = **in + } + if in.PortRange != nil { + in, out := &in.PortRange, &out.PortRange + *out = new(string) + **out = **in + } + if in.Ports != nil { + in, out := &in.Ports, &out.Ports + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.ResourceID != nil { + in, out := &in.ResourceID, &out.ResourceID + *out = new(string) + **out = **in + } + if in.ServiceDirectoryRegistrations != nil { + in, out := &in.ServiceDirectoryRegistrations, &out.ServiceDirectoryRegistrations + *out = make([]ForwardingruleServiceDirectoryRegistrations, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ServiceLabel != nil { + in, out := &in.ServiceLabel, &out.ServiceLabel + *out = new(string) + **out = **in + } + if in.SourceIpRanges != nil { + in, out := &in.SourceIpRanges, &out.SourceIpRanges + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.SubnetworkRef != nil { + in, out := &in.SubnetworkRef, &out.SubnetworkRef + *out = new(v1alpha1.ResourceRef) + **out = **in + } + if in.Target != nil { + in, out := &in.Target, &out.Target + *out = new(ForwardingruleTarget) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComputeForwardingRuleSpec. +func (in *ComputeForwardingRuleSpec) DeepCopy() *ComputeForwardingRuleSpec { + if in == nil { + return nil + } + out := new(ComputeForwardingRuleSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ComputeForwardingRuleStatus) DeepCopyInto(out *ComputeForwardingRuleStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]v1alpha1.Condition, len(*in)) + copy(*out, *in) + } + if in.BaseForwardingRule != nil { + in, out := &in.BaseForwardingRule, &out.BaseForwardingRule + *out = new(string) + **out = **in + } + if in.CreationTimestamp != nil { + in, out := &in.CreationTimestamp, &out.CreationTimestamp + *out = new(string) + **out = **in + } + if in.LabelFingerprint != nil { + in, out := &in.LabelFingerprint, &out.LabelFingerprint + *out = new(string) + **out = **in + } + if in.ObservedGeneration != nil { + in, out := &in.ObservedGeneration, &out.ObservedGeneration + *out = new(int64) + **out = **in + } + if in.PscConnectionId != nil { + in, out := &in.PscConnectionId, &out.PscConnectionId + *out = new(string) + **out = **in + } + if in.PscConnectionStatus != nil { + in, out := &in.PscConnectionStatus, &out.PscConnectionStatus + *out = new(string) + **out = **in + } + if in.SelfLink != nil { + in, out := &in.SelfLink, &out.SelfLink + *out = new(string) + **out = **in + } + if in.ServiceName != nil { + in, out := &in.ServiceName, &out.ServiceName + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComputeForwardingRuleStatus. +func (in *ComputeForwardingRuleStatus) DeepCopy() *ComputeForwardingRuleStatus { + if in == nil { + return nil + } + out := new(ComputeForwardingRuleStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ForwardingruleFilterLabels) DeepCopyInto(out *ForwardingruleFilterLabels) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ForwardingruleFilterLabels. +func (in *ForwardingruleFilterLabels) DeepCopy() *ForwardingruleFilterLabels { + if in == nil { + return nil + } + out := new(ForwardingruleFilterLabels) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ForwardingruleIpAddress) DeepCopyInto(out *ForwardingruleIpAddress) { + *out = *in + if in.AddressRef != nil { + in, out := &in.AddressRef, &out.AddressRef + *out = new(v1alpha1.ResourceRef) + **out = **in + } + if in.Ip != nil { + in, out := &in.Ip, &out.Ip + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ForwardingruleIpAddress. +func (in *ForwardingruleIpAddress) DeepCopy() *ForwardingruleIpAddress { + if in == nil { + return nil + } + out := new(ForwardingruleIpAddress) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ForwardingruleMetadataFilters) DeepCopyInto(out *ForwardingruleMetadataFilters) { + *out = *in + if in.FilterLabels != nil { + in, out := &in.FilterLabels, &out.FilterLabels + *out = make([]ForwardingruleFilterLabels, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ForwardingruleMetadataFilters. +func (in *ForwardingruleMetadataFilters) DeepCopy() *ForwardingruleMetadataFilters { + if in == nil { + return nil + } + out := new(ForwardingruleMetadataFilters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ForwardingruleServiceDirectoryRegistrations) DeepCopyInto(out *ForwardingruleServiceDirectoryRegistrations) { + *out = *in + if in.Namespace != nil { + in, out := &in.Namespace, &out.Namespace + *out = new(string) + **out = **in + } + if in.Service != nil { + in, out := &in.Service, &out.Service + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ForwardingruleServiceDirectoryRegistrations. +func (in *ForwardingruleServiceDirectoryRegistrations) DeepCopy() *ForwardingruleServiceDirectoryRegistrations { + if in == nil { + return nil + } + out := new(ForwardingruleServiceDirectoryRegistrations) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ForwardingruleTarget) DeepCopyInto(out *ForwardingruleTarget) { + *out = *in + if in.ServiceAttachmentRef != nil { + in, out := &in.ServiceAttachmentRef, &out.ServiceAttachmentRef + *out = new(v1alpha1.ResourceRef) + **out = **in + } + if in.TargetGRPCProxyRef != nil { + in, out := &in.TargetGRPCProxyRef, &out.TargetGRPCProxyRef + *out = new(v1alpha1.ResourceRef) + **out = **in + } + if in.TargetHTTPProxyRef != nil { + in, out := &in.TargetHTTPProxyRef, &out.TargetHTTPProxyRef + *out = new(v1alpha1.ResourceRef) + **out = **in + } + if in.TargetHTTPSProxyRef != nil { + in, out := &in.TargetHTTPSProxyRef, &out.TargetHTTPSProxyRef + *out = new(v1alpha1.ResourceRef) + **out = **in + } + if in.TargetSSLProxyRef != nil { + in, out := &in.TargetSSLProxyRef, &out.TargetSSLProxyRef + *out = new(v1alpha1.ResourceRef) + **out = **in + } + if in.TargetTCPProxyRef != nil { + in, out := &in.TargetTCPProxyRef, &out.TargetTCPProxyRef + *out = new(v1alpha1.ResourceRef) + **out = **in + } + if in.TargetVPNGatewayRef != nil { + in, out := &in.TargetVPNGatewayRef, &out.TargetVPNGatewayRef + *out = new(v1alpha1.ResourceRef) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ForwardingruleTarget. +func (in *ForwardingruleTarget) DeepCopy() *ForwardingruleTarget { + if in == nil { + return nil + } + out := new(ForwardingruleTarget) + in.DeepCopyInto(out) + return out +} diff --git a/dev/tasks/generate-crds b/dev/tasks/generate-crds index c5b5b8b8fd..3aa95a08e0 100755 --- a/dev/tasks/generate-crds +++ b/dev/tasks/generate-crds @@ -55,7 +55,7 @@ go run ./scripts/crd-tools reflow-descriptions --dir apis/config/crd/ # excluded_resources are resources that are under development for a direct conversion # we don't modify the CRD just yet for those but will in the future -excluded_resources=("dataformrepositorie") +excluded_resources=("dataformrepositorie" "computeforwardingrule") cd ${REPO_ROOT} cd apis/config/crd/