Skip to content
New issue

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

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

Already on GitHub? # to your account

feat: multiple docker clusters #8412

Closed
wants to merge 4 commits into from
Closed

feat: multiple docker clusters #8412

wants to merge 4 commits into from

Conversation

dsseng
Copy link
Member

@dsseng dsseng commented Mar 8, 2024

Pull Request

What? (description)

Making talosctl capable of creating multiple Docker clusters in case port forwarding is being used (Docker Desktop or WSL). Currently WIP

Why? (reasoning)

Fixes #8141

Acceptance

Please use the following checklist:

  • you linked an issue (if applicable)
  • you included tests (if applicable)
  • you ran conformance (make conformance)
  • you formatted your code (make fmt)
  • you linted your code (make lint)
  • you generated documentation (make docs)
  • you ran unit-tests (make unit-tests)

See make help for a description of the available targets.

pkg/cluster/kubernetes.go Outdated Show resolved Hide resolved
@smira
Copy link
Member

smira commented Mar 11, 2024

Nit: for this repo, please create a PR from your fork (vs. pushing a branch to this repo).

@@ -85,11 +85,11 @@ func (p *provisioner) GetLoadBalancers(networkReq provision.NetworkRequest) (int
case "darwin", "windows":
return "", "127.0.0.1"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we'd want all of the platforms to return this actually?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unsure, why pollute local ports (also exposing them on 0.0.0.0) without a reason when we can just access those by IP. However a CLI option could by good (if it doesn't pollute opts)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably expose only on the localhost, and making things work same way across platforms makes it easier to test it. We don't have tests running on !Linux, so we won't be testing this code if we don't make it act same way.

dsseng added 4 commits March 20, 2024 20:39
While on non-WSL Linux we can directly access containers' network, enable forwarding for the purpose of testing

Signed-off-by: Dmitry Sharshakov <dmitry.sharshakov@siderolabs.com>
example command to test: _out/talosctl-linux-amd64 cluster create --provisioner=docker --controlplanes 1 --workers 1 --image=127.0.0.1:5005/siderolabs/talos:v1.7.0-alpha.0-69-g1bb6027cc --control-plane-port 7444

Signed-off-by: Dmitry Sharshakov <dmitry.sharshakov@siderolabs.com>
Fixes running in Docker with --control-plane-port

Signed-off-by: Dmitry Sharshakov <dmitry.sharshakov@siderolabs.com>
Almost ready for random ports

Signed-off-by: Dmitry Sharshakov <dmitry.sharshakov@siderolabs.com>
@smira
Copy link
Member

smira commented Mar 20, 2024

Nit: for this repo, please create a PR from your fork (vs. pushing a branch to this repo).

please re-create it from the fork, thanks!

@smira
Copy link
Member

smira commented Mar 20, 2024

/ok-to-test

@dsseng
Copy link
Member Author

dsseng commented Mar 20, 2024

please re-create it from the fork, thanks!

Alright, will do now. Currently docker cluster startup fails for some reason, troubleshooting

@dsseng dsseng closed this Mar 20, 2024
@smira smira mentioned this pull request Mar 21, 2024
@smira smira deleted the multiple-docker-clusters branch October 23, 2024 10:24
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Suport multiple clusters in single machine when using talos in docker
3 participants