From fb99d64a1fce7a0363c2282b032b02d868d78a67 Mon Sep 17 00:00:00 2001 From: ci-robot Date: Fri, 19 Sep 2025 17:03:50 +0000 Subject: [PATCH] Update to ACK runtime `v0.52.0`, code-generator `v0.52.0` --- apis/v1alpha1/ack-generate-metadata.yaml | 6 +++--- config/controller/kustomization.yaml | 2 +- go.mod | 2 +- go.sum | 4 ++-- helm/Chart.yaml | 4 ++-- helm/templates/NOTES.txt | 2 +- helm/templates/deployment.yaml | 4 ++++ helm/values.schema.json | 5 +++++ helm/values.yaml | 5 ++++- pkg/resource/rule/resource.go | 4 ++-- 10 files changed, 25 insertions(+), 13 deletions(-) diff --git a/apis/v1alpha1/ack-generate-metadata.yaml b/apis/v1alpha1/ack-generate-metadata.yaml index be6af47..0fd1163 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-15T00:21:08Z" - build_hash: b6df33f8c7f55b234555c0b578b8de43c74771a8 + build_date: "2025-09-19T17:03:00Z" + build_hash: 6b4211163dcc34776b01da9a18217bac0f4103fd go_version: go1.24.6 - version: v0.51.0 + version: v0.52.0 api_directory_checksum: 79bfdc7dfcd6ba6f1105efed7fe1bef7da33be00 api_version: v1alpha1 aws_sdk_go_version: v1.32.6 diff --git a/config/controller/kustomization.yaml b/config/controller/kustomization.yaml index b9959bf..18f2ced 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/recyclebin-controller - newTag: 1.1.0 + newTag: 1.1.1 diff --git a/go.mod b/go.mod index d030ca9..d63f1ea 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.24.0 toolchain go1.24.1 require ( - github.com/aws-controllers-k8s/runtime v0.51.0 + github.com/aws-controllers-k8s/runtime v0.52.0 github.com/aws/aws-sdk-go v1.55.5 github.com/aws/aws-sdk-go-v2 v1.34.0 github.com/aws/aws-sdk-go-v2/service/rbin v1.21.9 diff --git a/go.sum b/go.sum index ce0f050..238a21e 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,5 @@ -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/aws-sdk-go v1.55.5 h1:KKUZBfBoyqy5d3swXyiC7Q76ic40rYcbqH7qjh59kzU= github.com/aws/aws-sdk-go v1.55.5/go.mod h1:eRwEWoyTWFMVYVQzKMNHWP5/RV4xIUGMQfXQHfHkpNU= github.com/aws/aws-sdk-go-v2 v1.34.0 h1:9iyL+cjifckRGEVpRKZP3eIxVlL06Qk1Tk13vreaVQU= diff --git a/helm/Chart.yaml b/helm/Chart.yaml index dcdfe17..44b99c1 100644 --- a/helm/Chart.yaml +++ b/helm/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v1 name: recyclebin-chart description: A Helm chart for the ACK service controller for Amazon EBS Recycle Bin (Recycle Bin) -version: 1.1.0 -appVersion: 1.1.0 +version: 1.1.1 +appVersion: 1.1.1 home: https://github.com/aws-controllers-k8s/recyclebin-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 3422c09..9f3c1ce 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/recyclebin-controller:1.1.0". +This chart deploys "public.ecr.aws/aws-controllers-k8s/recyclebin-controller:1.1.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 f7f75fb..62ab9a7 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-recyclebin-controller.app.name" . }} helm.sh/chart: {{ include "ack-recyclebin-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 a1fcd6f..c8a6fa6 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -4,7 +4,7 @@ image: repository: public.ecr.aws/aws-controllers-k8s/recyclebin-controller - tag: 1.1.0 + tag: 1.1.1 pullPolicy: IfNotPresent pullSecrets: [] @@ -167,6 +167,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/rule/resource.go b/pkg/resource/rule/resource.go index ea52eaa..cccb6d3 100644 --- a/pkg/resource/rule/resource.go +++ b/pkg/resource/rule/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["identifier"] + primaryKey, ok := fields["identifier"] if !ok { return ackerrors.NewTerminalError(fmt.Errorf("required field missing: identifier")) } - r.ko.Status.Identifier = &tmp + r.ko.Status.Identifier = &primaryKey return nil }