Skip to content

Latest commit

 

History

History

contour

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

@kubernetes-models/contour

Contour models.

Installation

Install with npm.

npm install @kubernetes-models/contour

Usage

import { HTTPProxy } from "@kubernetes-models/contour/projectcontour.io/v1";

// Create a new HTTP proxy
const route = new HTTPProxy({
  metadata: {
    name: "foo"
  },
  spec: {
    virtualhost: {
      fqdn: "foo.example.com"
    },
    routes: [
      {
        conditions: [
          {
            prefix: "/"
          }
        ],
        services: [
          {
            name: "foo",
            port: 80
          }
        ]
      }
    ]
  }
});

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

License

MIT