builder: move kube config handling to k8s driver package

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2024-07-16 23:18:40 +02:00
parent 4304d388ef
commit acf0216292
6 changed files with 105 additions and 102 deletions

View File

@ -38,7 +38,8 @@ const (
type Driver struct {
driver.InitConfig
factory driver.Factory
factory driver.Factory
clientConfig ClientConfig
// if you add fields, remember to update docs:
// https://github.com/docker/docs/blob/main/content/build/drivers/kubernetes.md
@ -198,7 +199,7 @@ func (d *Driver) Rm(ctx context.Context, force, rmVolume, rmDaemon bool) error {
func (d *Driver) Dial(ctx context.Context) (net.Conn, error) {
restClient := d.clientset.CoreV1().RESTClient()
restClientConfig, err := d.KubeClientConfig.ClientConfig()
restClientConfig, err := d.clientConfig.ClientConfig()
if err != nil {
return nil, err
}