@@ -14,6 +14,7 @@ import (
1414 "github.com/loft-sh/devspace/pkg/devspace/deploy"
1515 "github.com/loft-sh/devspace/pkg/devspace/dev"
1616 "github.com/loft-sh/devspace/pkg/devspace/devpod"
17+ "github.com/loft-sh/devspace/pkg/devspace/kubectl"
1718 fakekube "github.com/loft-sh/devspace/pkg/devspace/kubectl/testing"
1819 "github.com/loft-sh/devspace/pkg/devspace/pipeline"
1920 "github.com/loft-sh/devspace/pkg/devspace/pipeline/types"
@@ -151,10 +152,10 @@ func (cmd *DeployCmd) runCommand(ctx *devspacecontext.Context, f factory.Factory
151152 },
152153 DependencyOptions : types.DependencyOptions {
153154 Exclude : cmd .SkipDependency ,
155+ Only : cmd .Dependency ,
154156 },
155157 },
156158 ConfigOptions : configOptions ,
157- Only : cmd .Dependency ,
158159 Pipeline : cmd .Pipeline ,
159160 })
160161}
@@ -212,7 +213,7 @@ func prepare(ctx context.Context, f factory.Factory, configOptions *loader.Confi
212213
213214 // If the current kube context or namespace is different than old,
214215 // show warnings and reset kube client if necessary
215- client , err = client .CheckKubeContext (localCache , globalFlags .NoWarn , log )
216+ client , err = kubectl .CheckKubeContext (client , localCache , globalFlags .NoWarn , log )
216217 if err != nil {
217218 return nil , err
218219 }
@@ -233,7 +234,6 @@ type PipelineOptions struct {
233234 types.Options
234235
235236 ConfigOptions * loader.ConfigOptions
236- Only []string
237237 Pipeline string
238238 ShowUI bool
239239 UIPort int
@@ -242,7 +242,7 @@ type PipelineOptions struct {
242242func runPipeline (ctx * devspacecontext.Context , f factory.Factory , forceLeader bool , options * PipelineOptions ) error {
243243 // create namespace if necessary
244244 if ! options .DeployOptions .Render {
245- err := ctx . KubeClient . EnsureNamespace (ctx .Context , ctx .KubeClient .Namespace (), ctx .Log )
245+ err := kubectl . EnsureNamespace (ctx .Context , ctx . KubeClient , ctx .KubeClient .Namespace (), ctx .Log )
246246 if err != nil {
247247 return errors .Errorf ("unable to create namespace: %v" , err )
248248 }
@@ -255,10 +255,7 @@ func runPipeline(ctx *devspacecontext.Context, f factory.Factory, forceLeader bo
255255 }
256256
257257 // resolve dependencies
258- dependencies , err := f .NewDependencyManager (ctx , options .ConfigOptions ).ResolveAll (ctx , dependency.ResolveOptions {
259- SkipDependencies : options .DependencyOptions .Exclude ,
260- Dependencies : options .Only ,
261- })
258+ dependencies , err := f .NewDependencyManager (ctx , options .ConfigOptions ).ResolveAll (ctx , dependency.ResolveOptions {})
262259 if err != nil {
263260 return errors .Wrap (err , "deploy dependencies" )
264261 }
0 commit comments