diff --git a/apis/v1alpha1/ack-generate-metadata.yaml b/apis/v1alpha1/ack-generate-metadata.yaml index 31d1749..1fa2aa8 100755 --- a/apis/v1alpha1/ack-generate-metadata.yaml +++ b/apis/v1alpha1/ack-generate-metadata.yaml @@ -1,7 +1,7 @@ ack_generate_info: - build_date: "2021-09-10T21:06:37Z" - build_hash: a988bddaea3800999e8a548e0e7a4fd44cc00b19 - go_version: go1.14.14 darwin/amd64 + build_date: "2021-09-13T20:15:48Z" + build_hash: c6e8ce29423336f827d2ca5c737595561c84539c + go_version: go1.14.14 version: v0.13.2 api_directory_checksum: a13caf20935ebb6193efdee1ab377cae33311ad7 api_version: v1alpha1 @@ -11,4 +11,3 @@ generator_config_info: original_file_name: generator.yaml last_modification: reason: API generation - timestamp: 2021-09-10 21:06:47.280077 +0000 UTC diff --git a/helm/templates/deployment.yaml b/helm/templates/deployment.yaml index b28b454..85f5e32 100644 --- a/helm/templates/deployment.yaml +++ b/helm/templates/deployment.yaml @@ -77,3 +77,4 @@ spec: - name: ACK_RESOURCE_TAGS value: {{ join "," .Values.resourceTags | quote }} terminationGracePeriodSeconds: 10 + nodeSelector: {{ toYaml .Values.deployment.nodeSelector | nindent 8 }} diff --git a/helm/values.yaml b/helm/values.yaml index f7f0515..46e2023 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -15,6 +15,8 @@ deployment: annotations: {} labels: {} containerPort: 8080 + nodeSelector: + kubernetes.io/os: linux metrics: service: diff --git a/pkg/resource/scalable_target/manager.go b/pkg/resource/scalable_target/manager.go index b3ce099..cbda87f 100644 --- a/pkg/resource/scalable_target/manager.go +++ b/pkg/resource/scalable_target/manager.go @@ -270,7 +270,7 @@ func (rm *resourceManager) onError( r *resource, err error, ) (acktypes.AWSResource, error) { - if ackcompare.IsNil(r) { + if r == nil { return nil, err } r1, updated := rm.updateConditions(r, false, err) @@ -293,7 +293,7 @@ func (rm *resourceManager) onError( func (rm *resourceManager) onSuccess( r *resource, ) (acktypes.AWSResource, error) { - if ackcompare.IsNil(r) { + if r == nil { return nil, nil } r1, updated := rm.updateConditions(r, true, nil) diff --git a/pkg/resource/scalable_target/sdk.go b/pkg/resource/scalable_target/sdk.go index 5dfb8b4..f5ed809 100644 --- a/pkg/resource/scalable_target/sdk.go +++ b/pkg/resource/scalable_target/sdk.go @@ -21,6 +21,7 @@ import ( ackv1alpha1 "github.com/aws-controllers-k8s/runtime/apis/core/v1alpha1" ackcompare "github.com/aws-controllers-k8s/runtime/pkg/compare" + ackcondition "github.com/aws-controllers-k8s/runtime/pkg/condition" ackerr "github.com/aws-controllers-k8s/runtime/pkg/errors" ackrtlog "github.com/aws-controllers-k8s/runtime/pkg/runtime/log" "github.com/aws/aws-sdk-go/aws" @@ -40,6 +41,7 @@ var ( _ = &svcapitypes.ScalableTarget{} _ = ackv1alpha1.AWSAccountID("") _ = &ackerr.NotFound + _ = &ackcondition.NotManagedMessage ) // sdkFind returns SDK-specific information about a supplied resource diff --git a/pkg/resource/scaling_policy/manager.go b/pkg/resource/scaling_policy/manager.go index 38140cf..ea21455 100644 --- a/pkg/resource/scaling_policy/manager.go +++ b/pkg/resource/scaling_policy/manager.go @@ -270,7 +270,7 @@ func (rm *resourceManager) onError( r *resource, err error, ) (acktypes.AWSResource, error) { - if ackcompare.IsNil(r) { + if r == nil { return nil, err } r1, updated := rm.updateConditions(r, false, err) @@ -293,7 +293,7 @@ func (rm *resourceManager) onError( func (rm *resourceManager) onSuccess( r *resource, ) (acktypes.AWSResource, error) { - if ackcompare.IsNil(r) { + if r == nil { return nil, nil } r1, updated := rm.updateConditions(r, true, nil) diff --git a/pkg/resource/scaling_policy/sdk.go b/pkg/resource/scaling_policy/sdk.go index f14f6c5..35ae2c0 100644 --- a/pkg/resource/scaling_policy/sdk.go +++ b/pkg/resource/scaling_policy/sdk.go @@ -21,6 +21,7 @@ import ( ackv1alpha1 "github.com/aws-controllers-k8s/runtime/apis/core/v1alpha1" ackcompare "github.com/aws-controllers-k8s/runtime/pkg/compare" + ackcondition "github.com/aws-controllers-k8s/runtime/pkg/condition" ackerr "github.com/aws-controllers-k8s/runtime/pkg/errors" ackrtlog "github.com/aws-controllers-k8s/runtime/pkg/runtime/log" "github.com/aws/aws-sdk-go/aws" @@ -40,6 +41,7 @@ var ( _ = &svcapitypes.ScalingPolicy{} _ = ackv1alpha1.AWSAccountID("") _ = &ackerr.NotFound + _ = &ackcondition.NotManagedMessage ) // sdkFind returns SDK-specific information about a supplied resource