Skip to content
Contour is a Kubernetes ingress controller using Lyft's Envoy proxy.
Go CSS HTML JavaScript Ruby Makefile Other
Branch: master
Clone or download
davecheney internal/dag: refactor Route to hold Conditions
Add support to dag.Route to hold an ordered list of Conditions.

- dag.Condition is kind of a goofy interface, but will suffice for now
- dag.PrefixRoute/RegexRoute have gone away, this leaves the Route type
to stand alone
- dag.PrefixCondition/RegexCondition replace the previous
PrefixRoute/RegexRoute types.
- Rework dag.Build for condition support
- Rework contour.RouteVisitor for the simple Condition lists that
dag.Builder crates -- one Condition per Route is effectively hard coded.
- There is no support for HeaderConditions yet.

Signed-off-by: Dave Cheney <dave@cheney.net>
Latest commit 1ca3a1f Sep 19, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Add comment to make clear these are not regexes Sep 6, 2019
_integration all: rename heptio-contour namespace projectcontour Sep 17, 2019
apis api: rework HeaderCondition type Sep 19, 2019
cmd/contour Remove all references to CLF, use Envoy's default instead. Sep 18, 2019
design Remove all references to CLF, use Envoy's default instead. Sep 18, 2019
docs Update upgrading guide with more 1.0.0-beta1 info Sep 19, 2019
examples Remove all references to CLF, use Envoy's default instead. Sep 18, 2019
hack go.mod: upgrade k8s.io/code-generator to 1.15.4 Sep 19, 2019
internal internal/dag: refactor Route to hold Conditions Sep 19, 2019
site site: add repository move blog post Sep 17, 2019
.dockerignore Gopkg.toml: freshen depdenencies Nov 5, 2018
.gitignore Dockerfile: upgrade to Go 1.13 Sep 5, 2019
.travis.yml Dockerfile: upgrade to Go 1.13 Sep 5, 2019
.yamllint Makefile: add yamllint target Sep 19, 2019
CODE_OF_CONDUCT.md All: remove Heptio branding Feb 4, 2019
CONTRIBUTING.md all: github.com/heptio -> github.com/projectcontour Sep 15, 2019
Dockerfile all: github.com/heptio -> github.com/projectcontour Sep 15, 2019
FAQ.md All: remove Heptio branding Feb 4, 2019
LICENSE Add LICENSE Oct 31, 2017
Makefile Makefile: add yamllint target Sep 19, 2019
README.md all: rename heptio-contour namespace projectcontour Sep 17, 2019
contour.png Add new contour logo Feb 25, 2019
go.mod go.mod: upgrade k8s.io/code-generator to 1.15.4 Sep 19, 2019
go.sum go.mod: upgrade k8s.io/code-generator to 1.15.4 Sep 19, 2019
netlify.toml make requested PR changes Jul 1, 2019
tools.go tools.go: gofmt Sep 15, 2019

README.md

Contour Build Status Go Report Card GitHub release License

Contour is fun at parties!

Overview

Contour is an Ingress controller for Kubernetes that works by deploying the Envoy proxy as a reverse proxy and load balancer. Contour supports dynamic configuration updates out of the box while maintaining a lightweight profile.

Contour also introduces a new ingress API (IngressRoute) which is implemented via a Custom Resource Definition (CRD). Its goal is to expand upon the functionality of the Ingress API to allow for a richer user experience as well as solve shortcomings in the original design.

Prerequisites

Contour is tested with Kubernetes clusters running version 1.10 and later, but should work with earlier versions where Custom Resource Definitions are supported (Kubernetes 1.7+).

RBAC must be enabled on your cluster.

Get started

You can try out Contour by creating a deployment from a hosted manifest -- no clone or local install necessary.

What you do need:

  • A Kubernetes cluster that supports Service objects of type: LoadBalancer (AWS Quickstart cluster or Minikube, for example)
  • kubectl configured with admin access to your cluster

See the deployment documentation for more deployment options if you don't meet these requirements.

Add Contour to your cluster

Run:

kubectl apply -f https://projectcontour.io/quickstart/contour.yaml

This command creates:

  • A new namespace projectcontour with two instances of Contour in the namespace
  • A Service of type: LoadBalancer that points to the Contour instances
  • Depending on your configuration, new cloud resources -- for example, ELBs in AWS

See also TLS support for details on configuring TLS support for the services behind Contour.

For information on configuring TLS for gRPC between Contour and Envoy, see grpc-tls-howto.md

Example workload

If you don't have an application ready to run with Contour, you can explore with kuard.

Run:

kubectl apply -f https://projectcontour.io/examples/kuard.yaml

This example specifies a default backend for all hosts, so that you can test your Contour install. It's recommended for exploration and testing only, however, because it responds to all requests regardless of the incoming DNS that is mapped. You probably want to run with specific Ingress rules for specific hostnames.

Access your cluster

Now you can retrieve the external address of Contour's load balancer:

$ kubectl get -n projectcontour service contour -o wide
NAME      CLUSTER-IP     EXTERNAL-IP                                                                    PORT(S)        AGE       SELECTOR
contour   10.106.53.14   a47761ccbb9ce11e7b27f023b7e83d33-2036788482.ap-southeast-2.elb.amazonaws.com   80:30274/TCP   3h        app=contour

Configuring DNS

How you configure DNS depends on your platform:

  • On AWS, create a CNAME record that maps the host in your Ingress object to the ELB address.
  • If you have an IP address instead (on GCE, for example), create an A record.

More information and documentation

For more deployment options, including uninstalling Contour, see the deployment documentation.

See also the Kubernetes documentation for Services, Ingress, and IngressRoutes.

The detailed documentation provides additional information, including an introduction to Envoy and an explanation of how Contour maps key Envoy concepts to Kubernetes.

We've also got an FAQ for short-answer questions and conceptual stuff that doesn't quite belong in the docs.

Troubleshooting

If you encounter issues, review the troubleshooting docs, file an issue, or talk to us on the #contour channel on the Kubernetes Slack server.

Contributing

Thanks for taking the time to join our community and start contributing!

  • Please familiarize yourself with the Code of Conduct before contributing.
  • See CONTRIBUTING.md for information about setting up your environment, the workflow that we expect, and instructions on the developer certificate of origin that we require.
  • Check out the open issues.

Changelog

See the list of releases to find out about feature changes.

You can’t perform that action at this time.