Skip to content

Commit c8d694b

Browse files
committed
Add structured reporting diff to ReCAPTCHAEnterpriseFirewallPolicy
1 parent 140e11a commit c8d694b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pkg/controller/direct/recaptchaenterprise/firewallpolicy_controller.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import (
3131
"github.com/GoogleCloudPlatform/k8s-config-connector/pkg/controller/direct/common"
3232
"github.com/GoogleCloudPlatform/k8s-config-connector/pkg/controller/direct/directbase"
3333
"github.com/GoogleCloudPlatform/k8s-config-connector/pkg/controller/direct/registry"
34+
"github.com/GoogleCloudPlatform/k8s-config-connector/pkg/structuredreporting"
3435

3536
gcp "cloud.google.com/go/recaptchaenterprise/v2/apiv1"
3637
pb "cloud.google.com/go/recaptchaenterprise/v2/apiv1/recaptchaenterprisepb"
@@ -187,6 +188,12 @@ func (a *FirewallPolicyAdapter) Update(ctx context.Context, updateOp *directbase
187188
return nil
188189
}
189190

191+
report := &structuredreporting.Diff{Object: updateOp.GetUnstructured()}
192+
for path := range paths {
193+
report.AddField(path, nil, nil)
194+
}
195+
structuredreporting.ReportDiff(ctx, report)
196+
190197
req := &pb.UpdateFirewallPolicyRequest{
191198
FirewallPolicy: desiredPb,
192199
UpdateMask: &fieldmaskpb.FieldMask{Paths: sets.List(paths)},

0 commit comments

Comments
 (0)