Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions apis/v1alpha1/ack-generate-metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
ack_generate_info:
build_date: "2026-06-26T00:25:13Z"
build_hash: 2ae5d2cfadaa2a10b2ccb9e73a111b2a91c36642
build_date: "2026-06-26T18:51:59Z"
build_hash: 016cc97b328515c8db205ad1091916a0cc66614b
go_version: go1.26.4
version: v0.60.0
version: v0.60.0-2-g016cc97
api_directory_checksum: ce4e1b9e43ddbbd1de4d42cb5734359c61a0040c
api_version: v1alpha1
aws_sdk_go_version: v1.41.5
generator_config_info:
file_checksum: 84db182faab650d546e93c61de79c969df4a9c50
file_checksum: a44e7bd907fefe1b00641992a05da31c16efb5ab
original_file_name: generator.yaml
last_modification:
reason: API generation
4 changes: 4 additions & 0 deletions apis/v1alpha1/generator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,10 @@ resources:
code: customPreCompare(delta, a, b)
sdk_read_one_post_set_output:
template_path: hooks/eventsourcemapping/sdk_read_one_post_set_output.go.tpl
sdk_create_post_set_output:
template_path: hooks/eventsourcemapping/clean_destination_config.go.tpl
sdk_update_post_set_output:
template_path: hooks/eventsourcemapping/clean_destination_config.go.tpl
sdk_update_pre_build_request:
template_path: hooks/eventsourcemapping/sdk_update_pre_build_request.go.tpl
sdk_update_post_build_request:
Expand Down
4 changes: 4 additions & 0 deletions generator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,10 @@ resources:
code: customPreCompare(delta, a, b)
sdk_read_one_post_set_output:
template_path: hooks/eventsourcemapping/sdk_read_one_post_set_output.go.tpl
sdk_create_post_set_output:
template_path: hooks/eventsourcemapping/clean_destination_config.go.tpl
sdk_update_post_set_output:
template_path: hooks/eventsourcemapping/clean_destination_config.go.tpl
sdk_update_pre_build_request:
template_path: hooks/eventsourcemapping/sdk_update_pre_build_request.go.tpl
sdk_update_post_build_request:
Expand Down
35 changes: 35 additions & 0 deletions pkg/resource/event_source_mapping/sdk.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions templates/hooks/eventsourcemapping/clean_destination_config.go.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
if ko.Spec.DestinationConfig != nil {
if ko.Spec.DestinationConfig.OnFailure != nil && ko.Spec.DestinationConfig.OnFailure.Destination == nil {
ko.Spec.DestinationConfig.OnFailure = nil
}
if ko.Spec.DestinationConfig.OnSuccess != nil && ko.Spec.DestinationConfig.OnSuccess.Destination == nil {
ko.Spec.DestinationConfig.OnSuccess = nil
}
if ko.Spec.DestinationConfig.OnFailure == nil && ko.Spec.DestinationConfig.OnSuccess == nil {
ko.Spec.DestinationConfig = nil
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,14 @@
if err != nil {
return nil, err
}
if ko.Spec.DestinationConfig != nil {
if ko.Spec.DestinationConfig.OnFailure != nil && ko.Spec.DestinationConfig.OnFailure.Destination == nil {
ko.Spec.DestinationConfig.OnFailure = nil
}
if ko.Spec.DestinationConfig.OnSuccess != nil && ko.Spec.DestinationConfig.OnSuccess.Destination == nil {
ko.Spec.DestinationConfig.OnSuccess = nil
}
if ko.Spec.DestinationConfig.OnFailure == nil && ko.Spec.DestinationConfig.OnSuccess == nil {
ko.Spec.DestinationConfig = nil
}
}