|
@@ -30,12 +30,14 @@ import (
|
|
|
"github.com/docker/compose-cli/api/context/store"
|
|
"github.com/docker/compose-cli/api/context/store"
|
|
|
"github.com/docker/compose-cli/api/errdefs"
|
|
"github.com/docker/compose-cli/api/errdefs"
|
|
|
"github.com/docker/compose-cli/api/progress"
|
|
"github.com/docker/compose-cli/api/progress"
|
|
|
|
|
+ "github.com/docker/compose-cli/kube/client"
|
|
|
"github.com/docker/compose-cli/kube/helm"
|
|
"github.com/docker/compose-cli/kube/helm"
|
|
|
"github.com/docker/compose-cli/kube/resources"
|
|
"github.com/docker/compose-cli/kube/resources"
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
type composeService struct {
|
|
type composeService struct {
|
|
|
- sdk *helm.Actions
|
|
|
|
|
|
|
+ sdk *helm.Actions
|
|
|
|
|
+ client *client.KubeClient
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// NewComposeService create a kubernetes implementation of the compose.Service API
|
|
// NewComposeService create a kubernetes implementation of the compose.Service API
|
|
@@ -52,11 +54,14 @@ func NewComposeService(ctx context.Context) (compose.Service, error) {
|
|
|
return nil, err
|
|
return nil, err
|
|
|
}
|
|
}
|
|
|
actions, err := helm.NewActions(config)
|
|
actions, err := helm.NewActions(config)
|
|
|
|
|
+ apiClient, err := client.NewKubeClient(config)
|
|
|
if err != nil {
|
|
if err != nil {
|
|
|
return nil, err
|
|
return nil, err
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
return &composeService{
|
|
return &composeService{
|
|
|
- sdk: actions,
|
|
|
|
|
|
|
+ sdk: actions,
|
|
|
|
|
+ client: apiClient,
|
|
|
}, nil
|
|
}, nil
|
|
|
}
|
|
}
|
|
|
|
|
|