Skip to content

Commit

Permalink
(do not merge this commit)upload realGCP w/TFcontroller log for valid…
Browse files Browse the repository at this point in the history
…ation
  • Loading branch information
gemmahou committed Sep 20, 2024
1 parent 1529a12 commit f8b43bf
Show file tree
Hide file tree
Showing 4 changed files with 254 additions and 295 deletions.
2 changes: 1 addition & 1 deletion mockgcp/mockcompute/globalforwardingrulesv1.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func (s *GlobalForwardingRulesV1) Patch(ctx context.Context, req *pb.PatchGlobal

proto.Merge(obj, req.GetForwardingRuleResource())
// checked GCP log, when AllowGlobalAccess is false, the field will be ignored
if *obj.AllowGlobalAccess == false {
if obj.AllowGlobalAccess != nil && *obj.AllowGlobalAccess == false {
obj.AllowGlobalAccess = nil
}

Expand Down
2 changes: 1 addition & 1 deletion mockgcp/mockcompute/regionalforwardingrulev1.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ func (s *RegionalForwardingRulesV1) Patch(ctx context.Context, req *pb.PatchForw

proto.Merge(obj, req.GetForwardingRuleResource())
// checked GCP log, when AllowGlobalAccess is false, the field will be ignored
if *obj.AllowGlobalAccess == false {
if obj.AllowGlobalAccess != nil && *obj.AllowGlobalAccess == false {
obj.AllowGlobalAccess = nil
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ metadata:
annotations:
cnrm.cloud.google.com/management-conflict-prevention-policy: none
cnrm.cloud.google.com/project-id: ${projectId}
cnrm.cloud.google.com/state-into-spec: absent
finalizers:
- cnrm.cloud.google.com/finalizer
- cnrm.cloud.google.com/deletion-defender
generation: 2
generation: 3
labels:
cnrm-test: "true"
label-one: value-two
Expand All @@ -29,6 +30,7 @@ spec:
networkRef:
name: customnetwork
networkTier: PREMIUM
resourceID: computeregionalforwardingrule-${uniqueId}
serviceLabel: label
subnetworkRef:
name: customsubnetwork
Expand All @@ -40,7 +42,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: 2
observedGeneration: 3
selfLink: https://www.googleapis.com/compute/v1/projects/${projectId}/regions/us-central1/forwardingRules/computeregionalforwardingrule-${uniqueId}
serviceName: label.computeregionalforwardingrule-${uniqueId}.il4.us-central1.lb.${projectId}.internal
Loading

0 comments on commit f8b43bf

Please sign in to comment.