Skip to content

Instantly share code, notes, and snippets.

@noctifer20
Last active April 25, 2021 06:52
Show Gist options
  • Save noctifer20/6932b022e912f1b0fad18a118a323423 to your computer and use it in GitHub Desktop.
Save noctifer20/6932b022e912f1b0fad18a118a323423 to your computer and use it in GitHub Desktop.
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