Skip to content

Commit

Permalink
feat: Support Multiple ALB Ingresses (#2639)
Browse files Browse the repository at this point in the history
* Support Multi ALB Ingress

Signed-off-by: n888 <[email protected]>

* Fix comments and alb_test ARNs

Signed-off-by: n888 <[email protected]>

* Fix e2e alb-canary-rollout: rm wildcard ingress path for alb controller

Signed-off-by: n888 <[email protected]>

* Add e2e TestALBCanaryUpdateMultiIngress

Signed-off-by: n888 <[email protected]>

* Add e2e TestALBCanaryUpdateMultiIngress

Signed-off-by: n888 <[email protected]>

* e2e alb-canary-rollout use ImplementationSpecific wildcard path

Signed-off-by: n888 <[email protected]>

* add e2e TestALBPingPongUpdateMultiIngress

Signed-off-by: n888 <[email protected]>

* add e2e TestALBExperimentStepMultiIngress, TestALBExperimentStepNoSetWeightMultiIngress

Signed-off-by: n888 <[email protected]>

* e2e alb headerroute: fix existing ing.class and simplify alb annotations

Signed-off-by: n888 <[email protected]>

* add e2e TestAlbHeaderRouteMultiIngress

Signed-off-by: n888 <[email protected]>

* fix lint alb_test.go

Signed-off-by: n888 <[email protected]>

* update codegen

Signed-off-by: n888 <[email protected]>

* TestAlbHeaderRouteMultiIngress use unique multi ingress resource names

Signed-off-by: n888 <[email protected]>

* Initial Status.ALBs support

Signed-off-by: n888 <[email protected]>

* clean up comments

Signed-off-by: n888 <[email protected]>

* codegen

Signed-off-by: n888 <[email protected]>

* only set ingress field for status.albs, and not status.alb

Signed-off-by: n888 <[email protected]>

* add status.alb.ingress, but keep as optional

Signed-off-by: n888 <[email protected]>

* improve determining whether to update status.albs or status.alb

Signed-off-by: n888 <[email protected]>

* codegen

Signed-off-by: n888 <[email protected]>

* codegen

Signed-off-by: n888 <[email protected]>

* update both ALB and ALBs status

Signed-off-by: Tung Huynh <[email protected]>

* fix ALBs status does not update when number of ingresses changes

Signed-off-by: Tung Huynh <[email protected]>

* update tests

Signed-off-by: Tung Huynh <[email protected]>

* add a little docs

Signed-off-by: zachaller <[email protected]>

* github trigger re-run

Signed-off-by: zachaller <[email protected]>

---------

Signed-off-by: n888 <[email protected]>
Signed-off-by: Tung Huynh <[email protected]>
Signed-off-by: zachaller <[email protected]>
Co-authored-by: Tung Huynh <[email protected]>
Co-authored-by: zachaller <[email protected]>
  • Loading branch information
3 people authored Jul 18, 2023
1 parent 8db151f commit 20e00e4
Show file tree
Hide file tree
Showing 28 changed files with 3,567 additions and 827 deletions.
5 changes: 5 additions & 0 deletions docs/features/traffic-management/alb.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ spec:
# the AWS Load Balancer Controller to split traffic between the canary and stable
# Service, according to the desired traffic weight (required).
ingress: ingress
# If you want to controll multiple ingress resources you can use the ingresses field, if ingresses is specified
# the ingress field will need to be omitted.
ingresses:
- ingress-1
- ingress-2
# Reference to a Service that the Ingress must target in one of the rules (optional).
# If omitted, uses canary.stableService.
rootService: root-service
Expand Down
50 changes: 49 additions & 1 deletion manifests/crds/rollout-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -732,6 +732,10 @@ spec:
type: string
ingress:
type: string
ingresses:
items:
type: string
type: array
rootService:
type: string
servicePort:
Expand All @@ -749,7 +753,6 @@ spec:
- enabled
type: object
required:
- ingress
- servicePort
type: object
ambassador:
Expand Down Expand Up @@ -3320,6 +3323,8 @@ spec:
- arn
- name
type: object
ingress:
type: string
loadBalancer:
properties:
arn:
Expand All @@ -3345,6 +3350,49 @@ spec:
- name
type: object
type: object
albs:
items:
properties:
canaryTargetGroup:
properties:
arn:
type: string
fullName:
type: string
name:
type: string
required:
- arn
- name
type: object
ingress:
type: string
loadBalancer:
properties:
arn:
type: string
fullName:
type: string
name:
type: string
required:
- arn
- name
type: object
stableTargetGroup:
properties:
arn:
type: string
fullName:
type: string
name:
type: string
required:
- arn
- name
type: object
type: object
type: array
availableReplicas:
format: int32
type: integer
Expand Down
50 changes: 49 additions & 1 deletion manifests/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12002,6 +12002,10 @@ spec:
type: string
ingress:
type: string
ingresses:
items:
type: string
type: array
rootService:
type: string
servicePort:
Expand All @@ -12019,7 +12023,6 @@ spec:
- enabled
type: object
required:
- ingress
- servicePort
type: object
ambassador:
Expand Down Expand Up @@ -14590,6 +14593,8 @@ spec:
- arn
- name
type: object
ingress:
type: string
loadBalancer:
properties:
arn:
Expand All @@ -14615,6 +14620,49 @@ spec:
- name
type: object
type: object
albs:
items:
properties:
canaryTargetGroup:
properties:
arn:
type: string
fullName:
type: string
name:
type: string
required:
- arn
- name
type: object
ingress:
type: string
loadBalancer:
properties:
arn:
type: string
fullName:
type: string
name:
type: string
required:
- arn
- name
type: object
stableTargetGroup:
properties:
arn:
type: string
fullName:
type: string
name:
type: string
required:
- arn
- name
type: object
type: object
type: array
availableReplicas:
format: int32
type: integer
Expand Down
25 changes: 21 additions & 4 deletions pkg/apiclient/rollout/rollout.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,9 @@
},
"stableTargetGroup": {
"$ref": "#/definitions/github.com.argoproj.argo_rollouts.pkg.apis.rollouts.v1alpha1.AwsResourceRef"
},
"ingress": {
"type": "string"
}
}
},
Expand All @@ -526,13 +529,20 @@
"type": "string",
"title": "RootService references the service in the ingress to the controller should add the action to"
},
"stickinessConfig": {
"$ref": "#/definitions/github.com.argoproj.argo_rollouts.pkg.apis.rollouts.v1alpha1.StickinessConfig",
"title": "AdditionalForwardConfig allows to specify further settings on the ForwaredConfig\n+optional"
},
"annotationPrefix": {
"type": "string",
"title": "AnnotationPrefix has to match the configured annotation prefix on the alb ingress controller\n+optional"
},
"stickinessConfig": {
"$ref": "#/definitions/github.com.argoproj.argo_rollouts.pkg.apis.rollouts.v1alpha1.StickinessConfig",
"title": "StickinessConfig refers to the duration-based stickiness of the target groups associated with an `Ingress`\n+optional"
},
"ingresses": {
"type": "array",
"items": {
"type": "string"
},
"title": "Ingresses refers to the name of an `Ingress` resource in the same namespace as the `Rollout` in a multi ingress scenario\n+optional"
}
},
"title": "ALBTrafficRouting configuration for ALB ingress controller to control traffic routing"
Expand Down Expand Up @@ -1600,6 +1610,13 @@
"alb": {
"$ref": "#/definitions/github.com.argoproj.argo_rollouts.pkg.apis.rollouts.v1alpha1.ALBStatus",
"title": "/ ALB keeps information regarding the ALB and TargetGroups"
},
"albs": {
"type": "array",
"items": {
"$ref": "#/definitions/github.com.argoproj.argo_rollouts.pkg.apis.rollouts.v1alpha1.ALBStatus"
},
"title": "/ ALBs keeps information regarding multiple ALBs and TargetGroups in a multi ingress scenario"
}
},
"title": "RolloutStatus is the status for a Rollout resource"
Expand Down
3 changes: 3 additions & 0 deletions pkg/apis/api-rules/violation_exceptions.list
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
API rule violation: list_type_missing,github.com/argoproj/argo-rollouts/pkg/apis/rollouts/v1alpha1,ALBTrafficRouting,Ingresses
API rule violation: list_type_missing,github.com/argoproj/argo-rollouts/pkg/apis/rollouts/v1alpha1,AmbassadorTrafficRouting,Mappings
API rule violation: list_type_missing,github.com/argoproj/argo-rollouts/pkg/apis/rollouts/v1alpha1,AnalysisRunSpec,Args
API rule violation: list_type_missing,github.com/argoproj/argo-rollouts/pkg/apis/rollouts/v1alpha1,AnalysisRunSpec,DryRun
Expand Down Expand Up @@ -35,6 +36,7 @@ API rule violation: list_type_missing,github.com/argoproj/argo-rollouts/pkg/apis
API rule violation: list_type_missing,github.com/argoproj/argo-rollouts/pkg/apis/rollouts/v1alpha1,RolloutExperimentStep,Analyses
API rule violation: list_type_missing,github.com/argoproj/argo-rollouts/pkg/apis/rollouts/v1alpha1,RolloutExperimentStep,Templates
API rule violation: list_type_missing,github.com/argoproj/argo-rollouts/pkg/apis/rollouts/v1alpha1,RolloutExperimentStepAnalysisTemplateRef,Args
API rule violation: list_type_missing,github.com/argoproj/argo-rollouts/pkg/apis/rollouts/v1alpha1,RolloutStatus,ALBs
API rule violation: list_type_missing,github.com/argoproj/argo-rollouts/pkg/apis/rollouts/v1alpha1,RolloutStatus,Conditions
API rule violation: list_type_missing,github.com/argoproj/argo-rollouts/pkg/apis/rollouts/v1alpha1,RolloutStatus,PauseConditions
API rule violation: list_type_missing,github.com/argoproj/argo-rollouts/pkg/apis/rollouts/v1alpha1,RolloutTrafficRouting,ManagedRoutes
Expand All @@ -44,5 +46,6 @@ API rule violation: list_type_missing,github.com/argoproj/argo-rollouts/pkg/apis
API rule violation: list_type_missing,github.com/argoproj/argo-rollouts/pkg/apis/rollouts/v1alpha1,TrafficWeights,Additional
API rule violation: list_type_missing,github.com/argoproj/argo-rollouts/pkg/apis/rollouts/v1alpha1,WebMetric,Headers
API rule violation: names_match,github.com/argoproj/argo-rollouts/pkg/apis/rollouts/v1alpha1,MetricProvider,SkyWalking
API rule violation: names_match,github.com/argoproj/argo-rollouts/pkg/apis/rollouts/v1alpha1,RolloutStatus,ALBs
API rule violation: names_match,github.com/argoproj/argo-rollouts/pkg/apis/rollouts/v1alpha1,RolloutStatus,HPAReplicas
API rule violation: names_match,github.com/argoproj/argo-rollouts/pkg/apis/rollouts/v1alpha1,Sigv4Config,RoleARN
Loading

0 comments on commit 20e00e4

Please sign in to comment.