Laptop-side configuration
There are a number of configuration values that can be tweaked to change how Telepresence behaves.
These can be set in two ways: globally, by a platform engineer with powers to deploy the Telepresence Traffic Manager, or locally by any user.
One important exception is the location of the traffic manager itself, which, if it's different from the default of ambassador
, must be set locally per-cluster to be able to connect.
Global Configuration
Global configuration is set at the Traffic Manager level and applies to any user connecting to that Traffic Manager.
To set it, simply pass in a client
dictionary to the telepresence helm install
command, with any config values you wish to set.
The client
config supports values for cluster, dns, grpc, images, logLevels, routing,
and timeouts.
Here is an example configuration to show you the conventions of how Telepresence is configured:
note: This config shouldn't be used verbatim, since the registry privateRepo
used doesn't exist
client:
timeouts:
agentInstall: 1m
intercept: 10s
logLevels:
userDaemon: debug
images:
registry: privateRepo # This overrides the default docker.io/datawire repo
agentImage: tel2:2.19.1 # This overrides the agent image to inject when intercepting
grpc:
maxReceiveSize: 10Mi
dns:
includeSuffixes: [.private]
excludeSuffixes: [.se, .com, .io, .net, .org, .ru]
lookupTimeout: 30s
routing:
alsoProxySubnets:
- 1.2.3.4/32
neverProxySubnets:
- 1.2.3.4/32
Cluster
Values for client.cluster
controls aspects on how client's connection to the traffic-manager.
Field | Description | Type | Default |
---|---|---|---|
defaultManagerNamespace | The default namespace where the Traffic Manager will be installed. | string | ambassador |
mappedNamespaces | Namespaces that will be mapped by default. | sequence of strings | [] |
connectFromRootDaeamon | Make connections to the cluster directly from the root daemon. | boolean | true |
agentPortForward | Let telepresence-client use port-forwards directly to agents | boolean | true |
virtualIPSubnet | The CIDR to use when generating virtual IPs | string | platform dependent |
DNS
The client.dns
configuration offers options for configuring the DNS resolution behavior in a client application or system. Here is a summary of the available fields:
The fields for client.dns
are: localIP
, excludeSuffixes
, includeSuffixes
, and lookupTimeout
.
Field | Description | Type | Default |
---|---|---|---|
localIP | The address of the local DNS server. This entry is only used on Linux systems that are not configured to use systemd-resolved. | IP address string | first nameserver mentioned in /etc/resolv.conf |
excludeSuffixes | Suffixes for which the DNS resolver will always fail (or fallback in case of the overriding resolver). Can be globally configured in the Helm chart. | sequence of strings | [".arpa", ".com", ".io", ".net", ".org", ".ru"] |
includeSuffixes | Suffixes for which the DNS resolver will always attempt to do a lookup. Includes have higher priority than excludes. Can be globally configured in the Helm chart. | sequence of strings | [] |
excludes | Names to be excluded by the DNS resolver | [] | |
mappings | Names to be resolved to other names (CNAME records) or to explicit IP addresses | [] | |
lookupTimeout | Maximum time to wait for a cluster side host lookup. | duration string | 4 seconds |
Here is an example values.yaml:
client:
dns:
includeSuffixes: [.private]
excludeSuffixes: [.se, .com, .io, .net, .org, .ru]
localIP: 8.8.8.8
lookupTimeout: 30s
Mappings
Allows you to map hostnames to aliases or to IP addresses. This is useful when you want to use an alternative name for a service in the cluster, or when you want the DNS resolver to map a name to an IP address of your choice.
In the given cluster, the service named postgres
is located within a separate namespace titled big-data
, and it's referred to as psql
:
dns:
mappings:
- name: postgres
aliasFor: psql.big-data
- name: my.own.domain
aliasFor: 192.168.0.15
Exclude
Lists service names to be excluded from the Telepresence DNS server. This is useful when you want your application to interact with a local service instead of a cluster service. In this example, "redis" will not be resolved by the cluster, but locally.
dns:
excludes:
- redis
Grpc
The maxReceiveSize
determines how large a message that the workstation receives via gRPC can be. The default is 4Mi (determined by gRPC). All traffic to and from the cluster is tunneled via gRPC.
The size is measured in bytes. You can express it as a plain integer or as a fixed-point number using E, G, M, or K. You can also use the power-of-two equivalents: Gi, Mi, Ki. For example, the following represent roughly the same value:
128974848, 129e6, 129M, 123Mi
Images
Values for client.images
are strings. These values affect the objects that are deployed in the cluster,
so it's important to ensure users have the same configuration.
These are the valid fields for the client.images
key:
Field | Description | Type | Default |
---|---|---|---|
registry | Docker registry to be used for installing the Traffic Manager and default Traffic Agent. | Docker registry name string | docker.io/datawire |
agentImage | $registry/$imageName:$imageTag to use when installing the Traffic Agent. | qualified Docker image name string | (unset) |
clientImage | $registry/$imageName:$imageTag to use locally when connecting with --docker . | qualified Docker image name string | $registry/ambassador-telepresence |
Intercept
The intercept
controls applies to how Telepresence will intercept the communications to the intercepted service.
Field | Description | Type | Default |
---|---|---|---|
defaultPort | controls which port is selected when no --port flag is given to the telepresence intercept command. | int | 8080 |
useFtp | Use fuseftp instead of sshfs when mounting remote file systems | boolean | false |