Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the dormant container during intercept with --replace. #3760

Closed
wants to merge 9 commits into from

Conversation

thallgren
Copy link
Member

There's no need to have a dormant container because the traffic-agent
can serve as the replacement itself. That way, there's no need to
redirect ports either, which means that there's no need to rename ports
or use an init-container.

An annotation is added to the pod to cater for when multiple injections
happen due to replace-policy, so that injections that follow the one
when an app-container is removed can reproduce the traffic-agent
container, taking its ports, mounts, and environment into account.

When the traffic-manager shuts down, it must uninstall agents
unconditionally, without concerns about the "inject" annotation.

Signed-off-by: Thomas Hallgren <thomas@tada.se>
Signed-off-by: Thomas Hallgren <thomas@tada.se>
There's no need to have a dormant container because the traffic-agent
can serve as the replacement itself. That way, there's no need to
redirect ports either, which means that there's no need to rename ports
or use an init-container.

An annotation is added to the pod to cater for when multiple injections
happen due to replace-policy, so that injections that follow the one
when an app-container is removed can reproduce the traffic-agent
container, taking its ports, mounts, and environment into account.

Closes #3758

Signed-off-by: Thomas Hallgren <thomas@tada.se>
The `tunnel.ConnID` still used the `net.IP`. This commit changes the
constructor to use `netip.AddrPort` for host and destination instead
of separate combos of `net.IP` and `uint16`.

Signed-off-by: Thomas Hallgren <thomas@tada.se>
Signed-off-by: Thomas Hallgren <thomas@tada.se>
It is now possible to intercept multiple ports with one single
invocation of `telepresence intercept` by just repeating the `--port`
flag.

Signed-off-by: Thomas Hallgren <thomas@tada.se>
Signed-off-by: Thomas Hallgren <thomas@tada.se>
The `Eventually` function will always wait for its initial tick-delay.
This commit ensures that the PingInterceptedEchoServer pings immediately
and then uses Eventually if that ping fails.

Signed-off-by: Thomas Hallgren <thomas@tada.se>
Signed-off-by: Thomas Hallgren <thomas@tada.se>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow customisation of sleeperImage in --replace mode for compliance with cluster restrictions
1 participant