Skip to content

Commit fad2289

Browse files
authored
fix: enable tag support for EventSourceMapping and CodeSigningConfig (#219)
Description of changes: Both resources support tagging via Lambda's TagResource/UntagResource/ListTags APIs but had tags disabled. Since GetEventSourceMapping and GetCodeSigningConfig don't return tags in their response, this adds sdk_read_one_post_set_output hooks to call ListTags and sdk_update_pre_build_request hooks to sync tag diffs via TagResource/UntagResource. Uses ackcompare.GetTagsDifference from the runtime for computing tag deltas. Resolves aws-controllers-k8s/community#2905 By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent f7394e2 commit fad2289

30 files changed

Lines changed: 623 additions & 25 deletions
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
ack_generate_info:
2-
build_date: "2026-06-23T20:48:09Z"
2+
build_date: "2026-06-26T00:25:13Z"
33
build_hash: 2ae5d2cfadaa2a10b2ccb9e73a111b2a91c36642
4-
go_version: go1.26.0
4+
go_version: go1.26.4
55
version: v0.60.0
6-
api_directory_checksum: fa5722e48470428b95f9c3b9c5905734fff2f523
6+
api_directory_checksum: ce4e1b9e43ddbbd1de4d42cb5734359c61a0040c
77
api_version: v1alpha1
88
aws_sdk_go_version: v1.41.5
99
generator_config_info:
10-
file_checksum: eca97fec2bb942f1a4e3ef068069e6f70dd5accf
10+
file_checksum: 84db182faab650d546e93c61de79c969df4a9c50
1111
original_file_name: generator.yaml
1212
last_modification:
1313
reason: API generation

‎apis/v1alpha1/code_signing_config.go‎

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎apis/v1alpha1/event_source_mapping.go‎

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎apis/v1alpha1/generator.yaml‎

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,10 @@ ignore:
88
# FunctionUrlConfig
99
# LayerVersion
1010
field_paths:
11-
- CreateCodeSigningConfigInput.Tags
1211
- CreateEventSourceMappingInput.DocumentDBEventSourceConfig
1312
- CreateEventSourceMappingInput.KMSKeyArn
1413
- CreateEventSourceMappingInput.MetricsConfig
1514
- CreateEventSourceMappingInput.ProvisionedPollerConfig
16-
- CreateEventSourceMappingInput.Tags
1715
- CreateEventSourceMappingOutput.FilterCriteriaError
1816
- CreateEventSourceMappingOutput.DocumentDBEventSourceConfig
1917
- CreateEventSourceMappingOutput.KMSKeyArn
@@ -209,8 +207,11 @@ resources:
209207
fields:
210208
AllowedPublishers:
211209
is_required: true
212-
tags:
213-
ignore: true
210+
hooks:
211+
sdk_read_one_post_set_output:
212+
template_path: hooks/codesigningconfig/sdk_read_one_post_set_output.go.tpl
213+
sdk_update_pre_build_request:
214+
template_path: hooks/codesigningconfig/sdk_update_pre_build_request.go.tpl
214215
EventSourceMapping:
215216
fields:
216217
Queues:
@@ -250,10 +251,12 @@ resources:
250251
hooks:
251252
delta_pre_compare:
252253
code: customPreCompare(delta, a, b)
254+
sdk_read_one_post_set_output:
255+
template_path: hooks/eventsourcemapping/sdk_read_one_post_set_output.go.tpl
256+
sdk_update_pre_build_request:
257+
template_path: hooks/eventsourcemapping/sdk_update_pre_build_request.go.tpl
253258
sdk_update_post_build_request:
254259
template_path: hooks/eventsourcemapping/sdk_update_post_build_request.go.tpl
255-
tags:
256-
ignore: true
257260
FunctionUrlConfig:
258261
tags:
259262
ignore: true

‎apis/v1alpha1/zz_generated.deepcopy.go‎

Lines changed: 32 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎config/crd/bases/lambda.services.k8s.aws_codesigningconfigs.yaml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ spec:
6161
description:
6262
description: Descriptive name for this code signing configuration.
6363
type: string
64+
tags:
65+
additionalProperties:
66+
type: string
67+
description: A list of tags to add to the code signing configuration.
68+
type: object
6469
required:
6570
- allowedPublishers
6671
type: object

‎config/crd/bases/lambda.services.k8s.aws_eventsourcemappings.yaml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,11 @@ spec:
444444
StartingPositionTimestamp cannot be in the future.
445445
format: date-time
446446
type: string
447+
tags:
448+
additionalProperties:
449+
type: string
450+
description: A list of tags to apply to the event source mapping.
451+
type: object
447452
topics:
448453
description: The name of the Kafka topic.
449454
items:

‎generator.yaml‎

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,10 @@ ignore:
88
# FunctionUrlConfig
99
# LayerVersion
1010
field_paths:
11-
- CreateCodeSigningConfigInput.Tags
1211
- CreateEventSourceMappingInput.DocumentDBEventSourceConfig
1312
- CreateEventSourceMappingInput.KMSKeyArn
1413
- CreateEventSourceMappingInput.MetricsConfig
1514
- CreateEventSourceMappingInput.ProvisionedPollerConfig
16-
- CreateEventSourceMappingInput.Tags
1715
- CreateEventSourceMappingOutput.FilterCriteriaError
1816
- CreateEventSourceMappingOutput.DocumentDBEventSourceConfig
1917
- CreateEventSourceMappingOutput.KMSKeyArn
@@ -209,8 +207,11 @@ resources:
209207
fields:
210208
AllowedPublishers:
211209
is_required: true
212-
tags:
213-
ignore: true
210+
hooks:
211+
sdk_read_one_post_set_output:
212+
template_path: hooks/codesigningconfig/sdk_read_one_post_set_output.go.tpl
213+
sdk_update_pre_build_request:
214+
template_path: hooks/codesigningconfig/sdk_update_pre_build_request.go.tpl
214215
EventSourceMapping:
215216
fields:
216217
Queues:
@@ -250,10 +251,12 @@ resources:
250251
hooks:
251252
delta_pre_compare:
252253
code: customPreCompare(delta, a, b)
254+
sdk_read_one_post_set_output:
255+
template_path: hooks/eventsourcemapping/sdk_read_one_post_set_output.go.tpl
256+
sdk_update_pre_build_request:
257+
template_path: hooks/eventsourcemapping/sdk_update_pre_build_request.go.tpl
253258
sdk_update_post_build_request:
254259
template_path: hooks/eventsourcemapping/sdk_update_post_build_request.go.tpl
255-
tags:
256-
ignore: true
257260
FunctionUrlConfig:
258261
tags:
259262
ignore: true

‎helm/crds/lambda.services.k8s.aws_codesigningconfigs.yaml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ spec:
6161
description:
6262
description: Descriptive name for this code signing configuration.
6363
type: string
64+
tags:
65+
additionalProperties:
66+
type: string
67+
description: A list of tags to add to the code signing configuration.
68+
type: object
6469
required:
6570
- allowedPublishers
6671
type: object

‎helm/crds/lambda.services.k8s.aws_eventsourcemappings.yaml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,11 @@ spec:
444444
StartingPositionTimestamp cannot be in the future.
445445
format: date-time
446446
type: string
447+
tags:
448+
additionalProperties:
449+
type: string
450+
description: A list of tags to apply to the event source mapping.
451+
type: object
447452
topics:
448453
description: The name of the Kafka topic.
449454
items:

0 commit comments

Comments
 (0)