Skip to content

Latest commit

 

History

History

traefik

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

@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