Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions cmd/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import (
"github.com/covexo/devspace/pkg/util/tar"
"github.com/covexo/devspace/pkg/util/yamlutil"

helmClient "github.com/covexo/devspace/pkg/devspace/clients/helm"
"github.com/covexo/devspace/pkg/devspace/clients/kubectl"
"github.com/covexo/devspace/pkg/devspace/config/configutil"
"github.com/covexo/devspace/pkg/devspace/config/v1"
helmClient "github.com/covexo/devspace/pkg/devspace/deploy/helm"
"github.com/covexo/devspace/pkg/devspace/kubectl"
"github.com/covexo/devspace/pkg/util/log"
"github.com/russross/blackfriday"
"github.com/skratchdot/open-golang/open"
Expand Down Expand Up @@ -309,7 +309,7 @@ func (cmd *AddCmd) showReadme(chartVersion *repo.ChartVersion) {

// RunAddSync executes the add sync command logic
func (cmd *AddCmd) RunAddSync(cobraCmd *cobra.Command, args []string) {
config := configutil.GetConfig(false)
config := configutil.GetConfig()

if cmd.syncFlags.Selector == "" {
cmd.syncFlags.Selector = "release=" + *config.DevSpace.Release.Name
Expand Down Expand Up @@ -345,7 +345,7 @@ func (cmd *AddCmd) RunAddSync(cobraCmd *cobra.Command, args []string) {
}

syncConfig := append(*config.DevSpace.Sync, &v1.SyncConfig{
ResourceType: configutil.String(cmd.syncFlags.ResourceType),
ResourceType: nil,
LabelSelector: &labelSelectorMap,
ContainerPath: configutil.String(cmd.syncFlags.ContainerPath),
LocalSubPath: configutil.String(cmd.syncFlags.LocalPath),
Expand All @@ -362,7 +362,7 @@ func (cmd *AddCmd) RunAddSync(cobraCmd *cobra.Command, args []string) {

// RunAddPort executes the add port command logic
func (cmd *AddCmd) RunAddPort(cobraCmd *cobra.Command, args []string) {
config := configutil.GetConfig(false)
config := configutil.GetConfig()

if cmd.portFlags.Selector == "" {
cmd.portFlags.Selector = "release=" + *config.DevSpace.Release.Name
Expand Down Expand Up @@ -390,7 +390,7 @@ func (cmd *AddCmd) RunAddPort(cobraCmd *cobra.Command, args []string) {
}

func (cmd *AddCmd) insertOrReplacePortMapping(labelSelectorMap map[string]*string, portMappings []*v1.PortMapping) {
config := configutil.GetConfig(false)
config := configutil.GetConfig()

// Check if we should add to existing port mapping
for _, v := range *config.DevSpace.PortForwarding {
Expand All @@ -411,7 +411,7 @@ func (cmd *AddCmd) insertOrReplacePortMapping(labelSelectorMap map[string]*strin
}
}
portMap := append(*config.DevSpace.PortForwarding, &v1.PortForwardingConfig{
ResourceType: configutil.String(cmd.portFlags.ResourceType),
ResourceType: nil,
LabelSelector: &labelSelectorMap,
PortMappings: &portMappings,
})
Expand Down
7 changes: 3 additions & 4 deletions cmd/down.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package cmd

import (
helmClient "github.com/covexo/devspace/pkg/devspace/clients/helm"
"github.com/covexo/devspace/pkg/devspace/clients/kubectl"
"github.com/covexo/devspace/pkg/devspace/config/configutil"
helmClient "github.com/covexo/devspace/pkg/devspace/deploy/helm"
"github.com/covexo/devspace/pkg/devspace/kubectl"
"github.com/covexo/devspace/pkg/util/log"

"github.com/spf13/cobra"
Expand Down Expand Up @@ -43,8 +43,7 @@ your project, use: devspace reset
// Run executes the down command logic
func (cmd *DownCmd) Run(cobraCmd *cobra.Command, args []string) {
log.StartFileLogging()

config := configutil.GetConfig(false)
config := configutil.GetConfig()

releaseName := *config.DevSpace.Release.Name
kubectl, err := kubectl.NewClient()
Expand Down
8 changes: 4 additions & 4 deletions cmd/enter.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package cmd

import (
helmClient "github.com/covexo/devspace/pkg/devspace/clients/helm"
"github.com/covexo/devspace/pkg/devspace/clients/kubectl"
"github.com/covexo/devspace/pkg/devspace/config/configutil"
helmClient "github.com/covexo/devspace/pkg/devspace/deploy/helm"
"github.com/covexo/devspace/pkg/devspace/kubectl"
"github.com/covexo/devspace/pkg/util/log"
"github.com/spf13/cobra"
k8sv1 "k8s.io/api/core/v1"
Expand All @@ -14,7 +14,7 @@ import (
// EnterCmd is a struct that defines a command call for "enter"
type EnterCmd struct {
flags *EnterCmdFlags
helm *helmClient.HelmClientWrapper
helm *helmClient.ClientWrapper
kubectl *kubernetes.Clientset
pod *k8sv1.Pod
}
Expand Down Expand Up @@ -80,7 +80,7 @@ func (cmd *EnterCmd) Run(cobraCmd *cobra.Command, args []string) {

func enterTerminal(client *kubernetes.Clientset, pod *k8sv1.Pod, containerNameOverride string, args []string) {
var command []string
config := configutil.GetConfig(false)
config := configutil.GetConfig()

if len(args) == 0 && (config.DevSpace.Terminal.Command == nil || len(*config.DevSpace.Terminal.Command) == 0) {
command = []string{
Expand Down
Loading