Documentation for version v1.10.0 is no longer actively maintained. The version you are currently viewing is a static snapshot. For up-to-date documentation, see the latest version.
A configuration file can be passed to the
--config-path argument of the
contour serve command to specify additional configuration to Contour.
In most deployments, this file is passed to Contour via a ConfigMap which is mounted as a volume to the Contour pod.
The Contour configuration file is optional. In its absence, Contour will operate with reasonable defaults. Where Contour settings can also be specified with command-line flags, the command-line value takes precedence over the configuration file.
||This key sets the global access log format for Envoy. Valid options are
||Enables debug logging.|
||This array specifies the HTTP versions that Contour should program Envoy to serve. HTTP versions are specified as strings of the form “HTTP/x”, where “x” represents the version number.|
||If this field is true, Contour will ignore
||This sets the service name that will be inspected for address details to be applied to Ingress objects.|
||This sets the namespace of the service that will be inspected for address details to be applied to Ingress objects. If the
|ingress-status-address||string||None||If present, this specifies the address that will be copied into the Ingress status for each Ingress that Contour manages. It is exclusive with
||This field specifies that Contour is running in a Kubernetes cluster and should use the in-cluster client access configuration.|
|json-fields||string array||fields||This is the list the field names to include in the JSON access log format.|
||Path to a Kubernetes kubeconfig file for when Contour is executed outside a cluster.|
|leaderelection||leaderelection||The leader election configuration.|
|tls||TLS||The default TLS configuration.|
|timeouts||TimeoutConfig||The timeout configuration.|
|cluster||ClusterConfig||The cluster configuration.|
|server||ServerConfig||The server configuration for
The TLS configuration block can be used to configure default values for how Contour should provision TLS hosts.
||This field specifies the minimum TLS protocol version that is allowed. Valid options are
|fallback-certificate||Fallback certificate configuration.|
|envoy-client-certificate||Client certificate configuration for Envoy.|
||This field specifies the name of the Kubernetes secret to use as the fallback certificate.|
||This field specifies the namespace of the Kubernetes secret to use as the fallback certificate.|
||This field specifies the name of the Kubernetes secret to use as the client certificate and private key when establishing TLS connections to the backend service.|
||This field specifies the namespace of the Kubernetes secret to use as the client certificate and private key when establishing TLS connections to the backend service.|
The leader election configuration block configures how a deployment with more than one Contour pod elects a leader.
The Contour leader is responsible for updating the status field on Ingress and HTTPProxy documents.
In the vast majority of deployments, only the
configmap-namespace fields should require any configuration.
||The name of the ConfigMap that Contour leader election will lease.|
||The namespace of the ConfigMap that Contour leader election will lease. If the
||The duration of the leadership lease.|
||The length of time that the leader will retry refreshing leadership before giving up.|
||The interval at which Contour will attempt to the acquire leadership lease.|
The timeout configuration block can be used to configure various timeouts for the proxies. All fields are optional; Contour/Envoy defaults apply if a field is not specified.
|request-timeout||string||none*||This field specifies the default request timeout. Note that this is a timeout for the entire request, not an idle timeout. Must be a valid Go duration string, or omitted or set to
Note: A value of
||This field defines how long the proxy should wait while there are no active requests (for HTTP/1.1) or streams (for HTTP/2) before terminating an HTTP connection. Must be a valid Go duration string, or
||This field defines how long the proxy should wait while there is no request activity (for HTTP/1.1) or stream activity (for HTTP/2) before terminating the HTTP request or stream. Must be a valid Go duration string, or
|max-connection-duration||string||none*||This field defines the maximum period of time after an HTTP connection has been established from the client to the proxy before it is closed by the proxy, regardless of whether there has been activity or not. Must be a valid Go duration string, or omitted or set to
||This field defines how long the proxy will wait between sending an initial GOAWAY frame and a second, final GOAWAY frame when terminating an HTTP/2 connection. During this grace period, the proxy will continue to respond to new streams. After the final GOAWAY frame has been sent, the proxy will refuse new streams. Must be a valid Go duration string. See the Envoy documentation for more information.|
* This is Envoy’s default setting value and is not explicitly configured by Contour.
The cluster configuration block can be used to configure various parameters for Envoy clusters.
|dns-lookup-family||string||auto||This field specifies the dns-lookup-family to use for upstream requests to externalName type Kubernetes services from an HTTPProxy route. Values are:
The server configuration block can be used to configure various settings for the
contour serve command.
|xds-server-type||string||contour||This field specifies the xDS Server to use. Options are
The following is an example ConfigMap with configuration file included:
apiVersion: v1 kind: ConfigMap metadata: name: contour namespace: projectcontour data: contour.yaml: | # server: # determine which XDS Server implementation to utilize in Contour. # xds-server-type: contour # # should contour expect to be running inside a k8s cluster # incluster: true # # path to kubeconfig (if not running inside a k8s cluster) # kubeconfig: /path/to/.kube/config # # disable httpproxy permitInsecure field # disablePermitInsecure: false tls: # minimum TLS version that Contour will negotiate # minimumProtocolVersion: "1.1" fallback-certificate: # name: fallback-secret-name # namespace: projectcontour envoy-client-certificate: # name: envoy-client-cert-secret-name # namespace: projectcontour # The following config shows the defaults for the leader election. # leaderelection: # configmap-name: leader-elect # configmap-namespace: projectcontour # Default HTTP versions. # default-http-versions: # - "HTTP/1.1" # - "HTTP/2" # The following shows the default proxy timeout settings. # timeouts: # request-timeout: infinity # connection-idle-timeout: 60s # stream-idle-timeout: 5m # max-connection-duration: infinity # connection-shutdown-grace-period: 5s # # Envoy cluster settings. # cluster: # configure the cluster dns lookup family # valid options are: auto (default), v4, v6 # dns-lookup-family: auto
Note: The default example
contour includes this file for easy deployment of Contour.
If present, the value of the
CONTOUR_NAMESPACE environment variable is used as:
contour bootstrap --namespaceflag unless otherwise specified.
contour certgen --namespaceflag unless otherwise specified.
contour serve --envoy-service-namespaceflag unless otherwise specified.
leaderelection.configmap-namespaceconfig file setting for
contour serveunless otherwise specified.
The bootstrap configuration file is generated by an initContainer in the Envoy daemonset which runs the
contour bootstrap command to generate the file.
This configuration file configures the Envoy container to connect to Contour and receive configuration via xDS.
The next section outlines all the available flags that can be passed to the
contour bootstrap command which are used to customize
the configuration file to match the environment in which Envoy is deployed.
There are flags that can be passed to
contour boostrap that help configure how Envoy
connects to Contour:
|””||Directory where resource files will be written.|
|127.0.0.1||Address the Envoy admin webpage will listen on.|
|9001||Port the Envoy admin webpage will listen on.|
|127.0.0.1||Address to connect to Contour xDS server on.|
|8001||Port to connect to Contour xDS server on.|
|””||CA filename for Envoy secure xDS gRPC communication.|
|””||Client certificate filename for Envoy secure xDS gRPC communication.|
|””||Client key filename for Envoy secure xDS gRPC communication.|
|projectcontour||Namespace the Envoy container will run, also configured via ENV variable “CONTOUR_NAMESPACE”. Namespace is used as part of the metric names on static resources defined in the bootstrap configuration file.|
|v2||Specify the xDS API resource version to use. Options are