-
-
Save LukeOman/23bd09eda749f84ff6937ad9d67956a1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Declare ALB Ingress Controller with helm | |
const alb_controller = new k8s.helm.v3.Release( | |
"alb-controller", | |
{ | |
chart: "aws-load-balancer-controller", | |
repositoryOpts: { | |
repo: "https://aws.github.io/eks-charts", | |
}, | |
namespace: "kube-system", | |
// transformations: [remove_status], | |
values: { | |
serviceAccount: { | |
name: lbSaName, | |
create: false | |
}, | |
clusterName: clusterName, // pulumi_stack_info['name'], | |
createIngressClassResource: false, // was true | |
enableCertManager: false, // todo | |
autoDiscoverAwsRegion: "true", | |
vpcId: vpc.id, | |
ingressClassParams: { | |
name: "alb-ingress-class-params" | |
} | |
}, | |
}, { provider: k8sProvider }); | |
//Create ingress for application | |
const ingress = new k8s.networking.v1.Ingress("api-ingress", { | |
metadata: { | |
name: "api-ingress", | |
namespace: environment, | |
annotations: { | |
"alb.ingress.kubernetes.io/scheme": "internet-facing", | |
"alb.ingress.kubernetes.io/target-type": "ip", | |
"alb.ingress.kubernetes.io/listen-ports": "[{\"HTTPS\":443}]", | |
"alb.ingress.kubernetes.io/certificate-arn": "<certificate-arn-redacted>", | |
"alb.ingress.kubernetes.io/ssl-policy": "ELBSecurityPolicy-2016-08", | |
"kubernetes.io/ingress.class": "alb" | |
} | |
}, | |
spec: { | |
// ingressClassName: "alb", | |
rules: [{ | |
// host: "api.getplunk.com", | |
http: { | |
paths: [{ | |
path: "/wox", | |
pathType: "Prefix", | |
backend: { | |
service: { | |
name: appService.metadata.name, | |
port: { | |
number: 80 | |
} | |
} | |
} | |
}] | |
} | |
}] | |
} | |
}, { provider: k8sProvider, dependsOn: alb_controller }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment