This repository has been archived by the owner on Feb 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #184 from heptio/beta1-docs
Docs refresh for Contour 0.6-beta.1. Fixes #171
- Loading branch information
Showing
4 changed files
with
43 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,50 @@ | ||
# Route Specification | ||
|
||
The core of Gimbal is Routes, which allow traffic into one or more applications. This section will discuss how to utilize Kubernetes `Ingress` objects to create these routes. | ||
The core of Gimbal is IngressRoutes, which allow traffic to be routed into one or more applications. This section will discuss how to utilize [Contour IngressRoute](https://github.com/heptio/contour/blob/master/docs/ingressroute.md) objects to create these definitions. | ||
|
||
Before beginning it is important to understand how service discovery functions within Gimbal. The Discoverer components should be deployed per upstream cluster. Once synchronized, services will show up in your team namespace with the cluster name appended. | ||
|
||
For example, if a Kubernetes cluster is being discovered and there was a service named `s1` which existed in the namespace `team1`, in the cluster `node02`, once synchronized the service in the Gimbal cluster would be named `s1-node02`. | ||
For example, if a Kubernetes cluster is being discovered and there was a service named `s1` which existed in the namespace `team1`, in the cluster `cluster1`, once synchronized, the service in the Gimbal cluster would be named `cluster1-s1` and it would be in the `team1` namespace. | ||
|
||
## Basic Route | ||
|
||
Following is a basic route which routes any request to `foo.bar.com` and proxies to a service named `s1` on the remote cluster `node02` over port `80`. | ||
Following is a basic IngressRoute which routes any request to `foo.bar.com` and proxies to a service named `s1` on the remote cluster `node02` over port `80`. | ||
|
||
```sh | ||
apiVersion: extensions/v1beta1 | ||
kind: Ingress | ||
apiVersion: contour.heptio.com/v1beta1 | ||
kind: IngressRoute | ||
metadata: | ||
name: test | ||
spec: | ||
rules: | ||
- host: foo.bar.com | ||
http: | ||
paths: | ||
- backend: | ||
serviceName: s1-node02 | ||
servicePort: 80 | ||
virtualhost: | ||
fqdn: foo.bar.com | ||
routes: | ||
- match: / | ||
services: | ||
- name: cluster1-service1 | ||
port: 80 | ||
``` | ||
|
||
## IngressRoute Features | ||
|
||
The IngressRoute API provides a number of [enhancements](https://github.com/heptio/contour/blob/master/docs/ingressroute.md#key-ingressroute-benefits) over Kubernetes Ingress: | ||
|
||
* Weight shifting | ||
* Multiple services per route | ||
* Load balancing strategies | ||
* Multi-team support | ||
|
||
## IngressRoute Delegation | ||
|
||
Gimbal's multi-team support is enabled through Contour's [IngressRoute Delegation](https://github.com/heptio/contour/blob/master/docs/ingressroute.md#ingressroute-delegation). | ||
|
||
### Restricted root namespaces | ||
|
||
Contour has an [enforcing mode](https://github.com/heptio/contour/blob/master/docs/ingressroute.md#restricted-root-namespaces) which accepts a list of namespaces where root IngressRoutes are valid. | ||
Only users permitted to operate in those namespaces can therefore create IngressRoutes with the `virtualhost` field. | ||
|
||
This restricted mode is enabled in Contour by specifying a command line flag, `--ingressroute-root-namespaces`, which will restrict Contour to only searching the defined namespaces for root IngressRoutes. | ||
|
||
## Additional Information | ||
|
||
More information regarding Ingress can be found here: [https://kubernetes.io/docs/concepts/services-networking/ingress/](https://kubernetes.io/docs/concepts/services-networking/ingress/) | ||
More information regarding IngressRoutes can be found in the [Contour Documentation](https://github.com/heptio/contour/blob/master/docs/ingressroute.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters