@kubernetes-models/gateway-api
v0.7.2
Published
Gateway API models
Downloads
2,211
Maintainers
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