diff --git a/apis/v1alpha1/ack-generate-metadata.yaml b/apis/v1alpha1/ack-generate-metadata.yaml index b7219ca..0a1cc82 100755 --- a/apis/v1alpha1/ack-generate-metadata.yaml +++ b/apis/v1alpha1/ack-generate-metadata.yaml @@ -1,8 +1,8 @@ ack_generate_info: - build_date: "2025-08-22T17:41:40Z" - build_hash: 1045a5e99038b11b0630ca2f2f69c3bae4bedba6 - go_version: go1.25.0 - version: v0.51.0-1-g1045a5e + build_date: "2025-09-19T17:16:38Z" + build_hash: 6b4211163dcc34776b01da9a18217bac0f4103fd + go_version: go1.24.6 + version: v0.52.0 api_directory_checksum: 3cd2161708148476a53b44162a9e095bf92f91d3 api_version: v1alpha1 aws_sdk_go_version: v1.38.0 diff --git a/config/controller/kustomization.yaml b/config/controller/kustomization.yaml index 4660a0e..9fa3b1b 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/lambda-controller - newTag: 1.9.0 + newTag: 1.9.1 diff --git a/go.mod b/go.mod index dcc1e9c..1d5a730 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/aws-controllers-k8s/kafka-controller v0.0.0-20230615185632-102279061de1 github.com/aws-controllers-k8s/kms-controller v1.0.30 github.com/aws-controllers-k8s/mq-controller v0.0.22 - github.com/aws-controllers-k8s/runtime v0.51.0 + github.com/aws-controllers-k8s/runtime v0.52.0 github.com/aws-controllers-k8s/s3-controller v0.1.5 github.com/aws-controllers-k8s/secretsmanager-controller v1.1.0 github.com/aws/aws-sdk-go v1.49.0 diff --git a/go.sum b/go.sum index a03af21..4a32804 100644 --- a/go.sum +++ b/go.sum @@ -8,8 +8,8 @@ github.com/aws-controllers-k8s/kms-controller v1.0.30 h1:LShnMwPCDu6qEQ5w8FInSE9 github.com/aws-controllers-k8s/kms-controller v1.0.30/go.mod h1:05teqOpGWMGXOCKXN+6eh1cbanQWpDwwCfJ7xEA01Gs= github.com/aws-controllers-k8s/mq-controller v0.0.22 h1:XxFSQL9yaaiiuZ6E/fh/+Y9C+3DG2c5oXWG/4ZNwd1w= github.com/aws-controllers-k8s/mq-controller v0.0.22/go.mod h1:p+YVFjpwlgRC+1cPeCabk1xTB1hTCU+RwYtFzrTnJmE= -github.com/aws-controllers-k8s/runtime v0.51.0 h1:ZKu1DXPG7+CsvbEPLMCGqWFdfK37kSbceLzYf9lRZbw= -github.com/aws-controllers-k8s/runtime v0.51.0/go.mod h1:OkUJN+Ds799JLYZsMJrO2vDJ4snxUeHK2MgrQHbU+Qc= +github.com/aws-controllers-k8s/runtime v0.52.0 h1:Q5UIAn6SSBr60t/DiU/zr6NLBlUuK2AG3yy2ma/9gDU= +github.com/aws-controllers-k8s/runtime v0.52.0/go.mod h1:OkUJN+Ds799JLYZsMJrO2vDJ4snxUeHK2MgrQHbU+Qc= github.com/aws-controllers-k8s/s3-controller v0.1.5 h1:5zb7jsh0fgbPM8cIvcsuH1dta1dKzaAnlwgvb6u3hOc= github.com/aws-controllers-k8s/s3-controller v0.1.5/go.mod h1:8Z8JlO5Hc1dZX2YELu94+lnOgKM0FioAHJBsyaWvtx8= github.com/aws-controllers-k8s/secretsmanager-controller v1.1.0 h1:S+8FLIRMcwzR+Vub86L3GJet/XMCMGHIjVyxnNn0dNI= diff --git a/helm/Chart.yaml b/helm/Chart.yaml index dc14556..f706e9a 100644 --- a/helm/Chart.yaml +++ b/helm/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v1 name: lambda-chart description: A Helm chart for the ACK service controller for AWS Lambda (Lambda) -version: 1.9.0 -appVersion: 1.9.0 +version: 1.9.1 +appVersion: 1.9.1 home: https://github.com/aws-controllers-k8s/lambda-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 cf6cf1b..2b9afb9 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/lambda-controller:1.9.0". +This chart deploys "public.ecr.aws/aws-controllers-k8s/lambda-controller:1.9.1". 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 26e97bb..775f519 100644 --- a/helm/templates/deployment.yaml +++ b/helm/templates/deployment.yaml @@ -10,6 +10,9 @@ metadata: app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} k8s-app: {{ include "ack-lambda-controller.app.name" . }} helm.sh/chart: {{ include "ack-lambda-controller.chart.name-version" . }} +{{- range $key, $value := .Values.deployment.labels }} + {{ $key }}: {{ $value | quote }} +{{- end }} spec: replicas: {{ .Values.deployment.replicas }} selector: @@ -88,6 +91,7 @@ spec: - --feature-gates - "$(FEATURE_GATES)" {{- end }} + - --enable-carm={{ .Values.enableCARM }} image: {{ .Values.image.repository }}:{{ .Values.image.tag }} imagePullPolicy: {{ .Values.image.pullPolicy }} name: controller diff --git a/helm/values.schema.json b/helm/values.schema.json index e656c74..c3f56a0 100644 --- a/helm/values.schema.json +++ b/helm/values.schema.json @@ -263,6 +263,11 @@ }, "type": "object" }, + "enableCARM": { + "description": "Parameter to enable or disable cross account resource management.", + "type": "boolean", + "default": true + }, "serviceAccount": { "description": "ServiceAccount settings", "properties": { diff --git a/helm/values.yaml b/helm/values.yaml index 5d49ec9..4fb999f 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -4,7 +4,7 @@ image: repository: public.ecr.aws/aws-controllers-k8s/lambda-controller - tag: 1.9.0 + tag: 1.9.1 pullPolicy: IfNotPresent pullSecrets: [] @@ -173,6 +173,9 @@ leaderElection: # pod. namespace: "" +# Enable Cross Account Resource Management (default = true). Set this to false to disable cross account resource management. +enableCARM: true + # Configuration for feature gates. These are optional controller features that # can be individually enabled ("true") or disabled ("false") by adding key/value # pairs below. diff --git a/pkg/resource/alias/resource.go b/pkg/resource/alias/resource.go index 9d07903..72a18b4 100644 --- a/pkg/resource/alias/resource.go +++ b/pkg/resource/alias/resource.go @@ -103,16 +103,16 @@ func (r *resource) SetIdentifiers(identifier *ackv1alpha1.AWSIdentifiers) error // PopulateResourceFromAnnotation populates the fields passed from adoption annotation func (r *resource) PopulateResourceFromAnnotation(fields map[string]string) error { - tmp, ok := fields["name"] + primaryKey, ok := fields["name"] if !ok { return ackerrors.NewTerminalError(fmt.Errorf("required field missing: name")) } - r.ko.Spec.Name = &tmp - - f0, f0ok := fields["functionName"] - if f0ok { - r.ko.Spec.FunctionName = aws.String(f0) + r.ko.Spec.Name = &primaryKey + f0, ok := fields["functionName"] + if !ok { + return ackerrors.NewTerminalError(fmt.Errorf("required field missing: functionName")) } + r.ko.Spec.FunctionName = &f0 return nil } diff --git a/pkg/resource/code_signing_config/resource.go b/pkg/resource/code_signing_config/resource.go index a18bc49..d883998 100644 --- a/pkg/resource/code_signing_config/resource.go +++ b/pkg/resource/code_signing_config/resource.go @@ -97,7 +97,7 @@ func (r *resource) SetIdentifiers(identifier *ackv1alpha1.AWSIdentifiers) error // PopulateResourceFromAnnotation populates the fields passed from adoption annotation func (r *resource) PopulateResourceFromAnnotation(fields map[string]string) error { - tmp, ok := fields["arn"] + resourceARN, ok := fields["arn"] if !ok { return ackerrors.NewTerminalError(fmt.Errorf("required field missing: arn")) } @@ -105,7 +105,7 @@ func (r *resource) PopulateResourceFromAnnotation(fields map[string]string) erro if r.ko.Status.ACKResourceMetadata == nil { r.ko.Status.ACKResourceMetadata = &ackv1alpha1.ResourceMetadata{} } - arn := ackv1alpha1.AWSResourceName(tmp) + arn := ackv1alpha1.AWSResourceName(resourceARN) r.ko.Status.ACKResourceMetadata.ARN = &arn return nil diff --git a/pkg/resource/event_source_mapping/resource.go b/pkg/resource/event_source_mapping/resource.go index 322b5f3..42132d9 100644 --- a/pkg/resource/event_source_mapping/resource.go +++ b/pkg/resource/event_source_mapping/resource.go @@ -97,11 +97,11 @@ func (r *resource) SetIdentifiers(identifier *ackv1alpha1.AWSIdentifiers) error // PopulateResourceFromAnnotation populates the fields passed from adoption annotation func (r *resource) PopulateResourceFromAnnotation(fields map[string]string) error { - tmp, ok := fields["uuid"] + primaryKey, ok := fields["uuid"] if !ok { return ackerrors.NewTerminalError(fmt.Errorf("required field missing: uuid")) } - r.ko.Status.UUID = &tmp + r.ko.Status.UUID = &primaryKey return nil } diff --git a/pkg/resource/function/resource.go b/pkg/resource/function/resource.go index 2041e95..6f94d58 100644 --- a/pkg/resource/function/resource.go +++ b/pkg/resource/function/resource.go @@ -97,11 +97,11 @@ func (r *resource) SetIdentifiers(identifier *ackv1alpha1.AWSIdentifiers) error // PopulateResourceFromAnnotation populates the fields passed from adoption annotation func (r *resource) PopulateResourceFromAnnotation(fields map[string]string) error { - tmp, ok := fields["name"] + primaryKey, ok := fields["name"] if !ok { return ackerrors.NewTerminalError(fmt.Errorf("required field missing: name")) } - r.ko.Spec.Name = &tmp + r.ko.Spec.Name = &primaryKey return nil } diff --git a/pkg/resource/function_url_config/resource.go b/pkg/resource/function_url_config/resource.go index 4ff8df0..15770cb 100644 --- a/pkg/resource/function_url_config/resource.go +++ b/pkg/resource/function_url_config/resource.go @@ -103,11 +103,11 @@ func (r *resource) SetIdentifiers(identifier *ackv1alpha1.AWSIdentifiers) error // PopulateResourceFromAnnotation populates the fields passed from adoption annotation func (r *resource) PopulateResourceFromAnnotation(fields map[string]string) error { - tmp, ok := fields["functionName"] + primaryKey, ok := fields["functionName"] if !ok { return ackerrors.NewTerminalError(fmt.Errorf("required field missing: functionName")) } - r.ko.Spec.FunctionName = &tmp + r.ko.Spec.FunctionName = &primaryKey f1, f1ok := fields["qualifier"] if f1ok { diff --git a/pkg/resource/layer_version/resource.go b/pkg/resource/layer_version/resource.go index 2a57cdd..52f4239 100644 --- a/pkg/resource/layer_version/resource.go +++ b/pkg/resource/layer_version/resource.go @@ -97,11 +97,11 @@ func (r *resource) SetIdentifiers(identifier *ackv1alpha1.AWSIdentifiers) error // PopulateResourceFromAnnotation populates the fields passed from adoption annotation func (r *resource) PopulateResourceFromAnnotation(fields map[string]string) error { - tmp, ok := fields["layerName"] + primaryKey, ok := fields["layerName"] if !ok { return ackerrors.NewTerminalError(fmt.Errorf("required field missing: layerName")) } - r.ko.Spec.LayerName = &tmp + r.ko.Spec.LayerName = &primaryKey return nil } diff --git a/pkg/resource/version/resource.go b/pkg/resource/version/resource.go index 6889764..876d49a 100644 --- a/pkg/resource/version/resource.go +++ b/pkg/resource/version/resource.go @@ -103,11 +103,11 @@ func (r *resource) SetIdentifiers(identifier *ackv1alpha1.AWSIdentifiers) error // PopulateResourceFromAnnotation populates the fields passed from adoption annotation func (r *resource) PopulateResourceFromAnnotation(fields map[string]string) error { - tmp, ok := fields["functionName"] + primaryKey, ok := fields["functionName"] if !ok { return ackerrors.NewTerminalError(fmt.Errorf("required field missing: functionName")) } - r.ko.Spec.FunctionName = &tmp + r.ko.Spec.FunctionName = &primaryKey f1, f1ok := fields["version"] if f1ok {