@kubernetes-models/gateway-api
TypeScript icon, indicating that this package has built-in type declarations

0.7.2 • Public • Published

@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

Dependencies (4)

Dev Dependencies (3)

Package Sidebar

Install

npm i @kubernetes-models/gateway-api

Weekly Downloads

553

Version

0.7.2

License

MIT

Unpacked Size

2.39 MB

Total Files

116

Last publish

Collaborators

  • tommy351