0.1.0 • Published 1 month ago

@kubernetes-models/traefik v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month ago

@kubernetes-models/traefik

Traefik models.

Installation

Install with npm.

npm install @kubernetes-models/traefik

Usage

import { IngressRoute } from "@kubernetes-models/traefik/traefik.containo.us/v1alpha1/IngressRoute";

// Create a new IngressRoute
const ingressRoute = new IngressRoute({
  metadata: {
    name: "test"
  },
  spec: {
    entryPoints: ["web"],
    routes: [
      {
        match: "Host(`example.com`)",
        kind: "Rule",
        services: [
          {
            name: "test",
            port: 80
          }
        ]
      }
    ]
  }
});

// Validate against JSON schema
ingressRoute.validate();

License

MIT