Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

Commit

Permalink
Move all the remainder module out of experimental.
Browse files Browse the repository at this point in the history
All the experimental modules were moved to pkg/action

Signed-off-by: David Peraza <dperaza@redhat.com>
  • Loading branch information
dperaza4dustbit committed Jan 13, 2022
1 parent 9f869c6 commit 7cab1a0
Show file tree
Hide file tree
Showing 13 changed files with 12 additions and 19 deletions.
3 changes: 1 addition & 2 deletions cmd/helm/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import (
"github.com/spf13/cobra"

"helm.sh/helm/v3/cmd/helm/require"
experimental "helm.sh/helm/v3/internal/experimental/action"
"helm.sh/helm/v3/pkg/action"
)

Expand All @@ -35,7 +34,7 @@ it will also be uploaded.
`

func newPushCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
client := experimental.NewPushWithOpts(experimental.WithPushConfig(cfg))
client := action.NewPushWithOpts(action.WithPushConfig(cfg))

cmd := &cobra.Command{
Use: "push [chart] [remote]",
Expand Down
3 changes: 1 addition & 2 deletions cmd/helm/registry_login.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import (
"github.com/spf13/cobra"

"helm.sh/helm/v3/cmd/helm/require"
experimental "helm.sh/helm/v3/internal/experimental/action"
"helm.sh/helm/v3/pkg/action"
)

Expand All @@ -54,7 +53,7 @@ func newRegistryLoginCmd(cfg *action.Configuration, out io.Writer) *cobra.Comman
return err
}

return experimental.NewRegistryLogin(cfg).Run(out, hostname, username, password, insecureOpt)
return action.NewRegistryLogin(cfg).Run(out, hostname, username, password, insecureOpt)
},
}

Expand Down
3 changes: 1 addition & 2 deletions cmd/helm/registry_logout.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import (
"github.com/spf13/cobra"

"helm.sh/helm/v3/cmd/helm/require"
experimental "helm.sh/helm/v3/internal/experimental/action"
"helm.sh/helm/v3/pkg/action"
)

Expand All @@ -38,7 +37,7 @@ func newRegistryLogoutCmd(cfg *action.Configuration, out io.Writer) *cobra.Comma
Args: require.MinimumNArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
hostname := args[0]
return experimental.NewRegistryLogout(cfg).Run(out, hostname)
return action.NewRegistryLogout(cfg).Run(out, hostname)
},
}
}
9 changes: 4 additions & 5 deletions internal/experimental/action/push.go → pkg/action/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@ package action
import (
"strings"

"helm.sh/helm/v3/internal/experimental/pusher"
"helm.sh/helm/v3/internal/experimental/uploader"
"helm.sh/helm/v3/pkg/action"
"helm.sh/helm/v3/pkg/action/pusher"
"helm.sh/helm/v3/pkg/action/uploader"
"helm.sh/helm/v3/pkg/cli"
"helm.sh/helm/v3/pkg/registry"
)
Expand All @@ -31,14 +30,14 @@ import (
// It provides the implementation of 'helm push'.
type Push struct {
Settings *cli.EnvSettings
cfg *action.Configuration
cfg *Configuration
}

// PushOpt is a type of function that sets options for a push action.
type PushOpt func(*Push)

// WithPushConfig sets the cfg field on the push configuration object.
func WithPushConfig(cfg *action.Configuration) PushOpt {
func WithPushConfig(cfg *Configuration) PushOpt {
return func(p *Push) {
p.cfg = cfg
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,16 @@ package action
import (
"io"

"helm.sh/helm/v3/pkg/action"
"helm.sh/helm/v3/pkg/registry"
)

// RegistryLogin performs a registry login operation.
type RegistryLogin struct {
cfg *action.Configuration
cfg *Configuration
}

// NewRegistryLogin creates a new RegistryLogin object with the given configuration.
func NewRegistryLogin(cfg *action.Configuration) *RegistryLogin {
func NewRegistryLogin(cfg *Configuration) *RegistryLogin {
return &RegistryLogin{
cfg: cfg,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,15 @@ package action

import (
"io"

"helm.sh/helm/v3/pkg/action"
)

// RegistryLogout performs a registry login operation.
type RegistryLogout struct {
cfg *action.Configuration
cfg *Configuration
}

// NewRegistryLogout creates a new RegistryLogout object with the given configuration.
func NewRegistryLogout(cfg *action.Configuration) *RegistryLogout {
func NewRegistryLogout(cfg *Configuration) *RegistryLogout {
return &RegistryLogout{
cfg: cfg,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (

"github.com/pkg/errors"

"helm.sh/helm/v3/internal/experimental/pusher"
"helm.sh/helm/v3/pkg/action/pusher"
"helm.sh/helm/v3/pkg/registry"
)

Expand Down
File renamed without changes.

0 comments on commit 7cab1a0

Please sign in to comment.