Skip to content

Commit

Permalink
Update CertificateAuthorityActivation customSetDefaults method (#55)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ndbhat committed Jul 8, 2024
1 parent f028ca0 commit a3947c3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion apis/v1alpha1/ack-generate-metadata.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

0 comments on commit a3947c3

Please sign in to comment.