@soft-stech/gateway-api
v0.5.0
Published
Gateway API models
Downloads
4
Readme
@kubernetes-models/gateway-api
Gateway API models.
Installation
Install with npm.
npm install @kubernetes-models/gateway-api
Usage
import { HTTPRoute } from "@kubernetes-models/gateway-api/gateway.networking.k8s.io/v1/HTTPRoute";
// Create a new HTTPRoute
const route = new HTTPRoute({
metadata: {
name: "http-route"
},
spec: {
parentRefs: [
{
kind: "Gateway",
name: "foo-gateway"
}
],
rules: [
{
backendRefs: [{ name: "foo-svc", port: 8080 }]
}
]
}
});
// Validate against JSON schema
route.validate();
License
MIT