Skip to content

Commit

Permalink
docs(trafficrouting): add .ServicePorts usage and examples to Traffic…
Browse files Browse the repository at this point in the history
…Routing.ALB docs

Signed-off-by: Armen Shakhbazian <armen.shakhbazian@gmail.com>
  • Loading branch information
ArenSH committed May 6, 2024
1 parent ecb0897 commit bba756a
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 5 deletions.
15 changes: 11 additions & 4 deletions docs/features/traffic-management/alb.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,20 +49,27 @@ spec:
alb:
# The referenced ingress will be injected with a custom action annotation, directing
# the AWS Load Balancer Controller to split traffic between the canary and stable
# Service, according to the desired traffic weight (required).
# Service, according to the desired traffic weight.
ingress: ingress
# If you want to controll multiple ingress resources you can use the ingresses field, if ingresses is specified
# If you want to control 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
# Service port is the port which the Service listens on (required).
# Service port is the port which the Service listens on.
servicePort: 443
# ServicePorts specify list of ports for given ingress. If no ports are listed for ingress
# under .servicePorts - it will fall back to .servicePort value as default
servicePorts:
- ingress: ingress-1
servicePorts: [80, 443]
```

To avoid confusion with ingress/ingresses and servicePort/servicePorts fields use either `ingress` + `servicePort` only if you have a single ingress with a single port. In all other cases use `ingresses` + `servicePorts`.

The referenced Ingress should be deployed with an ingress rule that matches the Rollout service:

```yaml
Expand Down Expand Up @@ -442,4 +449,4 @@ controller should operate on multiple values. This may be desired when a cluster
Ingress controllers that operate on different `kubernetes.io/ingress.class` or `spec.ingressClassName` values.

If the controller needs to operate on any Ingress without the `kubernetes.io/ingress.class`
annotation or `spec.ingressClassName`, the flag can be specified with an empty string (e.g. `--alb-ingress-classes ''`).
annotation or `spec.ingressClassName`, the flag can be specified with an empty string (e.g. `--alb-ingress-classes ''`).
22 changes: 21 additions & 1 deletion docs/getting-started/alb/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,31 @@ spec:
# Reference to a Service that the Ingress must target in one of the rules (optional).
# If omitted, uses canary.stableService.
rootService: rollouts-demo-root
# Service port is the port which the Service listens on (required).
# Service port is the port which the Service listens on.
servicePort: 443
...
```

If you need to manage more than one ingress or an ingress with multiple ports, you can use `ingresses` and `servicePorts` fields:

```yaml
...
trafficRouting:
alb:
ingresses:
- rollouts-demo-ingress
- some-other-ingress
# Reference to a Service that the Ingress must target in one of the rules (optional).
# If omitted, uses canary.stableService.
servicePorts:
- ingress: rollouts-demo-ingress
servicePorts: [443]
- ingress: some-other-ingress
servicePorts: [80, 443]
...
```


The Ingress referenced by the Rollout must have a rule which matches one of Rollout services.
This should be `canary.trafficRouting.alb.rootService` (if specified), otherwise the rollout will
use `canary.stableService`.
Expand Down

0 comments on commit bba756a

Please sign in to comment.