diff --git a/manifests/crds/rollout-crd.yaml b/manifests/crds/rollout-crd.yaml index 2347c4dc70..73fd66cc5e 100755 --- a/manifests/crds/rollout-crd.yaml +++ b/manifests/crds/rollout-crd.yaml @@ -3249,9 +3249,12 @@ spec: type: string name: type: string + fullName: + type: string required: - arn - name + - fullName type: object loadBalancer: properties: @@ -3259,9 +3262,12 @@ spec: type: string name: type: string + fullName: + type: string required: - arn - name + - fullName type: object stableTargetGroup: properties: @@ -3269,9 +3275,12 @@ spec: type: string name: type: string + fullName: + type: string required: - arn - name + - fullName type: object type: object availableReplicas: diff --git a/manifests/install.yaml b/manifests/install.yaml index 4922391bdf..2f63222058 100755 --- a/manifests/install.yaml +++ b/manifests/install.yaml @@ -14295,9 +14295,12 @@ spec: type: string name: type: string + fullName: + type: string required: - arn - name + - fullName type: object loadBalancer: properties: @@ -14305,9 +14308,12 @@ spec: type: string name: type: string + fullName: + type: string required: - arn - name + - fullName type: object stableTargetGroup: properties: @@ -14315,9 +14321,12 @@ spec: type: string name: type: string + fullName: + type: string required: - arn - name + - fullName type: object type: object availableReplicas: diff --git a/pkg/apiclient/rollout/rollout.swagger.json b/pkg/apiclient/rollout/rollout.swagger.json index afbbbc78f2..ef21ac88f4 100755 --- a/pkg/apiclient/rollout/rollout.swagger.json +++ b/pkg/apiclient/rollout/rollout.swagger.json @@ -702,6 +702,9 @@ }, "arn": { "type": "string" + }, + "fullName": { + "type": "string" } } }, diff --git a/rollout/trafficrouting/alb/alb_test.go b/rollout/trafficrouting/alb/alb_test.go index 3a044c537f..c8ecc0c28f 100644 --- a/rollout/trafficrouting/alb/alb_test.go +++ b/rollout/trafficrouting/alb/alb_test.go @@ -455,16 +455,19 @@ func (f *fakeAWSClient) GetTargetGroupHealth(ctx context.Context, targetGroupARN func (f *fakeAWSClient) getAlbStatus() *v1alpha1.ALBStatus { return &v1alpha1.ALBStatus{ LoadBalancer: v1alpha1.AwsResourceRef{ - Name: *f.loadBalancer.LoadBalancerName, - ARN: *f.loadBalancer.LoadBalancerArn, + Name: *f.loadBalancer.LoadBalancerName, + ARN: *f.loadBalancer.LoadBalancerArn, + FullName: *f.loadBalancer.LoadBalancerFullName, }, CanaryTargetGroup: v1alpha1.AwsResourceRef{ - Name: *f.targetGroups[0].TargetGroupName, - ARN: *f.targetGroups[0].TargetGroupArn, + Name: *f.targetGroups[0].TargetGroupName, + ARN: *f.targetGroups[0].TargetGroupArn, + FullName: *f.targetGroups[0].TargetGroupFullName, }, StableTargetGroup: v1alpha1.AwsResourceRef{ - Name: *f.targetGroups[len(f.targetGroups)-1].TargetGroupName, - ARN: *f.targetGroups[len(f.targetGroups)-1].TargetGroupArn, + Name: *f.targetGroups[len(f.targetGroups)-1].TargetGroupName, + ARN: *f.targetGroups[len(f.targetGroups)-1].TargetGroupArn, + FullName: *f.targetGroups[len(f.targetGroups)-1].TargetGroupFullName, }, } } @@ -544,15 +547,17 @@ func TestVerifyWeight(t *testing.T) { var status v1alpha1.RolloutStatus r, fakeClient := newFakeReconciler(&status) fakeClient.loadBalancer = &elbv2types.LoadBalancer{ - LoadBalancerName: pointer.StringPtr("lb-abc123-name"), - LoadBalancerArn: pointer.StringPtr("lb-abc123-arn"), - DNSName: pointer.StringPtr("verify-weight-test-abc-123.us-west-2.elb.amazonaws.com"), + LoadBalancerName: pointer.StringPtr("lb-abc123-name"), + LoadBalancerArn: pointer.StringPtr("lb-abc123-arn"), + LoadBalancerFullName: pointer.StringPtr("lb-abc123-fullname"), + DNSName: pointer.StringPtr("verify-weight-test-abc-123.us-west-2.elb.amazonaws.com"), } fakeClient.targetGroups = []aws.TargetGroupMeta{ { TargetGroup: elbv2types.TargetGroup{ - TargetGroupName: pointer.StringPtr("canary-tg-abc123-name"), - TargetGroupArn: pointer.StringPtr("canary-tg-abc123-arn"), + TargetGroupName: pointer.StringPtr("canary-tg-abc123-name"), + TargetGroupArn: pointer.StringPtr("canary-tg-abc123-arn"), + TargetGroupFullName: pointer.StringPtr("canary-tg-abc123-fullname"), }, Weight: pointer.Int32Ptr(11), Tags: map[string]string{ @@ -561,8 +566,9 @@ func TestVerifyWeight(t *testing.T) { }, { TargetGroup: elbv2types.TargetGroup{ - TargetGroupName: pointer.StringPtr("stable-tg-abc123-name"), - TargetGroupArn: pointer.StringPtr("stable-tg-abc123-arn"), + TargetGroupName: pointer.StringPtr("stable-tg-abc123-name"), + TargetGroupArn: pointer.StringPtr("stable-tg-abc123-arn"), + TargetGroupFullName: pointer.StringPtr("stable-tg-abc123-fullname"), }, Weight: pointer.Int32Ptr(89), Tags: map[string]string{ @@ -582,15 +588,17 @@ func TestVerifyWeight(t *testing.T) { var status v1alpha1.RolloutStatus r, fakeClient := newFakeReconciler(&status) fakeClient.loadBalancer = &elbv2types.LoadBalancer{ - LoadBalancerName: pointer.StringPtr("lb-abc123-name"), - LoadBalancerArn: pointer.StringPtr("lb-abc123-arn"), - DNSName: pointer.StringPtr("verify-weight-test-abc-123.us-west-2.elb.amazonaws.com"), + LoadBalancerName: pointer.StringPtr("lb-abc123-name"), + LoadBalancerArn: pointer.StringPtr("lb-abc123-arn"), + LoadBalancerFullName: pointer.StringPtr("lb-abc123-fullname"), + DNSName: pointer.StringPtr("verify-weight-test-abc-123.us-west-2.elb.amazonaws.com"), } fakeClient.targetGroups = []aws.TargetGroupMeta{ { TargetGroup: elbv2types.TargetGroup{ - TargetGroupName: pointer.StringPtr("canary-tg-abc123-name"), - TargetGroupArn: pointer.StringPtr("canary-tg-abc123-arn"), + TargetGroupName: pointer.StringPtr("canary-tg-abc123-name"), + TargetGroupArn: pointer.StringPtr("canary-tg-abc123-arn"), + TargetGroupFullName: pointer.StringPtr("canary-tg-abc123-fullname"), }, Weight: pointer.Int32Ptr(10), Tags: map[string]string{ @@ -599,8 +607,9 @@ func TestVerifyWeight(t *testing.T) { }, { TargetGroup: elbv2types.TargetGroup{ - TargetGroupName: pointer.StringPtr("stable-tg-abc123-name"), - TargetGroupArn: pointer.StringPtr("stable-tg-abc123-arn"), + TargetGroupName: pointer.StringPtr("stable-tg-abc123-name"), + TargetGroupArn: pointer.StringPtr("stable-tg-abc123-arn"), + TargetGroupFullName: pointer.StringPtr("stable-tg-abc123-fullname"), }, Weight: pointer.Int32Ptr(11), Tags: map[string]string{ @@ -720,15 +729,17 @@ func TestVerifyWeightWithAdditionalDestinations(t *testing.T) { var status v1alpha1.RolloutStatus r, fakeClient := newFakeReconciler(&status) fakeClient.loadBalancer = &elbv2types.LoadBalancer{ - LoadBalancerName: pointer.StringPtr("lb-abc123-name"), - LoadBalancerArn: pointer.StringPtr("lb-abc123-arn"), - DNSName: pointer.StringPtr("verify-weight-test-abc-123.us-west-2.elb.amazonaws.com"), + LoadBalancerName: pointer.StringPtr("lb-abc123-name"), + LoadBalancerArn: pointer.StringPtr("lb-abc123-arn"), + LoadBalancerFullName: pointer.StringPtr("lb-abc123-fullname"), + DNSName: pointer.StringPtr("verify-weight-test-abc-123.us-west-2.elb.amazonaws.com"), } fakeClient.targetGroups = []aws.TargetGroupMeta{ { TargetGroup: elbv2types.TargetGroup{ - TargetGroupName: pointer.StringPtr("canary-tg-abc123-name"), - TargetGroupArn: pointer.StringPtr("canary-tg-abc123-arn"), + TargetGroupName: pointer.StringPtr("canary-tg-abc123-name"), + TargetGroupArn: pointer.StringPtr("canary-tg-abc123-arn"), + TargetGroupFullName: pointer.StringPtr("canary-tg-abc123-fullname"), }, Weight: pointer.Int32Ptr(10), Tags: map[string]string{ @@ -737,8 +748,9 @@ func TestVerifyWeightWithAdditionalDestinations(t *testing.T) { }, { TargetGroup: elbv2types.TargetGroup{ - TargetGroupName: pointer.StringPtr("stable-tg-abc123-name"), - TargetGroupArn: pointer.StringPtr("stable-tg-abc123-arn"), + TargetGroupName: pointer.StringPtr("stable-tg-abc123-name"), + TargetGroupArn: pointer.StringPtr("stable-tg-abc123-arn"), + TargetGroupFullName: pointer.StringPtr("stable-tg-abc123-fullname"), }, Weight: pointer.Int32Ptr(90), Tags: map[string]string{ @@ -758,15 +770,17 @@ func TestVerifyWeightWithAdditionalDestinations(t *testing.T) { var status v1alpha1.RolloutStatus r, fakeClient := newFakeReconciler(&status) fakeClient.loadBalancer = &elbv2types.LoadBalancer{ - LoadBalancerName: pointer.StringPtr("lb-abc123-name"), - LoadBalancerArn: pointer.StringPtr("lb-abc123-arn"), - DNSName: pointer.StringPtr("verify-weight-test-abc-123.us-west-2.elb.amazonaws.com"), + LoadBalancerName: pointer.StringPtr("lb-abc123-name"), + LoadBalancerArn: pointer.StringPtr("lb-abc123-arn"), + LoadBalancerFullName: pointer.StringPtr("lb-abc123-fullname"), + DNSName: pointer.StringPtr("verify-weight-test-abc-123.us-west-2.elb.amazonaws.com"), } fakeClient.targetGroups = []aws.TargetGroupMeta{ { TargetGroup: elbv2types.TargetGroup{ - TargetGroupName: pointer.StringPtr("canary-tg-abc123-name"), - TargetGroupArn: pointer.StringPtr("canary-tg-abc123-arn"), + TargetGroupName: pointer.StringPtr("canary-tg-abc123-name"), + TargetGroupArn: pointer.StringPtr("canary-tg-abc123-arn"), + TargetGroupFullName: pointer.StringPtr("canary-tg-abc123-fullname"), }, Weight: pointer.Int32Ptr(10), Tags: map[string]string{ @@ -775,8 +789,9 @@ func TestVerifyWeightWithAdditionalDestinations(t *testing.T) { }, { TargetGroup: elbv2types.TargetGroup{ - TargetGroupName: pointer.StringPtr("ex-svc-1-tg-abc123-name"), - TargetGroupArn: pointer.StringPtr("ex-svc-1-tg-abc123-arn"), + TargetGroupName: pointer.StringPtr("ex-svc-1-tg-abc123-name"), + TargetGroupArn: pointer.StringPtr("ex-svc-1-tg-abc123-arn"), + TargetGroupFullName: pointer.StringPtr("ex-svc-1-tg-abc123-fullname"), }, Weight: pointer.Int32Ptr(100), Tags: map[string]string{ @@ -785,8 +800,9 @@ func TestVerifyWeightWithAdditionalDestinations(t *testing.T) { }, { TargetGroup: elbv2types.TargetGroup{ - TargetGroupName: pointer.StringPtr("ex-svc-2-tg-abc123-name"), - TargetGroupArn: pointer.StringPtr("ex-svc-2-tg-abc123-arn"), + TargetGroupName: pointer.StringPtr("ex-svc-2-tg-abc123-name"), + TargetGroupArn: pointer.StringPtr("ex-svc-2-tg-abc123-arn"), + TargetGroupFullName: pointer.StringPtr("ex-svc-2-tg-abc123-fullname"), }, Weight: pointer.Int32Ptr(100), Tags: map[string]string{ @@ -795,8 +811,9 @@ func TestVerifyWeightWithAdditionalDestinations(t *testing.T) { }, { TargetGroup: elbv2types.TargetGroup{ - TargetGroupName: pointer.StringPtr("stable-tg-abc123-name"), - TargetGroupArn: pointer.StringPtr("stable-tg-abc123-arn"), + TargetGroupName: pointer.StringPtr("stable-tg-abc123-name"), + TargetGroupArn: pointer.StringPtr("stable-tg-abc123-arn"), + TargetGroupFullName: pointer.StringPtr("stable-tg-abc123-fullname"), }, Weight: pointer.Int32Ptr(85), Tags: map[string]string{ @@ -816,15 +833,17 @@ func TestVerifyWeightWithAdditionalDestinations(t *testing.T) { var status v1alpha1.RolloutStatus r, fakeClient := newFakeReconciler(&status) fakeClient.loadBalancer = &elbv2types.LoadBalancer{ - LoadBalancerName: pointer.StringPtr("lb-abc123-name"), - LoadBalancerArn: pointer.StringPtr("lb-abc123-arn"), - DNSName: pointer.StringPtr("verify-weight-test-abc-123.us-west-2.elb.amazonaws.com"), + LoadBalancerName: pointer.StringPtr("lb-abc123-name"), + LoadBalancerArn: pointer.StringPtr("lb-abc123-arn"), + LoadBalancerFullName: pointer.StringPtr("lb-abc123-fullname"), + DNSName: pointer.StringPtr("verify-weight-test-abc-123.us-west-2.elb.amazonaws.com"), } fakeClient.targetGroups = []aws.TargetGroupMeta{ { TargetGroup: elbv2types.TargetGroup{ - TargetGroupName: pointer.StringPtr("canary-tg-abc123-name"), - TargetGroupArn: pointer.StringPtr("canary-tg-abc123-arn"), + TargetGroupName: pointer.StringPtr("canary-tg-abc123-name"), + TargetGroupArn: pointer.StringPtr("canary-tg-abc123-arn"), + TargetGroupFullName: pointer.StringPtr("canary-tg-abc123-fullname"), }, Weight: pointer.Int32Ptr(10), Tags: map[string]string{ @@ -833,8 +852,9 @@ func TestVerifyWeightWithAdditionalDestinations(t *testing.T) { }, { TargetGroup: elbv2types.TargetGroup{ - TargetGroupName: pointer.StringPtr("ex-svc-1-tg-abc123-name"), - TargetGroupArn: pointer.StringPtr("ex-svc-1-tg-abc123-arn"), + TargetGroupName: pointer.StringPtr("ex-svc-1-tg-abc123-name"), + TargetGroupArn: pointer.StringPtr("ex-svc-1-tg-abc123-arn"), + TargetGroupFullName: pointer.StringPtr("ex-svc-1-tg-abc123-fullname"), }, Weight: &weightDestinations[0].Weight, Tags: map[string]string{ @@ -843,8 +863,9 @@ func TestVerifyWeightWithAdditionalDestinations(t *testing.T) { }, { TargetGroup: elbv2types.TargetGroup{ - TargetGroupName: pointer.StringPtr("ex-svc-2-tg-abc123-name"), - TargetGroupArn: pointer.StringPtr("ex-svc-2-tg-abc123-arn"), + TargetGroupName: pointer.StringPtr("ex-svc-2-tg-abc123-name"), + TargetGroupArn: pointer.StringPtr("ex-svc-2-tg-abc123-arn"), + TargetGroupFullName: pointer.StringPtr("ex-svc-2-tg-abc123-fullname"), }, Weight: &weightDestinations[1].Weight, Tags: map[string]string{ @@ -853,8 +874,9 @@ func TestVerifyWeightWithAdditionalDestinations(t *testing.T) { }, { TargetGroup: elbv2types.TargetGroup{ - TargetGroupName: pointer.StringPtr("stable-tg-abc123-name"), - TargetGroupArn: pointer.StringPtr("stable-tg-abc123-arn"), + TargetGroupName: pointer.StringPtr("stable-tg-abc123-name"), + TargetGroupArn: pointer.StringPtr("stable-tg-abc123-arn"), + TargetGroupFullName: pointer.StringPtr("stable-tg-abc123-fullname"), }, Weight: pointer.Int32Ptr(85), Tags: map[string]string{