Skip to content

Commit 9fbc93f

Browse files
authored
Merge pull request #3818 from telepresenceio/thallgren/doc-fixes
Adjust rbac docs for eviction fallback to workload patching.
2 parents dc226ef + cd7952c commit 9fbc93f

File tree

4 files changed

+44
-80
lines changed

4 files changed

+44
-80
lines changed

CHANGELOG.yml

+14-14
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ items:
4343
To address these issues, the `--replace` flag within `telepresence intercept` has been deprecated. The new
4444
`telepresence replace` command provides a dedicated and consistent method for replacing containers, enhancing
4545
clarity and reliability.
46-
46+
4747
Key differences between `replace` and `intercept`:
4848
4949
1. **Scope:** The `replace` command targets and affects an entire container, impacting all its traffic, while
@@ -56,7 +56,7 @@ items:
5656
will print a deprecation warning when used.
5757
- type: feature
5858
title: Add json-schema for the Telepresence Helm Chart
59-
body: |-
59+
body: >-
6060
Helm can validate a chart using a json-schema using the command `helm lint`, and this schema can be part of
6161
the actual Helm chart. The telepresence-oss Helm chart now includes such a schema, and a new
6262
`telepresence helm lint` command was added so that linting can be performed using the embedded chart.
@@ -67,8 +67,8 @@ items:
6767
Traffic Agent now directly serves as the replacement container, eliminating the need to forward traffic to the
6868
original application container. This simplification offers several advantages when using the `--replace` flag:
6969
70-
- **Removal of the init-container:** The need for a separate init-container is no longer necessary.
71-
- **Elimination of port renames:** Port renames within the intercepted pod are no longer required.
70+
- **Removal of the init-container:** The need for a separate init-container is no longer necessary.
71+
- **Elimination of port renames:** Port renames within the intercepted pod are no longer required.
7272
- type: feature
7373
title: One single invocation of the Telepresence intercept command can now intercept multiple ports.
7474
body: >-
@@ -88,12 +88,13 @@ items:
8888
matchExpressions:
8989
- key: kubernetes.io/metadata.name
9090
operator: in
91-
values: <namespaces>`.
91+
values: <namespaces>.
9292
```
93+
9394
docs: install/manager#static-versus-dynamic-namespace-selection
9495
- type: feature
9596
title: Improved control over how remote volumes are mounted using mount policies
96-
body: |-
97+
body: >-
9798
Mount policies, that affects how the telepresence traffic-agent shares the pod's volumes, and also how the
9899
client will mount them, can now be provided using the Helm chart value `agent.mountPolicies` or as JSON
99100
object in the workload annotation `telepresence.io/mount-policies`. A mount policy is applied to a volume
@@ -130,10 +131,9 @@ items:
130131
- type: change
131132
title: Trigger the mutating webhook with Kubernetes eviction objects instead of patching workloads.
132133
body: >-
133-
Instead of patching workloads, or scaling the workloads down to zero and up again, Telepresence will now
134-
create policy/v1 Eviction objects to trigger the mutating webhook. This causes a slight change in the
135-
traffic-manager RBAC. The `patch` permissions are no longer needed. Instead, the traffic-manager must be
136-
able to create "pod/eviction" objects.
134+
Telepresence will now attempt to evict pods in order to trigger the traffic-agent's injection or removal, and
135+
revert to patching workloads if evictions are prevented by the pod's disruption budget. This causes a slight
136+
change in the traffic-manager RBAC, as the traffic-manager must be able to create "pod/eviction" objects.
137137
- type: change
138138
title: The telepresence-agents configmap is no longer used.
139139
body: >-
@@ -159,18 +159,18 @@ items:
159159
- type: bugfix
160160
title: Don't dispatch DNS discovery queries to the cluster.
161161
body: >-
162-
macOS based systems will often PTR queries using nameslike `b._dns-sd._udp`, lb._dns-sd._udp, or
162+
macOS based systems will often PTR queries using nameslike `b._dns-sd._udp`, lb._dns-sd._udp`, or
163163
`db-dns-sd._udp`. Those queries are no longer dispatched to the cluster.
164164
- type: bugfix
165165
title: Using the --namespace option with telepresence causes a deadlock.
166166
body: >-
167-
Using `telepresence list --namespace <ns> with a namespace different from the one that telepresence was
167+
Using `telepresence list --namespace <ns>` with a namespace different from the one that telepresence was
168168
connected to, would cause a deadlock, and then produce an empty list.
169169
- type: bugfix
170170
title: Fix problem with exclude-suffix being hidden by DNS search path.
171171
body: >-
172172
In some situations, a name ending with an exclude-suffix like "xyz.com" would be expanded by a search path
173-
into "xyz.com.<connected namespace>" and therefore not be excluded. Instead, the name was sent to the cluster
173+
into "xyz.com.&lt;connected namespace&gt;" and therefore not be excluded. Instead, the name was sent to the cluster
174174
to be resolved, causing an unnecessary load on its DNS server.
175175
- version: 2.21.3
176176
date: 2025-02-06
@@ -241,7 +241,7 @@ items:
241241
docs: reference/vpn
242242
- type: feature
243243
title: Intercepts targeting a specific container
244-
body: |-
244+
body: >-
245245
In certain scenarios, the container owning the intercepted port differs
246246
from the container the intercept targets. This port owner's sole purpose
247247
is to route traffic from the service to the intended container, often

docs/reference/rbac.md

+8-16
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,6 @@ kind: ClusterRole
7171
metadata:
7272
name: traffic-manager
7373
rules:
74-
- apiGroups: [""]
75-
resources: ["configmaps"]
76-
verbs: ["create"]
77-
- apiGroups: [""]
78-
resources: ["configmaps"]
79-
verbs: ["get", "list", "watch"]
80-
resourceNames: ["telepresence-agents"]
8174
- apiGroups: ["apps"]
8275
resources: ["deployments", "replicasets", "statefulsets"]
8376
verbs: ["get", "list", "watch"]
@@ -89,30 +82,29 @@ rules:
8982
verbs: ["get", "watch"]
9083
- apiGroups: [""]
9184
resources: ["pods"]
92-
verbs: ["get", "list", "watch"]
85+
verbs: ["get", "list", "watch"] # patch not needed when agentInjector.enabled is set to false
9386
9487
# If argoRollouts.enabled is set to true
9588
- apiGroups: ["argoproj.io"]
9689
resources: ["rollouts"]
9790
verbs: ["get", "list", "watch"]
9891
92+
# When using podCIDRStrategy nodePodCIDRs
93+
- apiGroups: [""]
94+
resources: ["nodes"]
95+
verbs: ["get", "list", "watch"]
96+
9997
# The following is not needed when agentInjector.enabled is set to false
10098
- apiGroups: [""]
101-
resources: ["configmaps"]
102-
verbs: ["update", "delete"]
103-
resourceNames: ["telepresence-agents"]
99+
resources: ["pods"]
100+
verbs: ["patch"]
104101
- apiGroups: ["apps"]
105102
resources: ["deployments", "replicasets", "statefulsets"]
106103
verbs: ["patch"]
107104
# If argoRollouts.enabled is set to true
108105
- apiGroups: ["argoproj.io"]
109106
resources: ["rollouts"]
110107
verbs: ["patch"]
111-
112-
# When using podCIDRStrategy nodePodCIDRs
113-
- apiGroups: [""]
114-
resources: ["nodes"]
115-
verbs: ["get", "list", "watch"]
116108
---
117109
apiVersion: rbac.authorization.k8s.io/v1
118110
kind: ClusterRoleBinding

docs/release-notes.md

+11-25
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,7 @@ will print a deprecation warning when used.
3434
## <div style="display:flex;"><img src="images/feature.png" alt="feature" style="width:30px;height:fit-content;"/><div style="display:flex;margin-left:7px;">Add json-schema for the Telepresence Helm Chart</div></div>
3535
<div style="margin-left: 15px">
3636

37-
Helm can validate a chart using a json-schema using the command `helm lint`, and this schema can be part of
38-
the actual Helm chart. The telepresence-oss Helm chart now includes such a schema, and a new
39-
`telepresence helm lint` command was added so that linting can be performed using the embedded chart.
37+
Helm can validate a chart using a json-schema using the command `helm lint`, and this schema can be part of the actual Helm chart. The telepresence-oss Helm chart now includes such a schema, and a new `telepresence helm lint` command was added so that linting can be performed using the embedded chart.
4038
</div>
4139

4240
## <div style="display:flex;"><img src="images/feature.png" alt="feature" style="width:30px;height:fit-content;"/><div style="display:flex;margin-left:7px;">No dormant container present during replace.</div></div>
@@ -46,8 +44,8 @@ Telepresence will no longer inject a dormant container during a `telepresence re
4644
Traffic Agent now directly serves as the replacement container, eliminating the need to forward traffic to the
4745
original application container. This simplification offers several advantages when using the `--replace` flag:
4846

49-
- **Removal of the init-container:** The need for a separate init-container is no longer necessary.
50-
- **Elimination of port renames:** Port renames within the intercepted pod are no longer required.
47+
- **Removal of the init-container:** The need for a separate init-container is no longer necessary.
48+
- **Elimination of port renames:** Port renames within the intercepted pod are no longer required.
5149
</div>
5250

5351
## <div style="display:flex;"><img src="images/feature.png" alt="feature" style="width:30px;height:fit-content;"/><div style="display:flex;margin-left:7px;">One single invocation of the Telepresence intercept command can now intercept multiple ports.</div></div>
@@ -70,18 +68,14 @@ namespaceSelector:
7068
matchExpressions:
7169
- key: kubernetes.io/metadata.name
7270
operator: in
73-
values: <namespaces>`.
71+
values: <namespaces>.
7472
```
7573
</div>
7674
7775
## <div style="display:flex;"><img src="images/feature.png" alt="feature" style="width:30px;height:fit-content;"/><div style="display:flex;margin-left:7px;">Improved control over how remote volumes are mounted using mount policies</div></div>
7876
<div style="margin-left: 15px">
7977
80-
Mount policies, that affects how the telepresence traffic-agent shares the pod's volumes, and also how the
81-
client will mount them, can now be provided using the Helm chart value `agent.mountPolicies` or as JSON
82-
object in the workload annotation `telepresence.io/mount-policies`. A mount policy is applied to a volume
83-
or to all paths matching a path-prefix (distinguished by checking if first character is a '/'), and can
84-
be one of `Ignore`, `Local`, `Remote`, or `RemoteReadOnly`.
78+
Mount policies, that affects how the telepresence traffic-agent shares the pod's volumes, and also how the client will mount them, can now be provided using the Helm chart value `agent.mountPolicies` or as JSON object in the workload annotation `telepresence.io/mount-policies`. A mount policy is applied to a volume or to all paths matching a path-prefix (distinguished by checking if first character is a '/'), and can be one of `Ignore`, `Local`, `Remote`, or `RemoteReadOnly`.
8579
</div>
8680

8781
## <div style="display:flex;"><img src="images/feature.png" alt="feature" style="width:30px;height:fit-content;"/><div style="display:flex;margin-left:7px;">List output includes workload kind.</div></div>
@@ -117,7 +111,7 @@ Very few systems experience a DNS recursion lookup problem. It can only occur wh
117111
## <div style="display:flex;"><img src="images/change.png" alt="change" style="width:30px;height:fit-content;"/><div style="display:flex;margin-left:7px;">Trigger the mutating webhook with Kubernetes eviction objects instead of patching workloads.</div></div>
118112
<div style="margin-left: 15px">
119113

120-
Instead of patching workloads, or scaling the workloads down to zero and up again, Telepresence will now create policy/v1 Eviction objects to trigger the mutating webhook. This causes a slight change in the traffic-manager RBAC. The `patch` permissions are no longer needed. Instead, the traffic-manager must be able to create "pod/eviction" objects.
114+
Telepresence will now attempt to evict pods in order to trigger the traffic-agent's injection or removal, and revert to patching workloads if evictions are prevented by the pod's disruption budget. This causes a slight change in the traffic-manager RBAC, as the traffic-manager must be able to create "pod/eviction" objects.
121115
</div>
122116

123117
## <div style="display:flex;"><img src="images/change.png" alt="change" style="width:30px;height:fit-content;"/><div style="display:flex;margin-left:7px;">The telepresence-agents configmap is no longer used.</div></div>
@@ -147,19 +141,19 @@ The namespace conflict detection mechanism would only discover conflicts between
147141
## <div style="display:flex;"><img src="images/bugfix.png" alt="bugfix" style="width:30px;height:fit-content;"/><div style="display:flex;margin-left:7px;">Don't dispatch DNS discovery queries to the cluster.</div></div>
148142
<div style="margin-left: 15px">
149143

150-
macOS based systems will often PTR queries using nameslike `b._dns-sd._udp`, lb._dns-sd._udp, or `db-dns-sd._udp`. Those queries are no longer dispatched to the cluster.
144+
macOS based systems will often PTR queries using nameslike `b._dns-sd._udp`, lb._dns-sd._udp`, or `db-dns-sd._udp`. Those queries are no longer dispatched to the cluster.
151145
</div>
152146

153147
## <div style="display:flex;"><img src="images/bugfix.png" alt="bugfix" style="width:30px;height:fit-content;"/><div style="display:flex;margin-left:7px;">Using the --namespace option with telepresence causes a deadlock.</div></div>
154148
<div style="margin-left: 15px">
155149

156-
Using `telepresence list --namespace <ns> with a namespace different from the one that telepresence was connected to, would cause a deadlock, and then produce an empty list.
150+
Using `telepresence list --namespace <ns>` with a namespace different from the one that telepresence was connected to, would cause a deadlock, and then produce an empty list.
157151
</div>
158152

159153
## <div style="display:flex;"><img src="images/bugfix.png" alt="bugfix" style="width:30px;height:fit-content;"/><div style="display:flex;margin-left:7px;">Fix problem with exclude-suffix being hidden by DNS search path.</div></div>
160154
<div style="margin-left: 15px">
161155

162-
In some situations, a name ending with an exclude-suffix like "xyz.com" would be expanded by a search path into "xyz.com.<connected namespace>" and therefore not be excluded. Instead, the name was sent to the cluster to be resolved, causing an unnecessary load on its DNS server.
156+
In some situations, a name ending with an exclude-suffix like "xyz.com" would be expanded by a search path into "xyz.com.&lt;connected namespace&gt;" and therefore not be excluded. Instead, the name was sent to the cluster to be resolved, causing an unnecessary load on its DNS server.
163157
</div>
164158

165159
## Version 2.21.3 <span style="font-size: 16px;">(February 6)</span>
@@ -223,16 +217,8 @@ It is now possible to use a virtual subnet without routing the affected IPs to a
223217
## <div style="display:flex;"><img src="images/feature.png" alt="feature" style="width:30px;height:fit-content;"/><div style="display:flex;margin-left:7px;">[Intercepts targeting a specific container](reference/engagements/container)</div></div>
224218
<div style="margin-left: 15px">
225219

226-
In certain scenarios, the container owning the intercepted port differs
227-
from the container the intercept targets. This port owner's sole purpose
228-
is to route traffic from the service to the intended container, often
229-
using a direct localhost connection.
230-
231-
This update introduces a `--container <name>` option to the intercept
232-
command. While this option doesn't influence the port selection, it
233-
guarantees that the environment variables and mounts propagated to the
234-
client originate from the specified container. Additionally, if the
235-
`--replace` option is used, it ensures that this container is replaced.
220+
In certain scenarios, the container owning the intercepted port differs from the container the intercept targets. This port owner's sole purpose is to route traffic from the service to the intended container, often using a direct localhost connection.
221+
This update introduces a `--container <name>` option to the intercept command. While this option doesn't influence the port selection, it guarantees that the environment variables and mounts propagated to the client originate from the specified container. Additionally, if the `--replace` option is used, it ensures that this container is replaced.
236222
</div>
237223

238224
## <div style="display:flex;"><img src="images/feature.png" alt="feature" style="width:30px;height:fit-content;"/><div style="display:flex;margin-left:7px;">[New telepresence ingest command](howtos/intercepts#ingest-your-service)</div></div>

0 commit comments

Comments
 (0)