Skip to content
Merged
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
4 changes: 2 additions & 2 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: "2025-09-25T18:46:28Z"
build_date: "2025-09-26T17:23:37Z"
build_hash: 5bf1e456e1dfc638d47ab492376335f528c0f455
go_version: go1.24.5
version: v0.52.0-1-g5bf1e45
api_directory_checksum: c0850c127b1c1c46a7abf233f454e1c7c561a71c
api_version: v1alpha1
aws_sdk_go_version: v1.32.6
generator_config_info:
file_checksum: e59ecda70fd052399089af65a682c10fe45d58a5
file_checksum: d04b5f7d437623f4ddc566ea1f2e6b068125115e
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 @@ -213,6 +213,10 @@ resources:
references:
resource: TargetGroup
path: Status.ACKResourceMetadata.ARN
Actions.ForwardConfig.TargetGroups.TargetGroupARN:
references:
resource: TargetGroup
path: Status.ACKResourceMetadata.ARN
Priority:
set:
- ignore: true
Expand Down
4 changes: 4 additions & 0 deletions generator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,10 @@ resources:
references:
resource: TargetGroup
path: Status.ACKResourceMetadata.ARN
Actions.ForwardConfig.TargetGroups.TargetGroupARN:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Q: Should this not result in a change to the CRD?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CRD already had this field, but it was not implemented in references.go..

The reason for that was because the actual struct used here already had "references" implemented

references:
resource: TargetGroup
path: Status.ACKResourceMetadata.ARN
Priority:
set:
- ignore: true
Expand Down
98 changes: 81 additions & 17 deletions pkg/resource/rule/references.go

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

9 changes: 7 additions & 2 deletions test/e2e/resources/rule.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@ spec:
priority: 300
listenerARN: $LISTENER_ARN
actions:
- type: "forward"
targetGroupARN: $TARGET_GROUP_ARN
- forwardConfig:
targetGroups:
- targetGroupRef:
from:
name: $TARGET_GROUP_NAME
weight: 1
type: forward
conditions:
- field: http-request-method
httpRequestMethodConfig:
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/tests/test_rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def simple_rule(elbv2_client, simple_listener, simple_target_group, simple_load_
replacements = REPLACEMENT_VALUES.copy()
replacements["RULE_NAME"] = resource_name
replacements["LISTENER_ARN"] = listener_cr["status"]["ackResourceMetadata"]["arn"]
replacements["TARGET_GROUP_ARN"] = target_group_cr["status"]["ackResourceMetadata"]["arn"]
replacements["TARGET_GROUP_NAME"] = target_group_cr["spec"]["name"]

resource_data = load_elbv2_resource(
"rule",
Expand Down