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

Better discovery of local container-based clusters (kind or minikube). #3165

Merged
merged 2 commits into from
May 8, 2023

Conversation

thallgren
Copy link
Member

Description

When using telepresence connect --docker in combination with a kubeconfig that points to a cluster that runs in a container on the local host, that kubeconfig must be modified to instead point to a docker internal address:port, and the network that makes that address available must be added to the Telepresence daemon container.

This commit improves the discovery of such configuration so that less assumpions are made regarding container names and port numbers. Instead, the discovery looks at some well-known labels and uses the docker configurations port bindings to figure out how a port on the host maps to a port in the container.

Closes #3155

Checklist

  • I made sure to update ./CHANGELOG.md.
  • I made sure to add any docs changes required for my change (including release notes).
  • My change is adequately tested.
  • I updated DEVELOPING.md with any any special dev tricks I had to use to work on this code efficiently.
  • I updated TELEMETRY.md if I added, changed, or removed a metric name.
  • Once my PR is ready to have integration tests ran, I posted the PR in #telepresence-dev in the datawire-oss slack so that the "ok to test" label can be applied.

When using `telepresence connect --docker` in combination with a
kubeconfig that points to a cluster that runs in a container on the
local host, that kubeconfig must be modified to instead point to a
docker internal address:port, and the network that makes that address
available must be added to the Telepresence daemon container.

This commit improves the discovery of such configuration so that less
assumpions are made regarding container names and port numbers. Instead,
the discovery looks at some well-known labels and uses the docker
configurations port bindings to figure out how a port on the host maps
to a port in the container.

Closes #3155

Signed-off-by: Thomas Hallgren <thomas@datawire.io>
@thallgren thallgren added the ok to test Applied by maintainers when a PR is ready to have tests run on it label May 8, 2023
@thallgren thallgren requested review from a team and njayp and removed request for a team May 8, 2023 10:11
@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 May 8, 2023
@thallgren thallgren self-assigned this May 8, 2023
@knlambert knlambert requested review from a team and josecv and removed request for a team and njayp May 8, 2023 14:10
Signed-off-by: Thomas Hallgren <thomas@datawire.io>
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.

Cannot connect to cluster with telepresence docker extension
2 participants