Last active
April 25, 2021 06:52
-
-
Save noctifer20/6932b022e912f1b0fad18a118a323423 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
import { PingMicroserviceConfig } from "@app/ping"; | |
import * as k8s from "@pulumi/kubernetes"; | |
import * as kx from "@pulumi/kubernetesx"; | |
import { Output } from "@pulumi/pulumi"; | |
const appLables = { | |
namespace: PingMicroserviceConfig.name + "-ing" | |
} | |
const deployment = new k8s.networking.v1.Ingress(appLables.namespace, { | |
metadata: { | |
labels: {app: 'nginx'}, | |
namespace: appLables.namespace, | |
annotations: {"kubernetes.io/ingress.class": "nginx"}, | |
}, | |
spec: { | |
rules: [ | |
{ | |
host: "ping.noctifer20.me", | |
http: { | |
paths: [ | |
{ | |
path: "/", | |
backend: { | |
service: { | |
name: PingMicroserviceConfig.serviceName, | |
port: { | |
name: 'http', | |
number: 80 | |
}, | |
} | |
} | |
}, | |
], | |
}, | |
} | |
] | |
} | |
}); | |
export const name: Output<string> = deployment.metadata.name; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment