docker / docker/buildx

Allow specifying context for kubernetes driver

Open
#2,069 0 comments 8 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/driver/kubernetes kind/enhancement status/triage
Dominant language
Go
Stars
4.5k
Forks
682
Avg merge
2d 14h
Merged PRs (30d)
29

Description

Description

Currently the kubernetes driver searches for the builder deployments in the namespace in the current context.

Instead it should support looking for the deployments in a named context.

This would allow a use case where the current context is the application context, and a different context can be used strictly for builders.

For example we can do it by specifying the context name in the kuberenetes endpoint like so

kubernetes://context-name/kube?deployment=builder-amd64\u0026kubeconfig=

Or in the driver options

"DriverOpts":{"context":"context-name","namespace":"buildkit","nodeselector":"kubernetes.io/arch=arm64"}

EDIT: I know that I can specify a separate config file which will only contain the builder context, but I rather use the default config with all my contexts, currently that is the workaround that I use.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the Kubernetes driver handling for the kubernetes:// endpoint and DriverOpts, then trace how the current context is selected for builder deployments. Compare both proposed context forms and verify that a named builder context can be used while the application context remains current. Done means the named context works with the existing namespace, node selector, and kubeconfig options.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
devops
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.