Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

Commit

Permalink
cli/cmd/cluster: use local componentConfig() instead of components.Get()
Browse files Browse the repository at this point in the history
As a next step of not using globals and init() functions across our
code.

Refs #992

Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
  • Loading branch information
invidian committed Dec 2, 2020
1 parent 259f954 commit a32721e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cli/cmd/cluster/component-delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func componentNamesToObjects(componentNames []string) ([]components.Component, e
c := []components.Component{}

for _, componentName := range componentNames {
component, err := components.Get(componentName)
component, err := componentConfig(componentName)
if err != nil {
return nil, fmt.Errorf("getting component %q: %w", componentName, err)
}
Expand Down
3 changes: 1 addition & 2 deletions cli/cmd/cluster/component-render-manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import (

log "github.com/sirupsen/logrus"

"github.com/kinvolk/lokomotive/pkg/components"
"github.com/kinvolk/lokomotive/pkg/config"
)

Expand Down Expand Up @@ -57,7 +56,7 @@ func renderComponentManifests(lokoConfig *config.Config, componentNames []string
"component": componentName,
})

component, err := components.Get(componentName)
component, err := componentConfig(componentName)
if err != nil {
return fmt.Errorf("getting component %q: %w", componentName, err)
}
Expand Down

0 comments on commit a32721e

Please sign in to comment.