Skip to content

Commit 35f2bd6

Browse files
committed
Documentation for version 2.22.x
Signed-off-by: Thomas Hallgren <[email protected]>
1 parent d310e61 commit 35f2bd6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+7693
-9
lines changed

blog/2024-12-10-telepresence-2.21.md

+3-9
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,11 @@
22
title: Telepresence 2.21
33
description: What's new in Telepresence 2.21.
44
slug: telepresence-2.21
5-
authors:
6-
- name: Thomas Hallgren
7-
title: Maintainer of Telepresence OSS
8-
url: https://github.com/thallgren
9-
image_url: https://github.com/thallgren.png
10-
socials:
11-
linkedin: https://www.linkedin.com/in/thallgren/
5+
authors: thallgren
126
---
137

14-
Telepresence 2.21.0 has been released, and here is a walkthrough of its many new features, such as automatic VPN
15-
conflict avoidance, the new `telepresence ingest` command, and the improved docker support provided by commands like
8+
Telepresence 2.21.0 has been released, and here is a walkthrough of its many new features, such as automatic VPN
9+
conflict avoidance, the new `telepresence ingest` command, and the improved docker support provided by commands like
1610
`telepresence curl` and `telepresence docker-run`.
1711

1812
<!-- truncate -->

blog/2025-03-14-telepresence-2.22.md

+109
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
---
2+
title: Telepresence 2.22
3+
description: What's new in Telepresence 2.22.
4+
slug: telepresence-2.22
5+
authors: thallgren
6+
---
7+
8+
Telepresence 2.22 introduces several compelling features, notably the telepresence replace command, a JSON schema for Helm chart values, greater control over Traffic Manager's namespace scope, and improved customization of remote mount behavior.
9+
10+
<!-- truncate -->
11+
12+
## Telepresence Replace: Container-Level Substitution
13+
14+
Telepresence introduces `telepresence replace`, a new command that offers a distinct method for interacting with containers, complementing `telepresence intercept` and `telepresence ingest`.
15+
16+
### Distinguishing Features of `replace`
17+
18+
While superficially similar to `intercept`, `replace` operates with fundamental differences:
19+
20+
1. **Container-Wide Scope:** `replace` substitutes an entire container, redirecting all its traffic, whereas `intercept` focuses on specific services or service/container ports.
21+
2. **Direct Container Port Mapping:** The `--port` flag in `replace` directly maps to container ports.
22+
3. **Optional Port Interception:** Unlike `intercept`, `replace` can function without intercepting any specific ports.
23+
4. **Complete Container Replacement:** During a `replace`, the original container within the cluster is deactivated and fully substituted.
24+
25+
### Rationale: Addressing Container-Level Substitution Needs
26+
27+
The existing `telepresence intercept --replace` flag, which targets specific ports, prompted the development of the dedicated `replace` command.
28+
29+
`intercept` inherently focuses on port-level traffic redirection. However, scenarios arise where container-level substitution is required without specific port interception. For instance, a message-queue consumer container might not expose any ports. Introducing a `--no-ports` flag to `intercept --replace` would create a logical contradiction, as "intercept" implies port-based traffic redirection.
30+
31+
Therefore, `replace` was introduced to provide a clear and consistent mechanism for container-level substitution.
32+
33+
### Deprecation of the `--replace` flag
34+
The `telepresence intercept --replace` flag is now deprecated. While it remains functional, a warning will be issued, recommending the use of `telepresence replace` instead.
35+
36+
### Generic term for Ingest, Intercept, and Replace
37+
38+
Client engagement of a container is defined as the act of ingesting, intercepting, or replacing that container. Consequently, the term 'engage' will appear frequently throughout the documentation.
39+
40+
## Traffic Manager Namespaces
41+
42+
The namespaces that the Telepresence Traffic Manager cares about can be declared in the Helm chart, and multiple Traffic Managers can be installed that deal with their own set of namespaces as long as there's no overlap. This has been the case before this release. Two things are new though:
43+
44+
1. **Namespaces are consistently declared:** Prior to this release, the namespace declaration was scattered into several Helm chart values, such as `manager.Rbac.namespaces`, `client.Rbac.namespaces`, and `agentInjector.webhook.namespaceSelector`. The definition is now unified to the mutual exclusive top-level Helm chart values `namespaces` and `namespaceSelector`.
45+
2. **The conflict detection is all-encompassing**: The old way of declaring namespaces implied that the Traffic Manager was either "cluster wide" (no declaration existed) or "namespaced". A conflict would be detected between two "namespaced" installation, but not between a "namespaced" and a "cluster wide" installation. This is no longer the case. All conflicting namespace selectors will yield errors and Helm will refuse to install them.
46+
47+
### Dynamic or Static Selector
48+
49+
A namespace selector can be dynamic or static. Telepresence will consider a selector that just targets the namespace name as a _static_ selector. Selectors using other labels, or negation of labels (using operator `NotIn`) are considered _dynamic_. The Difference is that the former isn't sensitive to changes (except, of course, the removal of a namespace) whereas the latter will take effect immediately if the set of matching namespaces changes.
50+
51+
Sample _static_ selector, selecting the namespaces "alpha" and "beta":
52+
```yaml
53+
namespaceSelector:
54+
matchExpressions:
55+
- key: kubernetes.io/metadata.name
56+
operator: In
57+
values:
58+
- alpha
59+
- beta
60+
```
61+
62+
This type of selector can also be declared using the short form `namespaces`:
63+
```yaml
64+
namespaces:
65+
- alpha
66+
- beta
67+
```
68+
69+
Sample _dynamic_ selector, selecting namespaces where the label "example.com/managed" is "true" and "example.com/environment" is "dev" or "qa":
70+
71+
```yaml
72+
namespaceSelector:
73+
matchLabels:
74+
example.com/managed: "true"
75+
matchExpressions:
76+
- key: example.com/environment
77+
operator: In
78+
values:
79+
- dev
80+
- qa
81+
```
82+
83+
## Volume Mount Policies
84+
85+
This feature gives the user control over what volumes that the traffic-agent will share with the client, how those volumes are shared (read-write or read-only), and also give the client a hint about volumes that are not shared but will be expected by the locally running container.
86+
87+
Mount policies can be configured globally for a Traffic Manager using Helm chart values, or individually for a workload using template annotations.
88+
89+
A volume policy can be `Ignore`, `Local`, `Remote`, or `RemoteReadOnly`. See the [Control Volume Sharing](/docs/reference/cluster-config#control-volume-sharing) section in the reference documentation for detailed information on the Helm chart value and annotation.
90+
91+
## JSON-Schema for the Helm Chart Values
92+
93+
It is no longer possible to enter invalid, misspelled, or otherwise non-existent configuration parameters when doing
94+
a `helm install|upgrade` or `telepresence helm install|upgrade`, because all values are now guarded using a JSON-schema.
95+
96+
A new `telepresence helm lint` command was also added, which corresponds to [helm lint](https://helm.sh/docs/helm/helm_lint/), but uses the Helm chart embedded in the `telepresence` binary.
97+
98+
## Other Notable Changes
99+
100+
### Annotation Prefix Change
101+
All annotations now use the prefix `telepresence.io/`. This prefix was already used by labels added by Telepresence. The former annotation prefix `telepresence.getambassador.io/` will continue to work, but a warning will be printed in the logs.
102+
103+
### Configmap `telepresence-agents` is no longer used
104+
The Traffic Agent configurations stored in the `telepresence-agents` configmap are now instead added as pod-annotations. The configmap is no longer used, and can be safely removed.
105+
106+
### Rollbacks Triggered Using Pod Eviction
107+
When the configuration for a pod changes as the result of a client engaging with the pod, the pod will now be evicted in order to trigger the mutating webhook. This vouches for simpler logic and faster response times when engaging and ending an engagement. In earlier releases, Telepresence would instead patch the workload. The workload might still be triggered if the eviction fails due to the pod's disruption policy.
108+
109+
Please check out the [Release Notes](/docs/release-notes) for a full list of all new features, changes, and bug-fixes.

blog/authors.yml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
thallgren:
2+
name: Thomas Hallgren
3+
title: Maintainer of Telepresence OSS
4+
url: https://github.com/thallgren
5+
image_url: https://github.com/thallgren.png
6+
socials:
7+
linkedin: https://www.linkedin.com/in/thallgren/
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Telepresence Documentation
2+
3+
This folder contains the Telepresence documentation in a format suitable for a versioned folder in the
4+
telepresenceio/telepresence.io repository. The folder will show up in that repository when a new minor revision
5+
tag is created here.
6+
7+
Assuming that a 2.20.0 release is pending, and that a release/v2.20.0 branch has been created, then:
8+
```console
9+
$ export TELEPRESENCE_VERSION=v2.20.0
10+
$ make prepare-release
11+
$ git push origin {,rpc/}v2.20.0 release/v2.20.0
12+
```
13+
14+
will result in a `docs/v2.20` folder with this folder's contents in the telepresenceio/telepresence.io repository.
15+
16+
Subsequent bugfix tags for the same minor tag, i.e.:
17+
```console
18+
$ export TELEPRESENCE_VERSION=v2.20.1
19+
$ make prepare-release
20+
$ git push origin {,rpc/}v2.20.1 release/v2.20.1
21+
```
22+
will not result in a new folder when it is pushed, but it will update the content of the `docs/v2.20` folder to
23+
reflect this folder's content for that tag.

versioned_docs/version-2.22/README.md

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
description: Main menu when using plain markdown. Excluded when generating the website
3+
---
4+
# <img src="images/logo.png" height="64px"/> Telepresence Documentation
5+
raw markdown version, more bells and whistles at [telepresence.io](https://telepresence.io)
6+
7+
- [Quick start](quick-start.md)
8+
- Install Telepresence
9+
- [Install Client](install/client.md)
10+
- [Upgrade Client](install/upgrade.md)
11+
- [Install Traffic Manager](install/manager.md)
12+
- [Cloud Provider Prerequisites](install/cloud.md)
13+
- Core concepts
14+
- [The developer experience and the inner dev loop](concepts/devloop.md)
15+
- [Making the remote local: Faster feedback, collaboration and debugging](concepts/faster.md)
16+
- [Intercepts](concepts/intercepts.md)
17+
- How do I...
18+
- [Code and debug an application locally](howtos/engage.md)
19+
- [Use Telepresence with Docker](howtos/docker.md)
20+
- [Work with large clusters](howtos/large-clusters.md)
21+
- [Host a cluster in Docker or a VM](howtos/cluster-in-vm.md)
22+
- Technical reference
23+
- [Architecture](reference/architecture.md)
24+
- [Client reference](reference/client.md)
25+
- [Laptop-side configuration](reference/config.md)
26+
- [Cluster-side configuration](reference/cluster-config.md)
27+
- [Using Docker for engagements](reference/docker-run.md)
28+
- [Running Telepresence in a Docker container](reference/inside-container.md)
29+
- [Environment variables](reference/environment.md)
30+
- Engagements
31+
- [Configure intercept using CLI](reference/engagements/cli.md)
32+
- [Traffic Agent Sidecar](reference/engagements/sidecar.md)
33+
- [Target a specific container](reference/engagements/container.md)
34+
- [Volume mounts](reference/volume.md)
35+
- [DNS resolution](reference/dns.md)
36+
- [RBAC](reference/rbac.md)
37+
- [Telepresence and VPNs](reference/vpn.md)
38+
- [Networking through Virtual Network Interface](reference/tun-device.md)
39+
- [Connection Routing](reference/routing.md)
40+
- [Monitoring](reference/monitoring.md)
41+
- [FAQs](faqs.md)
42+
- [Troubleshooting](troubleshooting.md)
43+
- [Community](community.md)
44+
- [Release Notes](release-notes.md)
45+
- [Licenses](licenses.md)
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
title: Community
3+
hide_table_of_contents: true
4+
---
5+
6+
# Community
7+
8+
## Contributor's guide
9+
Please review our [contributor's guide](https://github.com/telepresenceio/telepresence/blob/release/v2/CONTRIBUTING.md)
10+
on GitHub to learn how you can help make Telepresence better.
11+
12+
## Meetings
13+
Check out our community [meeting schedule](https://github.com/telepresenceio/telepresence/blob/release/v2/MEETING_SCHEDULE.md) for opportunities to interact with Telepresence developers.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
title: The developer experience and the inner dev loop
3+
hide_table_of_contents: true
4+
---
5+
6+
# The developer experience and the inner dev loop
7+
8+
## How is the developer experience changing?
9+
10+
The developer experience is the workflow a developer uses to develop, test, deploy, and release software.
11+
12+
Typically this experience has consisted of both an inner dev loop and an outer dev loop. The inner dev loop is where the individual developer codes and tests, and once the developer pushes their code to version control, the outer dev loop is triggered.
13+
14+
The outer dev loop is _everything else_ that happens leading up to release. This includes code merge, automated code review, test execution, deployment, controlled (canary) release, and observation of results. The modern outer dev loop might include, for example, an automated CI/CD pipeline as part of a GitOps workflow and a progressive delivery strategy relying on automated canaries, i.e. to make the outer loop as fast, efficient and automated as possible.
15+
16+
Cloud-native technologies have fundamentally altered the developer experience in two ways: one, developers now have to take extra steps in the inner dev loop; two, developers need to be concerned with the outer dev loop as part of their workflow, even if most of their time is spent in the inner dev loop.
17+
18+
Engineers now must design and build distributed service-based applications _and_ also assume responsibility for the full development life cycle. The new developer experience means that developers can no longer rely on monolithic application developer best practices, such as checking out the entire codebase and coding locally with a rapid “live-reload” inner development loop. Now developers have to manage external dependencies, build containers, and implement orchestration configuration (e.g. Kubernetes YAML). This may appear trivial at first glance, but this adds development time to the equation.
19+
20+
## What is the inner dev loop?
21+
22+
The inner dev loop is the single developer workflow. A single developer should be able to set up and use an inner dev loop to code and test changes quickly.
23+
24+
Even within the Kubernetes space, developers will find much of the inner dev loop familiar. That is, code can still be written locally at a level that a developer controls and committed to version control.
25+
26+
In a traditional inner dev loop, if a typical developer codes for 360 minutes (6 hours) a day, with a traditional local iterative development loop of 5 minutes — 3 coding, 1 building, i.e. compiling/deploying/reloading, 1 testing inspecting, and 10-20 seconds for committing code — they can expect to make ~70 iterations of their code per day. Any one of these iterations could be a release candidate. The only “developer tax” being paid here is for the commit process, which is negligible.
27+
28+
![traditional inner dev loop](../images/trad-inner-dev-loop.png#devloop)
29+
30+
## In search of lost time: How does containerization change the inner dev loop?
31+
32+
The inner dev loop is where writing and testing code happens, and time is critical for maximum developer productivity and getting features in front of end users. The faster the feedback loop, the faster developers can refactor and test again.
33+
34+
Changes to the inner dev loop process, i.e., containerization, threaten to slow this development workflow down. Coding stays the same in the new inner dev loop, but code has to be containerized. The _containerized_ inner dev loop requires a number of new steps:
35+
36+
* packaging code in containers
37+
* writing a manifest to specify how Kubernetes should run the application (e.g., YAML-based configuration information, such as how much memory should be given to a container)
38+
* pushing the container to the registry
39+
* deploying containers in Kubernetes
40+
41+
Each new step within the container inner dev loop adds to overall development time, and developers are repeating this process frequently. If the build time is incremented to 5 minutes — not atypical with a standard container build, registry upload, and deploy — then the number of possible development iterations per day drops to ~40. At the extreme that’s a 40% decrease in potential new features being released. This new container build step is a hidden tax, which is quite expensive.
42+
43+
44+
![container inner dev loop](../images/container-inner-dev-loop.png#devloop)
45+
46+
## Tackling the slow inner dev loop
47+
48+
A slow inner dev loop can negatively impact frontend and backend teams, delaying work on individual and team levels and slowing releases into production overall.
49+
50+
For example:
51+
52+
* Frontend developers have to wait for previews of backend changes on a shared dev/staging environment (for example, until CI/CD deploys a new version) and/or rely on mocks/stubs/virtual services when coding their application locally. These changes are only verifiable by going through the CI/CD process to build and deploy within a target environment.
53+
* Backend developers have to wait for CI/CD to build and deploy their app to a target environment to verify that their code works correctly with cluster or cloud-based dependencies as well as to share their work to get feedback.
54+
55+
New technologies and tools can facilitate cloud-native, containerized development. And in the case of a sluggish inner dev loop, developers can accelerate productivity with tools that help speed the loop up again.

0 commit comments

Comments
 (0)