Project: Contour (Orchestration & Management / Service Proxy)
File: configuration.md

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. | Field Name | Type | Default | Description | ||||-| | accesslog-format | string | `envoy` | This key sets the global for Envoy. Valid options are `envoy` or `json`. | | debug | boolean | `false` | Enables debug logging. | | default-http-versions | string array | <code style="white-space:nowrap">HTTP/1.1</code> <br> <code style="white-space:nowrap">HTTP/2</code> | 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. | | disablePermitInsecure | boolean | `false` | If this field is true, Contour will ignore `PermitInsecure` field in HTTPProxy documents. | | envoy-service-name | string | `envoy` | This sets the service name that will be inspected for address details to be applied to Ingress objects. | | envoy-service-namespace | string | `projectcontour` | This sets the namespace of the service that will be inspected for address details to be applied to Ingress objects. If the `CONTOUR_NAMESPACE` environment variable is present, Contour will populate this field with its value. | | 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 `envoy-service-name` and `envoy-service-namespace`.| | incluster | boolean | `false` | This field specifies that Contour is running in a Kubernetes cluster and should use the in-cluster client access configuration. | | json-fields | string array | | This is the list the field names to include in the JSON . | | kubeconfig | string | `$HOME/.kube/config` | Path to a Kubernetes for when Contour is executed outside a cluster. | | leaderelection | leaderelection | | The . | | request-timeout | instead.<br /><br /> This field specifies the default request timeout as a Go duration string. Zero means there is no timeout. | | tls | TLS | | The default . | | timeouts | TimeoutConfig | | The . | | cluster | ClusterConfig | | The . | | server | ServerConfig | | The for `contour serve` command. | The TLS configuration block can be used to configure default values for how Contour should provision TLS

| Field Name | Type| Default | Description | ||--|-|-| | minimum-protocol-version| string | `""` | This field specifies the minimum TLS protocol version that is allowed. Valid options are `1.2` and `1.3`. Any other value defaults to TLS 1.1. | | fallback-certificate | | | . | | envoy-client-certificate | | | . | | Field Name | Type| Default | Description | ||--|-|-| | name | string | `""` | This field specifies the name of the Kubernetes secret to use as the fallback certificate. | | namespace | string | `""` | This field specifies the namespace of the Kubernetes secret to use as the fallback certificate. | | Field Name | Type| Default | Description | ||--|-|-| | name | string | `""` | 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. | | namespace | string | `""` | 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-name` and `configmap-namespace` fields should require any configuration. | Field Name | Type | Default | Description | ||||-| | configmap-name | string | `leader-elect` | The name of the ConfigMap that Contour leader election will lease. | | configmap-namespace | string | `projectcontour` | The namespace of the ConfigMap that Contour leader election will lease. If the `CONTOUR_NAMESPACE` environment variable is present, Contour will populate this field with its value. | | lease-duration | | `15s` | The duration of the leadership lease. | | renew-deadline | | `10s` | The length of time that the leader will retry refreshing leadership before giving up. | | retry-period | | `2s` | 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. | Field Name | Type| Default | Description | ||--|-|-| | 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 , or omitted or set to `infinity` to disable the timeout entirely. See for more information.<br /><br />Note: A value of `0s` previously disabled this timeout entirely. This is no longer the case. Use `infinity` or omit this field to disable the

| | connection-idle-timeout| string | `60s` | 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 , or `infinity` to disable the timeout entirely. See for more information. | | stream-idle-timeout| string | `5m`* |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 , or `infinity` to disable the timeout entirely. See for more information. | | 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 , or omitted or set to `infinity` for no max duration. See for more information. | | connection-shutdown-grace-period | string | `5s`* | 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 . See 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. | Field Name | Type| Default | Description | ||--|-|-| | 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: `auto`, `v4, `v6` | The server configuration block can be used to configure various settings for the `contour serve` command. | Field Name | Type| Default | Description | ||--|-|-| | xds-server-type | string | contour | This field specifies the xDS Server to use. Options are `contour` or `envoy`. | The following is an example ConfigMap with configuration file included: ```yaml apiVersion: v1 kind: ConfigMap metadata: name: contour namespace: projectcontour data: contour.yaml: | tls: fallback-certificate: envoy-client-certificate: ``` Note: The default example `contour` includes this for easy deployment of Contour. If present, the value of the `CONTOUR_NAMESPACE` environment variable is used as: The value for the `contour bootstrap --namespace` flag unless otherwise specified. The value for the `contour certgen --namespace` flag unless otherwise specified. The value for the `contour serve --envoy-service-namespace` flag unless otherwise specified. The value for the `leaderelection.configmap-namespace` config file setting for `contour serve` unless otherwise specified. The `CONTOUR_NAMESPACE` environment variable is set via the in the Contour .