From a659a9b15fd6d67c83403a634e4a6d05516b54e3 Mon Sep 17 00:00:00 2001 From: Gemma Hou Date: Fri, 30 Aug 2024 23:40:26 +0000 Subject: [PATCH] Generate crd and upload status.externalRef --- ...ngrules.compute.cnrm.cloud.google.com.yaml | 202 +++++++++--------- dev/tasks/generate-crds | 2 +- .../v1beta1/computeforwardingrule_types.go | 31 +-- .../compute/v1beta1/zz_generated.deepcopy.go | 5 + .../forwardingrule_externalresource.go | 6 +- ...ct_globalcomputeforwardingrule.golden.yaml | 1 + ..._regionalcomputeforwardingrule.golden.yaml | 1 + ...ject_regionalforwardingrulepsc.golden.yaml | 1 + .../compute/computeforwardingrule.md | 105 +++++---- 9 files changed, 172 insertions(+), 182 deletions(-) diff --git a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_computeforwardingrules.compute.cnrm.cloud.google.com.yaml b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_computeforwardingrules.compute.cnrm.cloud.google.com.yaml index 40d12cc5c5..5d2d990a0a 100644 --- a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_computeforwardingrules.compute.cnrm.cloud.google.com.yaml +++ b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_computeforwardingrules.compute.cnrm.cloud.google.com.yaml @@ -16,6 +16,7 @@ spec: categories: - gcp kind: ComputeForwardingRule + listKind: ComputeForwardingRuleList plural: computeforwardingrules shortNames: - gcpcomputeforwardingrule @@ -43,16 +44,17 @@ spec: name: v1beta1 schema: openAPIV3Schema: + description: ComputeForwardingRule is the Schema for the compute API properties: apiVersion: - description: 'apiVersion defines the versioned schema of this representation + description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources' + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' type: string kind: - description: 'kind is a string value representing the REST resource this + description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds' + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string metadata: type: object @@ -93,9 +95,8 @@ spec: whether the PSC endpoint can be accessed from another region. type: boolean backendServiceRef: - description: |- - A ComputeBackendService to receive the matched traffic. This is - used only for internal load balancing. + description: A ComputeBackendService to receive the matched traffic. + This is used only for internal load balancing. oneOf: - not: required: @@ -112,20 +113,21 @@ spec: - external properties: external: - description: 'Allowed value: The `selfLink` field of a `ComputeBackendService` - resource.' + description: The ComputeBackendService selflink in the form "projects/{{project}}/global/backendServices/{{name}}" + or "projects/{{project}}/regions/{{region}}/backendServices/{{name}}" + when not managed by KCC. type: string name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + description: The `name` field of a `ComputeBackendService` resource. type: string namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + description: The `namespace` field of a `ComputeBackendService` + resource. type: string type: object description: - description: |- - Immutable. An optional description of this resource. Provide this property when - you create the resource. + description: Immutable. An optional description of this resource. + Provide this property when you create the resource. type: string ipAddress: description: |- @@ -148,11 +150,6 @@ spec: 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. - oneOf: - - required: - - addressRef - - required: - - ip properties: addressRef: oneOf: @@ -171,14 +168,14 @@ spec: - external properties: external: - description: 'Allowed value: The `address` field of a `ComputeAddress` - resource.' + description: The ComputeAddress selflink in the form "projects/{{project}}/regions/{{region}}/addresses/{{name}}" + when not managed by KCC. type: string name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + description: The `name` field of a `ComputeAddress` resource. type: string namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + description: The `namespace` field of a `ComputeAddress` resource. type: string type: object ip: @@ -260,14 +257,12 @@ spec: items: properties: name: - description: |- - Immutable. Name of the metadata label. The length must be between - 1 and 1024 characters, inclusive. + description: Immutable. Name of the metadata label. The + length must be between 1 and 1024 characters, inclusive. type: string value: - description: |- - Immutable. The value that the label must match. The value has a maximum - length of 1024 characters. + description: Immutable. The value that the label must + match. The value has a maximum length of 1024 characters. type: string required: - name @@ -290,11 +285,10 @@ spec: type: object type: array networkRef: - description: |- - 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. + description: 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. oneOf: - not: required: @@ -311,14 +305,14 @@ spec: - external properties: external: - description: 'Allowed value: The `selfLink` field of a `ComputeNetwork` - resource.' + description: The compute network selflink of form "projects//global/networks/", + when not managed by Config Connector. type: string name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + description: The `name` field of a `ComputeNetwork` resource. type: string namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + description: The `namespace` field of a `ComputeNetwork` resource. type: string type: object networkTier: @@ -352,7 +346,6 @@ spec: [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. @@ -374,7 +367,6 @@ spec: * 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 @@ -465,37 +457,21 @@ spec: - external properties: external: - description: 'Allowed value: The `selfLink` field of a `ComputeSubnetwork` - resource.' + description: The ComputeSubnetwork selflink of form "projects/{{project}}/regions/{{region}}/subnetworks/{{name}}", + when not managed by KCC. type: string name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + description: The `name` field of a `ComputeSubnetwork` resource. type: string namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + description: The `namespace` field of a `ComputeSubnetwork` resource. type: string type: object target: - description: |- - 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 + description: 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. - oneOf: - - required: - - serviceAttachmentRef - - required: - - targetGRPCProxyRef - - required: - - targetHTTPProxyRef - - required: - - targetHTTPSProxyRef - - required: - - targetSSLProxyRef - - required: - - targetTCPProxyRef - - required: - - targetVPNGatewayRef properties: serviceAttachmentRef: oneOf: @@ -514,14 +490,17 @@ spec: - external properties: external: - description: 'Allowed value: The `selfLink` field of a `ComputeServiceAttachment` - resource.' + description: The ComputeServiceAttachment selflink in the + form "projects/{{project}}/regions/{{region}}/serviceAttachments/{{name}}" + when not managed by KCC. type: string name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + description: The `name` field of a `ComputeServiceAttachment` + resource. type: string namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + description: The `namespace` field of a `ComputeServiceAttachment` + resource. type: string type: object targetGRPCProxyRef: @@ -541,14 +520,17 @@ spec: - external properties: external: - description: 'Allowed value: The `selfLink` field of a `ComputeTargetGRPCProxy` - resource.' + description: The ComputeTargetGrpcProxy selflink in the form + "projects/{{project}}/global/targetGrpcProxies/{{name}}" + when not managed by KCC. type: string name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + description: The `name` field of a `ComputeTargetGrpcProxy` + resource. type: string namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + description: The `namespace` field of a `ComputeTargetGrpcProxy` + resource. type: string type: object targetHTTPProxyRef: @@ -568,14 +550,18 @@ spec: - external properties: external: - description: 'Allowed value: The `selfLink` field of a `ComputeTargetHTTPProxy` - resource.' + description: The ComputeTargetHTTPProxy selflink in the form + "projects/{{project}}/global/targetHttpProxies/{{name}}" + or "projects/{{project}}/regions/{{region}}/targetHttpProxies/{{name}}" + when not managed by KCC. type: string name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + description: The `name` field of a `ComputeTargetHTTPProxy` + resource. type: string namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + description: The `namespace` field of a `ComputeTargetHTTPProxy` + resource. type: string type: object targetHTTPSProxyRef: @@ -595,14 +581,18 @@ spec: - external properties: external: - description: 'Allowed value: The `selfLink` field of a `ComputeTargetHTTPSProxy` - resource.' + description: The ComputeTargetHTTPSProxy selflink in the form + "projects/{{project}}/global/targetHttpProxies/{{name}}" + or "projects/{{project}}/regions/{{region}}/targetHttpProxies/{{name}}" + when not managed by KCC. type: string name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + description: The `name` field of a `ComputeTargetHTTPSProxy` + resource. type: string namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + description: The `namespace` field of a `ComputeTargetHTTPSProxy` + resource. type: string type: object targetSSLProxyRef: @@ -622,14 +612,17 @@ spec: - external properties: external: - description: 'Allowed value: The `selfLink` field of a `ComputeTargetSSLProxy` - resource.' + description: The ComputeTargetSSLProxy selflink in the form + "projects/{{project}}/global/targetSslProxies/{{name}}" + when not managed by KCC. type: string name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + description: The `name` field of a `ComputeTargetSSLProxy` + resource. type: string namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + description: The `namespace` field of a `ComputeTargetSSLProxy` + resource. type: string type: object targetTCPProxyRef: @@ -649,14 +642,18 @@ spec: - external properties: external: - description: 'Allowed value: The `selfLink` field of a `ComputeTargetTCPProxy` - resource.' + description: The ComputeTargetTCPProxy selflink in the form + "projects/{{project}}/global/targetTcpProxies/{{name}}" + or "projects/{{project}}/regions/{{region}}/targetTcpProxies/{{name}}" + when not managed by KCC. type: string name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + description: The `name` field of a `ComputeTargetTCPProxy` + resource. type: string namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + description: The `namespace` field of a `ComputeTargetTCPProxy` + resource. type: string type: object targetVPNGatewayRef: @@ -676,14 +673,17 @@ spec: - external properties: external: - description: 'Allowed value: The `selfLink` field of a `ComputeTargetVPNGateway` - resource.' + description: The ComputeTargetVPNGateway selflink in the form + "projects/{{project}}/regions/{{region}}/targetVpnGateways/{{name}}" + when not managed by KCC. type: string name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + description: The `name` field of a `ComputeTargetVPNGateway` + resource. type: string namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + description: The `namespace` field of a `ComputeTargetVPNGateway` + resource. type: string type: object type: object @@ -700,8 +700,8 @@ spec: if the current Forwarding Rule does not have sourceIPRanges specified.' type: string conditions: - description: Conditions represent the latest available observation - of the resource's current state. + description: Conditions represent the latest available observations + of the object's current state. items: properties: lastTransitionTime: @@ -728,9 +728,12 @@ spec: creationTimestamp: description: Creation timestamp in RFC3339 text format. type: string + externalRef: + description: A unique Config Connector specifier for the resource + in GCP. + type: string labelFingerprint: - description: |- - The fingerprint used for optimistic locking of this resource. Used + description: The fingerprint used for optimistic locking of this resource. Used internally during updates. type: string observedGeneration: @@ -739,6 +742,7 @@ spec: If this is equal to metadata.generation, then that means that the current reported status reflects the most recent desired state of the resource. + format: int64 type: integer pscConnectionId: description: The PSC connection id of the PSC Forwarding Rule. @@ -757,16 +761,8 @@ spec: This field is only used for INTERNAL load balancing. type: string type: object - required: - - spec type: object served: true storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/dev/tasks/generate-crds b/dev/tasks/generate-crds index 4be2951203..f4a1e23356 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=("computeforwardingrule") +# i.e. excluded_resources=("computeforwardingrule") cd ${REPO_ROOT} cd apis/config/crd/ diff --git a/pkg/clients/generated/apis/compute/v1beta1/computeforwardingrule_types.go b/pkg/clients/generated/apis/compute/v1beta1/computeforwardingrule_types.go index ab48a31e93..55a6eaac91 100644 --- a/pkg/clients/generated/apis/compute/v1beta1/computeforwardingrule_types.go +++ b/pkg/clients/generated/apis/compute/v1beta1/computeforwardingrule_types.go @@ -36,12 +36,10 @@ import ( ) type ForwardingruleFilterLabels struct { - /* Immutable. Name of the metadata label. The length must be between - 1 and 1024 characters, inclusive. */ + /* 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. */ + /* Immutable. The value that the label must match. The value has a maximum length of 1024 characters. */ Value string `json:"value"` } @@ -138,13 +136,11 @@ type ComputeForwardingRuleSpec struct { // +optional AllowPscGlobalAccess *bool `json:"allowPscGlobalAccess,omitempty"` - /* A ComputeBackendService to receive the matched traffic. This is - used only for internal load balancing. */ + /* 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. */ + /* Immutable. An optional description of this resource. Provide this property when you create the resource. */ // +optional Description *string `json:"description,omitempty"` @@ -234,10 +230,7 @@ type ComputeForwardingRuleSpec struct { // +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. */ + /* 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"` @@ -269,7 +262,6 @@ type ComputeForwardingRuleSpec struct { [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. @@ -291,7 +283,6 @@ type ComputeForwardingRuleSpec struct { * 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 @@ -348,10 +339,7 @@ type ComputeForwardingRuleSpec struct { // +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. */ + /* 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"` } @@ -368,8 +356,11 @@ type ComputeForwardingRuleStatus struct { // +optional CreationTimestamp *string `json:"creationTimestamp,omitempty"` - /* The fingerprint used for optimistic locking of this resource. Used - internally during updates. */ + /* A unique Config Connector specifier for the resource in GCP. */ + // +optional + ExternalRef *string `json:"externalRef,omitempty"` + + /* The fingerprint used for optimistic locking of this resource. Used internally during updates. */ // +optional LabelFingerprint *string `json:"labelFingerprint,omitempty"` diff --git a/pkg/clients/generated/apis/compute/v1beta1/zz_generated.deepcopy.go b/pkg/clients/generated/apis/compute/v1beta1/zz_generated.deepcopy.go index 75c3d39b19..1474a71b61 100644 --- a/pkg/clients/generated/apis/compute/v1beta1/zz_generated.deepcopy.go +++ b/pkg/clients/generated/apis/compute/v1beta1/zz_generated.deepcopy.go @@ -2842,6 +2842,11 @@ func (in *ComputeForwardingRuleStatus) DeepCopyInto(out *ComputeForwardingRuleSt *out = new(string) **out = **in } + if in.ExternalRef != nil { + in, out := &in.ExternalRef, &out.ExternalRef + *out = new(string) + **out = **in + } if in.LabelFingerprint != nil { in, out := &in.LabelFingerprint, &out.LabelFingerprint *out = new(string) diff --git a/pkg/controller/direct/compute/forwardingrule_externalresource.go b/pkg/controller/direct/compute/forwardingrule_externalresource.go index f16f66916c..f9cbd5f0c2 100644 --- a/pkg/controller/direct/compute/forwardingrule_externalresource.go +++ b/pkg/controller/direct/compute/forwardingrule_externalresource.go @@ -36,7 +36,7 @@ func (c *ForwardingRuleIdentity) FullyQualifiedName() string { if c.location == "global" { return fmt.Sprintf("projects/%s/global/forwardingrules/%s", c.project, c.forwardingRule) } else { - return fmt.Sprintf("projects/%s/locations/%s/forwardingrules/%s", c.project, c.location, c.forwardingRule) + return fmt.Sprintf("projects/%s/regions/%s/forwardingrules/%s", c.project, c.location, c.forwardingRule) } } @@ -53,14 +53,14 @@ func asID(externalRef string) (*ForwardingRuleIdentity, error) { } path := strings.TrimPrefix(externalRef, serviceDomain+"/") tokens := strings.Split(path, "/") - if len(tokens) == 5 || tokens[0] == "projects" || tokens[2] == "global" || tokens[3] == "forwardingrules" { + if len(tokens) == 5 && tokens[0] == "projects" && tokens[2] == "global" && tokens[3] == "forwardingrules" { return &ForwardingRuleIdentity{ project: tokens[1], location: "global", forwardingRule: tokens[4], }, nil } - if len(tokens) == 6 || tokens[0] == "projects" || tokens[2] == "locations" || tokens[4] == "forwardingrules" { + if len(tokens) == 6 && tokens[0] == "projects" && tokens[2] == "regions" && tokens[4] == "forwardingrules" { return &ForwardingRuleIdentity{ project: tokens[1], location: tokens[3], diff --git a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/globalcomputeforwardingrule/_generated_object_globalcomputeforwardingrule.golden.yaml b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/globalcomputeforwardingrule/_generated_object_globalcomputeforwardingrule.golden.yaml index 3595b207f5..27ea9518fd 100644 --- a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/globalcomputeforwardingrule/_generated_object_globalcomputeforwardingrule.golden.yaml +++ b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/globalcomputeforwardingrule/_generated_object_globalcomputeforwardingrule.golden.yaml @@ -47,6 +47,7 @@ status: status: "True" type: Ready creationTimestamp: "1970-01-01T00:00:00Z" + externalRef: //compute.googleapis.com/projects/${projectId}/global/forwardingrules/computeglobalforwardingrule-${uniqueId} labelFingerprint: abcdef0123A= observedGeneration: 2 selfLink: https://www.googleapis.com/compute/v1/projects/${projectId}/global/forwardingRules/computeglobalforwardingrule-${uniqueId} diff --git a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/regionalcomputeforwardingrule/_generated_object_regionalcomputeforwardingrule.golden.yaml b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/regionalcomputeforwardingrule/_generated_object_regionalcomputeforwardingrule.golden.yaml index 62ddb1576b..3d255f75d5 100644 --- a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/regionalcomputeforwardingrule/_generated_object_regionalcomputeforwardingrule.golden.yaml +++ b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/regionalcomputeforwardingrule/_generated_object_regionalcomputeforwardingrule.golden.yaml @@ -45,6 +45,7 @@ status: status: "True" type: Ready creationTimestamp: "1970-01-01T00:00:00Z" + externalRef: //compute.googleapis.com/projects/${projectId}/regions/us-central1/forwardingrules/computeregionalforwardingrule-${uniqueId} labelFingerprint: abcdef0123A= observedGeneration: 1 selfLink: https://www.googleapis.com/compute/v1/projects/${projectId}/regions/us-central1/forwardingRules/computeregionalforwardingrule-${uniqueId} diff --git a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/regionalforwardingrulepsc/_generated_object_regionalforwardingrulepsc.golden.yaml b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/regionalforwardingrulepsc/_generated_object_regionalforwardingrulepsc.golden.yaml index e7cd0ca8e0..83b85f958d 100644 --- a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/regionalforwardingrulepsc/_generated_object_regionalforwardingrulepsc.golden.yaml +++ b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/regionalforwardingrulepsc/_generated_object_regionalforwardingrulepsc.golden.yaml @@ -34,6 +34,7 @@ status: status: "True" type: Ready creationTimestamp: "1970-01-01T00:00:00Z" + externalRef: //compute.googleapis.com/projects/${projectId}/regions/us-central1/forwardingrules/computeforwardingrule-${uniqueId} labelFingerprint: abcdef0123A= observedGeneration: 1 selfLink: https://www.googleapis.com/compute/v1/projects/${projectId}/regions/us-central1/forwardingRules/computeforwardingrule-${uniqueId} diff --git a/scripts/generate-google3-docs/resource-reference/generated/resource-docs/compute/computeforwardingrule.md b/scripts/generate-google3-docs/resource-reference/generated/resource-docs/compute/computeforwardingrule.md index 0bade0cfd7..55fcb7a26f 100644 --- a/scripts/generate-google3-docs/resource-reference/generated/resource-docs/compute/computeforwardingrule.md +++ b/scripts/generate-google3-docs/resource-reference/generated/resource-docs/compute/computeforwardingrule.md @@ -227,8 +227,7 @@ internal load balancer.{% endverbatim %}

object

-

{% verbatim %}A ComputeBackendService to receive the matched traffic. This is -used only for internal load balancing.{% endverbatim %}

+

{% verbatim %}A ComputeBackendService to receive the matched traffic. This is used only for internal load balancing.{% endverbatim %}

@@ -238,7 +237,7 @@ used only for internal load balancing.{% endverbatim %}

string

-

{% verbatim %}Allowed value: The `selfLink` field of a `ComputeBackendService` resource.{% endverbatim %}

+

{% verbatim %}The ComputeBackendService selflink in the form "projects/{{project}}/global/backendServices/{{name}}" or "projects/{{project}}/regions/{{region}}/backendServices/{{name}}" when not managed by KCC.{% endverbatim %}

@@ -248,7 +247,7 @@ used only for internal load balancing.{% endverbatim %}

string

-

{% verbatim %}Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names{% endverbatim %}

+

{% verbatim %}The `name` field of a `ComputeBackendService` resource.{% endverbatim %}

@@ -258,7 +257,7 @@ used only for internal load balancing.{% endverbatim %}

string

-

{% verbatim %}Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/{% endverbatim %}

+

{% verbatim %}The `namespace` field of a `ComputeBackendService` resource.{% endverbatim %}

@@ -268,8 +267,7 @@ used only for internal load balancing.{% endverbatim %}

string

-

{% verbatim %}Immutable. An optional description of this resource. Provide this property when -you create the resource.{% endverbatim %}

+

{% verbatim %}Immutable. An optional description of this resource. Provide this property when you create the resource.{% endverbatim %}

@@ -317,7 +315,7 @@ range of the subnet or network configured for this forwarding rule.{% endverbati

string

-

{% verbatim %}Allowed value: The `address` field of a `ComputeAddress` resource.{% endverbatim %}

+

{% verbatim %}The ComputeAddress selflink in the form "projects/{{project}}/regions/{{region}}/addresses/{{name}}" when not managed by KCC.{% endverbatim %}

@@ -327,7 +325,7 @@ range of the subnet or network configured for this forwarding rule.{% endverbati

string

-

{% verbatim %}Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names{% endverbatim %}

+

{% verbatim %}The `name` field of a `ComputeAddress` resource.{% endverbatim %}

@@ -337,7 +335,7 @@ range of the subnet or network configured for this forwarding rule.{% endverbati

string

-

{% verbatim %}Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/{% endverbatim %}

+

{% verbatim %}The `namespace` field of a `ComputeAddress` resource.{% endverbatim %}

@@ -418,7 +416,7 @@ Must set to empty for private service connect forwarding rule. For more informat

location

-

Required

+

Required*

string

@@ -491,8 +489,7 @@ This list must not be empty and can have at the most 64 entries.{% endverbatim %

string

-

{% verbatim %}Immutable. Name of the metadata label. The length must be between -1 and 1024 characters, inclusive.{% endverbatim %}

+

{% verbatim %}Immutable. Name of the metadata label. The length must be between 1 and 1024 characters, inclusive.{% endverbatim %}

@@ -502,8 +499,7 @@ This list must not be empty and can have at the most 64 entries.{% endverbatim %

string

-

{% verbatim %}Immutable. The value that the label must match. The value has a maximum -length of 1024 characters.{% endverbatim %}

+

{% verbatim %}Immutable. The value that the label must match. The value has a maximum length of 1024 characters.{% endverbatim %}

@@ -529,10 +525,7 @@ provided metadata. Possible values: ["MATCH_ANY", "MATCH_ALL"].{% endverbatim %}

object

-

{% verbatim %}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.{% endverbatim %}

+

{% verbatim %}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.{% endverbatim %}

@@ -542,7 +535,7 @@ field is not specified, the default network will be used.{% endverbatim %}

string

-

{% verbatim %}Allowed value: The `selfLink` field of a `ComputeNetwork` resource.{% endverbatim %}

+

{% verbatim %}The compute network selflink of form "projects//global/networks/", when not managed by Config Connector.{% endverbatim %}

@@ -552,7 +545,7 @@ field is not specified, the default network will be used.{% endverbatim %}

string

-

{% verbatim %}Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names{% endverbatim %}

+

{% verbatim %}The `name` field of a `ComputeNetwork` resource.{% endverbatim %}

@@ -562,7 +555,7 @@ field is not specified, the default network will be used.{% endverbatim %}

string

-

{% verbatim %}Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/{% endverbatim %}

+

{% verbatim %}The `namespace` field of a `ComputeNetwork` resource.{% endverbatim %}

@@ -612,7 +605,6 @@ 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. @@ -640,7 +632,6 @@ pair, and cannot have overlapping 'portRange's.{% endverbatim %}

* 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 @@ -783,7 +774,7 @@ subnetwork must be specified.{% endverbatim %}

string

-

{% verbatim %}Allowed value: The `selfLink` field of a `ComputeSubnetwork` resource.{% endverbatim %}

+

{% verbatim %}The ComputeSubnetwork selflink of form "projects/{{project}}/regions/{{region}}/subnetworks/{{name}}", when not managed by KCC.{% endverbatim %}

@@ -793,7 +784,7 @@ subnetwork must be specified.{% endverbatim %}

string

-

{% verbatim %}Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names{% endverbatim %}

+

{% verbatim %}The `name` field of a `ComputeSubnetwork` resource.{% endverbatim %}

@@ -803,7 +794,7 @@ subnetwork must be specified.{% endverbatim %}

string

-

{% verbatim %}Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/{% endverbatim %}

+

{% verbatim %}The `namespace` field of a `ComputeSubnetwork` resource.{% endverbatim %}

@@ -813,10 +804,7 @@ subnetwork must be specified.{% endverbatim %}

object

-

{% verbatim %}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.{% endverbatim %}

+

{% verbatim %}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.{% endverbatim %}

@@ -836,7 +824,7 @@ are valid.{% endverbatim %}

string

-

{% verbatim %}Allowed value: The `selfLink` field of a `ComputeServiceAttachment` resource.{% endverbatim %}

+

{% verbatim %}The ComputeServiceAttachment selflink in the form "projects/{{project}}/regions/{{region}}/serviceAttachments/{{name}}" when not managed by KCC.{% endverbatim %}

@@ -846,7 +834,7 @@ are valid.{% endverbatim %}

string

-

{% verbatim %}Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names{% endverbatim %}

+

{% verbatim %}The `name` field of a `ComputeServiceAttachment` resource.{% endverbatim %}

@@ -856,7 +844,7 @@ are valid.{% endverbatim %}

string

-

{% verbatim %}Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/{% endverbatim %}

+

{% verbatim %}The `namespace` field of a `ComputeServiceAttachment` resource.{% endverbatim %}

@@ -876,7 +864,7 @@ are valid.{% endverbatim %}

string

-

{% verbatim %}Allowed value: The `selfLink` field of a `ComputeTargetGRPCProxy` resource.{% endverbatim %}

+

{% verbatim %}The ComputeTargetGrpcProxy selflink in the form "projects/{{project}}/global/targetGrpcProxies/{{name}}" when not managed by KCC.{% endverbatim %}

@@ -886,7 +874,7 @@ are valid.{% endverbatim %}

string

-

{% verbatim %}Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names{% endverbatim %}

+

{% verbatim %}The `name` field of a `ComputeTargetGrpcProxy` resource.{% endverbatim %}

@@ -896,7 +884,7 @@ are valid.{% endverbatim %}

string

-

{% verbatim %}Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/{% endverbatim %}

+

{% verbatim %}The `namespace` field of a `ComputeTargetGrpcProxy` resource.{% endverbatim %}

@@ -916,7 +904,7 @@ are valid.{% endverbatim %}

string

-

{% verbatim %}Allowed value: The `selfLink` field of a `ComputeTargetHTTPProxy` resource.{% endverbatim %}

+

{% verbatim %}The ComputeTargetHTTPProxy selflink in the form "projects/{{project}}/global/targetHttpProxies/{{name}}" or "projects/{{project}}/regions/{{region}}/targetHttpProxies/{{name}}" when not managed by KCC.{% endverbatim %}

@@ -926,7 +914,7 @@ are valid.{% endverbatim %}

string

-

{% verbatim %}Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names{% endverbatim %}

+

{% verbatim %}The `name` field of a `ComputeTargetHTTPProxy` resource.{% endverbatim %}

@@ -936,7 +924,7 @@ are valid.{% endverbatim %}

string

-

{% verbatim %}Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/{% endverbatim %}

+

{% verbatim %}The `namespace` field of a `ComputeTargetHTTPProxy` resource.{% endverbatim %}

@@ -956,7 +944,7 @@ are valid.{% endverbatim %}

string

-

{% verbatim %}Allowed value: The `selfLink` field of a `ComputeTargetHTTPSProxy` resource.{% endverbatim %}

+

{% verbatim %}The ComputeTargetHTTPSProxy selflink in the form "projects/{{project}}/global/targetHttpProxies/{{name}}" or "projects/{{project}}/regions/{{region}}/targetHttpProxies/{{name}}" when not managed by KCC.{% endverbatim %}

@@ -966,7 +954,7 @@ are valid.{% endverbatim %}

string

-

{% verbatim %}Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names{% endverbatim %}

+

{% verbatim %}The `name` field of a `ComputeTargetHTTPSProxy` resource.{% endverbatim %}

@@ -976,7 +964,7 @@ are valid.{% endverbatim %}

string

-

{% verbatim %}Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/{% endverbatim %}

+

{% verbatim %}The `namespace` field of a `ComputeTargetHTTPSProxy` resource.{% endverbatim %}

@@ -996,7 +984,7 @@ are valid.{% endverbatim %}

string

-

{% verbatim %}Allowed value: The `selfLink` field of a `ComputeTargetSSLProxy` resource.{% endverbatim %}

+

{% verbatim %}The ComputeTargetSSLProxy selflink in the form "projects/{{project}}/global/targetSslProxies/{{name}}" when not managed by KCC.{% endverbatim %}

@@ -1006,7 +994,7 @@ are valid.{% endverbatim %}

string

-

{% verbatim %}Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names{% endverbatim %}

+

{% verbatim %}The `name` field of a `ComputeTargetSSLProxy` resource.{% endverbatim %}

@@ -1016,7 +1004,7 @@ are valid.{% endverbatim %}

string

-

{% verbatim %}Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/{% endverbatim %}

+

{% verbatim %}The `namespace` field of a `ComputeTargetSSLProxy` resource.{% endverbatim %}

@@ -1036,7 +1024,7 @@ are valid.{% endverbatim %}

string

-

{% verbatim %}Allowed value: The `selfLink` field of a `ComputeTargetTCPProxy` resource.{% endverbatim %}

+

{% verbatim %}The ComputeTargetTCPProxy selflink in the form "projects/{{project}}/global/targetTcpProxies/{{name}}" or "projects/{{project}}/regions/{{region}}/targetTcpProxies/{{name}}" when not managed by KCC.{% endverbatim %}

@@ -1046,7 +1034,7 @@ are valid.{% endverbatim %}

string

-

{% verbatim %}Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names{% endverbatim %}

+

{% verbatim %}The `name` field of a `ComputeTargetTCPProxy` resource.{% endverbatim %}

@@ -1056,7 +1044,7 @@ are valid.{% endverbatim %}

string

-

{% verbatim %}Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/{% endverbatim %}

+

{% verbatim %}The `namespace` field of a `ComputeTargetTCPProxy` resource.{% endverbatim %}

@@ -1076,7 +1064,7 @@ are valid.{% endverbatim %}

string

-

{% verbatim %}Allowed value: The `selfLink` field of a `ComputeTargetVPNGateway` resource.{% endverbatim %}

+

{% verbatim %}The ComputeTargetVPNGateway selflink in the form "projects/{{project}}/regions/{{region}}/targetVpnGateways/{{name}}" when not managed by KCC.{% endverbatim %}

@@ -1086,7 +1074,7 @@ are valid.{% endverbatim %}

string

-

{% verbatim %}Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names{% endverbatim %}

+

{% verbatim %}The `name` field of a `ComputeTargetVPNGateway` resource.{% endverbatim %}

@@ -1096,7 +1084,7 @@ are valid.{% endverbatim %}

string

-

{% verbatim %}Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/{% endverbatim %}

+

{% verbatim %}The `namespace` field of a `ComputeTargetVPNGateway` resource.{% endverbatim %}

@@ -1117,6 +1105,7 @@ conditions: status: string type: string creationTimestamp: string +externalRef: string labelFingerprint: string observedGeneration: integer pscConnectionId: string @@ -1143,7 +1132,7 @@ serviceName: string conditions

list (object)

-

{% verbatim %}Conditions represent the latest available observation of the resource's current state.{% endverbatim %}

+

{% verbatim %}Conditions represent the latest available observations of the object's current state.{% endverbatim %}

@@ -1195,12 +1184,18 @@ serviceName: string

{% verbatim %}Creation timestamp in RFC3339 text format.{% endverbatim %}

+ + externalRef + +

string

+

{% verbatim %}A unique Config Connector specifier for the resource in GCP.{% endverbatim %}

+ + labelFingerprint

string

-

{% verbatim %}The fingerprint used for optimistic locking of this resource. Used -internally during updates.{% endverbatim %}

+

{% verbatim %}The fingerprint used for optimistic locking of this resource. Used internally during updates.{% endverbatim %}