Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
);
// Create a Service for the kuard Deployment
const service = new k8s.core.v1.Service(name,
{
metadata: {labels: labels, namespace: config.appsNamespaceName},
spec: {ports: [{ port: 8080, targetPort: "http" }], selector: labels},
},
{provider: provider}
);
// Export the Service name and public LoadBalancer endpoint
export const serviceName = service.metadata.name;
// Create the kuard Ingress
const ingress = new k8s.extensions.v1beta1.Ingress(name,
{
metadata: {
labels: labels,
namespace: config.appsNamespaceName,
annotations: {"kubernetes.io/ingress.class": "nginx"},
},
spec: {
rules: [
{
host: "apps.example.com",
http: {
paths: [
{
path: "/",
backend: {
serviceName: serviceName,
export function createIngress(
name: string,
args: EchoserverIngressArgs,
): k8s.extensions.v1beta1.Ingress {
// TODO(metral): change to k8s.networking.v1beta.Ingress
// when EKS supports >= 1.14.
return new k8s.extensions.v1beta1.Ingress(
name,
{
metadata: {
labels: args.labels,
namespace: args.namespace,
annotations: {
"kubernetes.io/ingress.class": args.ingressClass,
},
},
spec: {
rules: [
{
host: "apps.example.com",
http: {
paths: [
{