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

should list real pod nodes when all drivers are kubernetes #477

Merged
merged 1 commit into from
Jan 4, 2021

Conversation

morlay
Copy link
Collaborator

@morlay morlay commented Dec 15, 2020

refactor to remove the strange len(ngi.drivers) == 1, and to check kubernetes driver first

When create builder with different drivers (not matter contains kubernetes driver or not), should list node with endpoint

$ docker buildx create --use --name=buildkit --platform=linux/amd64 --node=local
$ docker buildx create --append --name=buildkit  --platform=linux/arm64 --node=buildkit-arm64 --driver=kubernetes

$ docker buildx inspect buildkit                                
Name:   buildkit
Driver: kubernetes

Nodes:
Name:      buildkit-amd64
Endpoint:  unix:///var/run/docker.sock
Status:    running
Platforms: linux/amd64*, linux/386

Name:      buildkit-arm64
Endpoint:  kubernetes://buildkit?deployment=buildkit-arm64
Status:    running
Platforms: linux/arm64*, linux/amd64, linux/386

When create builder with kubernetes drivers, should list all pods as nodes

$ docker buildx create --use --name=buildkit --platform=linux/amd64 --node=buildkit-amd64 --driver=kubernetes
$ docker buildx create --append --name=buildkit --platform=linux/arm64 --node=buildkit-amd64 --driver=kubernetes

$ docker buildx inspect buildkit
Name:   buildkit
Driver: kubernetes

Nodes:
Name:      buildkit-amd64-85fdfc4898-knqjc
Endpoint:  
Status:    running
Platforms: linux/amd64*, linux/arm64

Name:      buildkit-amd64-85fdfc4898-x9k24
Endpoint:  
Status:    running
Platforms: linux/amd64*, linux/arm64

Name:      buildkit-arm64-bd86845f4-fhzhf
Endpoint:  
Status:    running
Platforms: linux/arm64*, linux/amd64, linux/386

Name:      buildkit-arm64-bd86845f4-vt8qp
Endpoint:  
Status:    running
Platforms: linux/arm64*, linux/amd64, linux/386

Signed-off-by: Wang morlay.null@gmail.com

cc @tonistiigi

Signed-off-by: Wang <morlay.null@gmail.com>
Copy link
Collaborator

@tiborvass tiborvass left a comment

Choose a reason for hiding this comment

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

looks good from a code perspective but didn't test it.

@AkihiroSuda
Copy link
Collaborator

Isn't this too much verbose? Can we make this optional?

@morlay
Copy link
Collaborator Author

morlay commented Dec 17, 2020

Isn't this too much verbose? Can we make this optional?

list pod when --debug? but this change the behavhior, not sure does it make sense.
pod is the real node.

@tonistiigi tonistiigi merged commit dcbe4b3 into docker:master Jan 4, 2021
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.

4 participants