From a3947c3bb38bb60cbc61392cb6f2be4c682005c7 Mon Sep 17 00:00:00 2001 From: Neha Bhat <84361901+ndbhat@users.noreply.github.com> Date: Mon, 8 Jul 2024 13:04:51 -0400 Subject: [PATCH] Update CertificateAuthorityActivation customSetDefaults method (#55) Description of changes: 1. Set fields of `a` to the fields of `b` in customSetDefaults method By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. --- apis/v1alpha1/ack-generate-metadata.yaml | 2 +- .../certificate_authority_activation/custom_delta.go | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/apis/v1alpha1/ack-generate-metadata.yaml b/apis/v1alpha1/ack-generate-metadata.yaml index 7686e41..dba193a 100755 --- a/apis/v1alpha1/ack-generate-metadata.yaml +++ b/apis/v1alpha1/ack-generate-metadata.yaml @@ -1,5 +1,5 @@ ack_generate_info: - build_date: "2024-05-02T20:44:28Z" + build_date: "2024-06-28T14:43:20Z" build_hash: 14cef51778d471698018b6c38b604181a6948248 go_version: go1.22.0 version: v0.34.0 diff --git a/pkg/resource/certificate_authority_activation/custom_delta.go b/pkg/resource/certificate_authority_activation/custom_delta.go index c7d126c..44cbf23 100644 --- a/pkg/resource/certificate_authority_activation/custom_delta.go +++ b/pkg/resource/certificate_authority_activation/custom_delta.go @@ -15,17 +15,13 @@ package certificate_authority_activation import ( ackcompare "github.com/aws-controllers-k8s/runtime/pkg/compare" - "github.com/aws/aws-sdk-go/aws" ) func customSetDefaults( a *resource, b *resource, ) { - // Default value of Staus is ACTIVE - defaultStatus := aws.String("ACTIVE") - if ackcompare.IsNil(a.ko.Spec.Status) && ackcompare.IsNotNil(b.ko.Spec.Status) { - a.ko.Spec.Status = defaultStatus + a.ko.Spec.Status = b.ko.Spec.Status } }