Skip to content

Commit 40aaad2

Browse files
committed
Add support for custom ALB subnets
Signed-off-by: Manuel Alejandro de Brito Fontes <[email protected]>
1 parent ae5f251 commit 40aaad2

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

.env.example

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,8 @@ IMAGE_PULL_SECRET=
2828
# https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.2/guide/ingress/annotations/#scheme
2929
# https://docs.aws.amazon.com/elasticloadbalancing/latest/userguide/how-elastic-load-balancing-works.html#load-balancer-scheme
3030
USE_INTERNAL_ALB=false
31+
32+
# Configure custom Availability Zone/s that ALB will route traffic to.
33+
# https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.2/guide/ingress/annotations/#subnets
34+
# Default: use auto discovery (empty)
35+
ALB_SUBNETS=

lib/gitpod.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,10 @@ export class GitpodStack extends cdk.Stack {
9393
manifest.metadata.annotations["alb.ingress.kubernetes.io/scheme"] = 'internet-facing';
9494
}
9595

96+
if (process.env.ALB_SUBNETS) {
97+
manifest.metadata.annotations["alb.ingress.kubernetes.io/subnets"] = `${process.env.ALB_SUBNETS}`;
98+
}
99+
96100
const gitpodIngress = new KubernetesManifest(this, "gitpod-ingress", {
97101
cluster,
98102
overwrite: true,

0 commit comments

Comments
 (0)