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

New telepresence replace command. #3764

Draft
wants to merge 47 commits into
base: release/v2
Choose a base branch
from

Conversation

thallgren
Copy link
Member

The new telepresence replace command simplifies and clarifies container replacement.

Previously, the --replace flag within the telepresence intercept command was used to replace containers. However, this approach introduced inconsistencies and limitations:

  • Confusion: Using a flag to modify the core function of a command designed for traffic interception led to ambiguity.
  • Inaccurate Behavior: Replacement was not possible when no incoming traffic was intercepted, as the command's design focused on traffic routing.

To address these issues, the --replace flag within telepresence intercept has been deprecated. The new telepresence replace command provides a dedicated and consistent method for replacing containers, enhancing clarity and reliability.

Key differences between replace and intercept:

  1. Scope: The replace command targets and affects an entire container, impacting all its traffic, while an intercept targets specific services and/or service/container ports.
  2. Port Declarations: Remote ports specified using the --port flag are container ports.
  3. No Default Port: A replace can occur without intercepting any ports.
  4. Container State: During a replace, the original container is no longer active within the cluster.

The deprecated --replace flag still works, but is hidden from the telepresence intercept command help, and will print a deprecation warning when used.

@thallgren thallgren marked this pull request as draft January 8, 2025 11:29
@thallgren
Copy link
Member Author

Still a draft. Integration and docs are in the works.

@thallgren thallgren requested a review from P0lip January 8, 2025 11:31
@thallgren thallgren added the ok to test Applied by maintainers when a PR is ready to have tests run on it label Jan 8, 2025
@github-actions github-actions bot removed the ok to test Applied by maintainers when a PR is ready to have tests run on it label Jan 8, 2025
@thallgren thallgren force-pushed the thallgren/replace-command branch from 1d01171 to 002afbe Compare January 8, 2025 22:50
@thallgren thallgren requested a review from njayp January 8, 2025 22:51
@thallgren thallgren force-pushed the thallgren/replace-command branch from 002afbe to b31a69e Compare January 8, 2025 22:54
@thallgren thallgren added the ok to test Applied by maintainers when a PR is ready to have tests run on it label Jan 9, 2025
@github-actions github-actions bot removed the ok to test Applied by maintainers when a PR is ready to have tests run on it label Jan 9, 2025
@thallgren thallgren force-pushed the thallgren/replace-command branch from b31a69e to e816443 Compare January 9, 2025 18:34
@thallgren thallgren added the ok to test Applied by maintainers when a PR is ready to have tests run on it label Jan 9, 2025
@github-actions github-actions bot removed the ok to test Applied by maintainers when a PR is ready to have tests run on it label Jan 9, 2025
@thallgren thallgren force-pushed the thallgren/replace-command branch from e816443 to 681a5a0 Compare January 9, 2025 23:39
@thallgren thallgren added the ok to test Applied by maintainers when a PR is ready to have tests run on it label Jan 9, 2025
@github-actions github-actions bot removed the ok to test Applied by maintainers when a PR is ready to have tests run on it label Jan 9, 2025
@thallgren thallgren force-pushed the thallgren/replace-command branch from 681a5a0 to b4c333f Compare January 10, 2025 06:41
@thallgren thallgren added the ok to test Applied by maintainers when a PR is ready to have tests run on it label Jan 10, 2025
@github-actions github-actions bot removed the ok to test Applied by maintainers when a PR is ready to have tests run on it label Jan 10, 2025
@thallgren thallgren force-pushed the thallgren/replace-command branch 4 times, most recently from 074f21b to d0d27c8 Compare January 10, 2025 08:24
@thallgren thallgren added the ok to test Applied by maintainers when a PR is ready to have tests run on it label Jan 10, 2025
@github-actions github-actions bot removed the ok to test Applied by maintainers when a PR is ready to have tests run on it label Jan 10, 2025
@thallgren thallgren force-pushed the thallgren/replace-command branch from d0d27c8 to 215d7ff Compare January 10, 2025 10:10
@thallgren thallgren added the ok to test Applied by maintainers when a PR is ready to have tests run on it label Jan 10, 2025
@github-actions github-actions bot removed the ok to test Applied by maintainers when a PR is ready to have tests run on it label Jan 10, 2025
@thallgren thallgren force-pushed the thallgren/replace-command branch from 215d7ff to 198d06a Compare January 10, 2025 10:48
@thallgren thallgren added the ok to test Applied by maintainers when a PR is ready to have tests run on it label Jan 10, 2025
Signed-off-by: Thomas Hallgren <[email protected]>
Let traffic-manager short-circuit DNS requests to itself.

Signed-off-by: Thomas Hallgren <[email protected]>
Signed-off-by: Thomas Hallgren <[email protected]>
The split between the two was for historical reasons. The `intercepts`
map was only capable of storing proto-bufs. Since that's no longer the
case, those two maps can be merged.

Signed-off-by: Thomas Hallgren <[email protected]>
Signed-off-by: Thomas Hallgren <[email protected]>
Also removes the `sessions` map from the traffic-manager's `state`
because it has been made redundant.

Signed-off-by: Thomas Hallgren <[email protected]>
Signed-off-by: Thomas Hallgren <[email protected]>
This build-flag is not enabled by default, but can be used when there
is a desire to build a telepresence client that links the fuseftp
implementation instead of using a remote process via gRPC.

Signed-off-by: Thomas Hallgren <[email protected]>
@thallgren thallgren force-pushed the thallgren/replace-command branch from a008938 to b3d37ba Compare February 6, 2025 08:09
@thallgren thallgren force-pushed the thallgren/replace-command branch from b3d37ba to 5884cfa Compare February 6, 2025 08:33
@thallgren thallgren added the ok to test Applied by maintainers when a PR is ready to have tests run on it label Feb 6, 2025
@github-actions github-actions bot removed the ok to test Applied by maintainers when a PR is ready to have tests run on it label Feb 6, 2025
@thallgren thallgren added the ok to test Applied by maintainers when a PR is ready to have tests run on it label Feb 6, 2025
@github-actions github-actions bot removed the ok to test Applied by maintainers when a PR is ready to have tests run on it label Feb 6, 2025
@thallgren thallgren force-pushed the thallgren/replace-command branch from b5b36a6 to bc23185 Compare February 6, 2025 14:06
@thallgren thallgren added the ok to test Applied by maintainers when a PR is ready to have tests run on it label Feb 6, 2025
@github-actions github-actions bot removed the ok to test Applied by maintainers when a PR is ready to have tests run on it label Feb 6, 2025
@thallgren thallgren force-pushed the thallgren/replace-command branch from bc23185 to da46487 Compare February 6, 2025 15:41
@thallgren thallgren added the ok to test Applied by maintainers when a PR is ready to have tests run on it label Feb 6, 2025
@github-actions github-actions bot removed the ok to test Applied by maintainers when a PR is ready to have tests run on it label Feb 6, 2025
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.

2 participants