diff --git a/apis/v1alpha1/ack-generate-metadata.yaml b/apis/v1alpha1/ack-generate-metadata.yaml index 671be641..f74ace46 100755 --- a/apis/v1alpha1/ack-generate-metadata.yaml +++ b/apis/v1alpha1/ack-generate-metadata.yaml @@ -1,8 +1,8 @@ ack_generate_info: - build_date: "2022-02-15T19:45:56Z" - build_hash: 930850fc31c40fa7d44f2544ce6e676baab05c27 + build_date: "2022-02-28T18:10:01Z" + build_hash: 4724c496a77a35bd6d1d1a2cc415d342457a7463 go_version: go1.17.5 - version: v0.17.0 + version: v0.17.1 api_directory_checksum: 246af92291668493e03954b4e4117c21f5b62790 api_version: v1alpha1 aws_sdk_go_version: v1.42.0 diff --git a/config/controller/kustomization.yaml b/config/controller/kustomization.yaml index ab812d9d..eb7c86b8 100644 --- a/config/controller/kustomization.yaml +++ b/config/controller/kustomization.yaml @@ -6,4 +6,4 @@ kind: Kustomization images: - name: controller newName: public.ecr.aws/aws-controllers-k8s/elasticache-controller - newTag: v0.0.14 + newTag: v0.0.15 diff --git a/go.mod b/go.mod index fe03e720..5e217672 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/aws-controllers-k8s/elasticache-controller go 1.17 require ( - github.com/aws-controllers-k8s/runtime v0.17.0 + github.com/aws-controllers-k8s/runtime v0.17.1 github.com/aws/aws-sdk-go v1.42.0 github.com/ghodss/yaml v1.0.0 github.com/go-logr/logr v1.2.0 diff --git a/go.sum b/go.sum index 7325d532..f2907c43 100644 --- a/go.sum +++ b/go.sum @@ -64,8 +64,8 @@ github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hC github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= -github.com/aws-controllers-k8s/runtime v0.17.0 h1:6gIU65BfD9K7cf9jrfs8hVMOWwRMNrmErYC4QsIER0w= -github.com/aws-controllers-k8s/runtime v0.17.0/go.mod h1:9c2CL3w0BlVkse+foHlP1SkJRqYWLs9H+4X/z+2kE3w= +github.com/aws-controllers-k8s/runtime v0.17.1 h1:t00XUI7JEWWR+o12tuTPgxHfLcgOn1HKBTzJU9S/Kuo= +github.com/aws-controllers-k8s/runtime v0.17.1/go.mod h1:9c2CL3w0BlVkse+foHlP1SkJRqYWLs9H+4X/z+2kE3w= github.com/aws/aws-sdk-go v1.42.0 h1:BMZws0t8NAhHFsfnT3B40IwD13jVDG5KerlRksctVIw= github.com/aws/aws-sdk-go v1.42.0/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q= github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= diff --git a/helm/Chart.yaml b/helm/Chart.yaml index a74cfcdb..925f455c 100644 --- a/helm/Chart.yaml +++ b/helm/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v1 name: elasticache-chart description: A Helm chart for the ACK service controller for Amazon ElastiCache (ElastiCache) -version: v0.0.14 -appVersion: v0.0.14 +version: v0.0.15 +appVersion: v0.0.15 home: https://github.com/aws-controllers-k8s/elasticache-controller icon: https://raw.githubusercontent.com/aws/eks-charts/master/docs/logo/aws.png sources: diff --git a/helm/templates/NOTES.txt b/helm/templates/NOTES.txt index f4d6c4af..850f140d 100644 --- a/helm/templates/NOTES.txt +++ b/helm/templates/NOTES.txt @@ -1,5 +1,5 @@ {{ .Chart.Name }} has been installed. -This chart deploys "public.ecr.aws/aws-controllers-k8s/elasticache-controller:v0.0.14". +This chart deploys "public.ecr.aws/aws-controllers-k8s/elasticache-controller:v0.0.15". Check its status by running: kubectl --namespace {{ .Release.Namespace }} get pods -l "app.kubernetes.io/instance={{ .Release.Name }}" diff --git a/helm/templates/deployment.yaml b/helm/templates/deployment.yaml index c7c9d0ec..d3a307a7 100644 --- a/helm/templates/deployment.yaml +++ b/helm/templates/deployment.yaml @@ -33,6 +33,12 @@ spec: {{- end }} spec: serviceAccountName: {{ include "service-account.name" . }} + {{- if .Values.image.pullSecrets }} + imagePullSecrets: + {{- range .Values.image.pullSecrets }} + - name: {{ . }} + {{- end }} + {{- end }} containers: - command: - ./bin/controller @@ -50,6 +56,7 @@ spec: - --watch-namespace - "$(ACK_WATCH_NAMESPACE)" image: {{ .Values.image.repository }}:{{ .Values.image.tag }} + imagePullPolicy: {{ .Values.image.pullPolicy }} name: controller ports: - name: http diff --git a/helm/values.yaml b/helm/values.yaml index 0ebf7284..18f555d9 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -4,7 +4,7 @@ image: repository: public.ecr.aws/aws-controllers-k8s/elasticache-controller - tag: v0.0.14 + tag: v0.0.15 pullPolicy: IfNotPresent pullSecrets: [] diff --git a/pkg/resource/cache_parameter_group/manager.go b/pkg/resource/cache_parameter_group/manager.go index 8281712d..335c4470 100644 --- a/pkg/resource/cache_parameter_group/manager.go +++ b/pkg/resource/cache_parameter_group/manager.go @@ -211,6 +211,7 @@ func (rm *resourceManager) LateInitialize( lateInitConditionMessage = "Unable to complete Read operation required for late initialization" lateInitConditionReason = "Late Initialization Failure" ackcondition.SetLateInitialized(latestCopy, corev1.ConditionFalse, &lateInitConditionMessage, &lateInitConditionReason) + ackcondition.SetSynced(latestCopy, corev1.ConditionFalse, nil, nil) return latestCopy, err } lateInitializedRes := rm.lateInitializeFromReadOneOutput(observed, latestCopy) @@ -220,6 +221,7 @@ func (rm *resourceManager) LateInitialize( lateInitConditionMessage = "Late initialization did not complete, requeuing with delay of 5 seconds" lateInitConditionReason = "Delayed Late Initialization" ackcondition.SetLateInitialized(lateInitializedRes, corev1.ConditionFalse, &lateInitConditionMessage, &lateInitConditionReason) + ackcondition.SetSynced(lateInitializedRes, corev1.ConditionFalse, nil, nil) return lateInitializedRes, ackrequeue.NeededAfter(nil, time.Duration(5)*time.Second) } // Set LateInitialized condition to True diff --git a/pkg/resource/cache_parameter_group/references.go b/pkg/resource/cache_parameter_group/references.go index eef3cf6b..9ab0b8e4 100644 --- a/pkg/resource/cache_parameter_group/references.go +++ b/pkg/resource/cache_parameter_group/references.go @@ -19,9 +19,8 @@ import ( "context" "sigs.k8s.io/controller-runtime/pkg/client" - acktypes "github.com/aws-controllers-k8s/runtime/pkg/types" - svcapitypes "github.com/aws-controllers-k8s/elasticache-controller/apis/v1alpha1" + acktypes "github.com/aws-controllers-k8s/runtime/pkg/types" ) // ResolveReferences finds if there are any Reference field(s) present diff --git a/pkg/resource/cache_subnet_group/manager.go b/pkg/resource/cache_subnet_group/manager.go index 7d97165f..97f7bae9 100644 --- a/pkg/resource/cache_subnet_group/manager.go +++ b/pkg/resource/cache_subnet_group/manager.go @@ -211,6 +211,7 @@ func (rm *resourceManager) LateInitialize( lateInitConditionMessage = "Unable to complete Read operation required for late initialization" lateInitConditionReason = "Late Initialization Failure" ackcondition.SetLateInitialized(latestCopy, corev1.ConditionFalse, &lateInitConditionMessage, &lateInitConditionReason) + ackcondition.SetSynced(latestCopy, corev1.ConditionFalse, nil, nil) return latestCopy, err } lateInitializedRes := rm.lateInitializeFromReadOneOutput(observed, latestCopy) @@ -220,6 +221,7 @@ func (rm *resourceManager) LateInitialize( lateInitConditionMessage = "Late initialization did not complete, requeuing with delay of 5 seconds" lateInitConditionReason = "Delayed Late Initialization" ackcondition.SetLateInitialized(lateInitializedRes, corev1.ConditionFalse, &lateInitConditionMessage, &lateInitConditionReason) + ackcondition.SetSynced(lateInitializedRes, corev1.ConditionFalse, nil, nil) return lateInitializedRes, ackrequeue.NeededAfter(nil, time.Duration(5)*time.Second) } // Set LateInitialized condition to True diff --git a/pkg/resource/cache_subnet_group/references.go b/pkg/resource/cache_subnet_group/references.go index d4c87d15..2dce9526 100644 --- a/pkg/resource/cache_subnet_group/references.go +++ b/pkg/resource/cache_subnet_group/references.go @@ -19,9 +19,8 @@ import ( "context" "sigs.k8s.io/controller-runtime/pkg/client" - acktypes "github.com/aws-controllers-k8s/runtime/pkg/types" - svcapitypes "github.com/aws-controllers-k8s/elasticache-controller/apis/v1alpha1" + acktypes "github.com/aws-controllers-k8s/runtime/pkg/types" ) // ResolveReferences finds if there are any Reference field(s) present diff --git a/pkg/resource/replication_group/manager.go b/pkg/resource/replication_group/manager.go index de759533..281117a8 100644 --- a/pkg/resource/replication_group/manager.go +++ b/pkg/resource/replication_group/manager.go @@ -211,6 +211,7 @@ func (rm *resourceManager) LateInitialize( lateInitConditionMessage = "Unable to complete Read operation required for late initialization" lateInitConditionReason = "Late Initialization Failure" ackcondition.SetLateInitialized(latestCopy, corev1.ConditionFalse, &lateInitConditionMessage, &lateInitConditionReason) + ackcondition.SetSynced(latestCopy, corev1.ConditionFalse, nil, nil) return latestCopy, err } lateInitializedRes := rm.lateInitializeFromReadOneOutput(observed, latestCopy) @@ -220,6 +221,7 @@ func (rm *resourceManager) LateInitialize( lateInitConditionMessage = "Late initialization did not complete, requeuing with delay of 5 seconds" lateInitConditionReason = "Delayed Late Initialization" ackcondition.SetLateInitialized(lateInitializedRes, corev1.ConditionFalse, &lateInitConditionMessage, &lateInitConditionReason) + ackcondition.SetSynced(lateInitializedRes, corev1.ConditionFalse, nil, nil) return lateInitializedRes, ackrequeue.NeededAfter(nil, time.Duration(5)*time.Second) } // Set LateInitialized condition to True diff --git a/pkg/resource/replication_group/references.go b/pkg/resource/replication_group/references.go index 2816d92e..1c63d1a9 100644 --- a/pkg/resource/replication_group/references.go +++ b/pkg/resource/replication_group/references.go @@ -19,9 +19,8 @@ import ( "context" "sigs.k8s.io/controller-runtime/pkg/client" - acktypes "github.com/aws-controllers-k8s/runtime/pkg/types" - svcapitypes "github.com/aws-controllers-k8s/elasticache-controller/apis/v1alpha1" + acktypes "github.com/aws-controllers-k8s/runtime/pkg/types" ) // ResolveReferences finds if there are any Reference field(s) present diff --git a/pkg/resource/snapshot/manager.go b/pkg/resource/snapshot/manager.go index 2af15620..ac9d717c 100644 --- a/pkg/resource/snapshot/manager.go +++ b/pkg/resource/snapshot/manager.go @@ -211,6 +211,7 @@ func (rm *resourceManager) LateInitialize( lateInitConditionMessage = "Unable to complete Read operation required for late initialization" lateInitConditionReason = "Late Initialization Failure" ackcondition.SetLateInitialized(latestCopy, corev1.ConditionFalse, &lateInitConditionMessage, &lateInitConditionReason) + ackcondition.SetSynced(latestCopy, corev1.ConditionFalse, nil, nil) return latestCopy, err } lateInitializedRes := rm.lateInitializeFromReadOneOutput(observed, latestCopy) @@ -220,6 +221,7 @@ func (rm *resourceManager) LateInitialize( lateInitConditionMessage = "Late initialization did not complete, requeuing with delay of 5 seconds" lateInitConditionReason = "Delayed Late Initialization" ackcondition.SetLateInitialized(lateInitializedRes, corev1.ConditionFalse, &lateInitConditionMessage, &lateInitConditionReason) + ackcondition.SetSynced(lateInitializedRes, corev1.ConditionFalse, nil, nil) return lateInitializedRes, ackrequeue.NeededAfter(nil, time.Duration(5)*time.Second) } // Set LateInitialized condition to True diff --git a/pkg/resource/snapshot/references.go b/pkg/resource/snapshot/references.go index 89d2adb9..fd7693a1 100644 --- a/pkg/resource/snapshot/references.go +++ b/pkg/resource/snapshot/references.go @@ -19,9 +19,8 @@ import ( "context" "sigs.k8s.io/controller-runtime/pkg/client" - acktypes "github.com/aws-controllers-k8s/runtime/pkg/types" - svcapitypes "github.com/aws-controllers-k8s/elasticache-controller/apis/v1alpha1" + acktypes "github.com/aws-controllers-k8s/runtime/pkg/types" ) // ResolveReferences finds if there are any Reference field(s) present diff --git a/pkg/resource/user/manager.go b/pkg/resource/user/manager.go index 94e41d44..30793659 100644 --- a/pkg/resource/user/manager.go +++ b/pkg/resource/user/manager.go @@ -211,6 +211,7 @@ func (rm *resourceManager) LateInitialize( lateInitConditionMessage = "Unable to complete Read operation required for late initialization" lateInitConditionReason = "Late Initialization Failure" ackcondition.SetLateInitialized(latestCopy, corev1.ConditionFalse, &lateInitConditionMessage, &lateInitConditionReason) + ackcondition.SetSynced(latestCopy, corev1.ConditionFalse, nil, nil) return latestCopy, err } lateInitializedRes := rm.lateInitializeFromReadOneOutput(observed, latestCopy) @@ -220,6 +221,7 @@ func (rm *resourceManager) LateInitialize( lateInitConditionMessage = "Late initialization did not complete, requeuing with delay of 5 seconds" lateInitConditionReason = "Delayed Late Initialization" ackcondition.SetLateInitialized(lateInitializedRes, corev1.ConditionFalse, &lateInitConditionMessage, &lateInitConditionReason) + ackcondition.SetSynced(lateInitializedRes, corev1.ConditionFalse, nil, nil) return lateInitializedRes, ackrequeue.NeededAfter(nil, time.Duration(5)*time.Second) } // Set LateInitialized condition to True diff --git a/pkg/resource/user/references.go b/pkg/resource/user/references.go index fcb4ff21..2ecfaaf1 100644 --- a/pkg/resource/user/references.go +++ b/pkg/resource/user/references.go @@ -19,9 +19,8 @@ import ( "context" "sigs.k8s.io/controller-runtime/pkg/client" - acktypes "github.com/aws-controllers-k8s/runtime/pkg/types" - svcapitypes "github.com/aws-controllers-k8s/elasticache-controller/apis/v1alpha1" + acktypes "github.com/aws-controllers-k8s/runtime/pkg/types" ) // ResolveReferences finds if there are any Reference field(s) present diff --git a/pkg/resource/user_group/manager.go b/pkg/resource/user_group/manager.go index 9693f541..d29e93ff 100644 --- a/pkg/resource/user_group/manager.go +++ b/pkg/resource/user_group/manager.go @@ -211,6 +211,7 @@ func (rm *resourceManager) LateInitialize( lateInitConditionMessage = "Unable to complete Read operation required for late initialization" lateInitConditionReason = "Late Initialization Failure" ackcondition.SetLateInitialized(latestCopy, corev1.ConditionFalse, &lateInitConditionMessage, &lateInitConditionReason) + ackcondition.SetSynced(latestCopy, corev1.ConditionFalse, nil, nil) return latestCopy, err } lateInitializedRes := rm.lateInitializeFromReadOneOutput(observed, latestCopy) @@ -220,6 +221,7 @@ func (rm *resourceManager) LateInitialize( lateInitConditionMessage = "Late initialization did not complete, requeuing with delay of 5 seconds" lateInitConditionReason = "Delayed Late Initialization" ackcondition.SetLateInitialized(lateInitializedRes, corev1.ConditionFalse, &lateInitConditionMessage, &lateInitConditionReason) + ackcondition.SetSynced(lateInitializedRes, corev1.ConditionFalse, nil, nil) return lateInitializedRes, ackrequeue.NeededAfter(nil, time.Duration(5)*time.Second) } // Set LateInitialized condition to True diff --git a/pkg/resource/user_group/references.go b/pkg/resource/user_group/references.go index 549cfb22..6f1e920b 100644 --- a/pkg/resource/user_group/references.go +++ b/pkg/resource/user_group/references.go @@ -19,9 +19,8 @@ import ( "context" "sigs.k8s.io/controller-runtime/pkg/client" - acktypes "github.com/aws-controllers-k8s/runtime/pkg/types" - svcapitypes "github.com/aws-controllers-k8s/elasticache-controller/apis/v1alpha1" + acktypes "github.com/aws-controllers-k8s/runtime/pkg/types" ) // ResolveReferences finds if there are any Reference field(s) present