Move all the remainder module out of experimental.

All the experimental modules were moved to pkg/action

Signed-off-by: David Peraza <dperaza@redhat.com>
pull/10546/head
David Peraza 4 years ago
parent 9f869c6b21
commit 7cab1a09e3

@ -23,7 +23,6 @@ import (
"github.com/spf13/cobra" "github.com/spf13/cobra"
"helm.sh/helm/v3/cmd/helm/require" "helm.sh/helm/v3/cmd/helm/require"
experimental "helm.sh/helm/v3/internal/experimental/action"
"helm.sh/helm/v3/pkg/action" "helm.sh/helm/v3/pkg/action"
) )
@ -35,7 +34,7 @@ it will also be uploaded.
` `
func newPushCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { 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{ cmd := &cobra.Command{
Use: "push [chart] [remote]", Use: "push [chart] [remote]",

@ -29,7 +29,6 @@ import (
"github.com/spf13/cobra" "github.com/spf13/cobra"
"helm.sh/helm/v3/cmd/helm/require" "helm.sh/helm/v3/cmd/helm/require"
experimental "helm.sh/helm/v3/internal/experimental/action"
"helm.sh/helm/v3/pkg/action" "helm.sh/helm/v3/pkg/action"
) )
@ -54,7 +53,7 @@ func newRegistryLoginCmd(cfg *action.Configuration, out io.Writer) *cobra.Comman
return err return err
} }
return experimental.NewRegistryLogin(cfg).Run(out, hostname, username, password, insecureOpt) return action.NewRegistryLogin(cfg).Run(out, hostname, username, password, insecureOpt)
}, },
} }

@ -22,7 +22,6 @@ import (
"github.com/spf13/cobra" "github.com/spf13/cobra"
"helm.sh/helm/v3/cmd/helm/require" "helm.sh/helm/v3/cmd/helm/require"
experimental "helm.sh/helm/v3/internal/experimental/action"
"helm.sh/helm/v3/pkg/action" "helm.sh/helm/v3/pkg/action"
) )
@ -38,7 +37,7 @@ func newRegistryLogoutCmd(cfg *action.Configuration, out io.Writer) *cobra.Comma
Args: require.MinimumNArgs(1), Args: require.MinimumNArgs(1),
RunE: func(cmd *cobra.Command, args []string) error { RunE: func(cmd *cobra.Command, args []string) error {
hostname := args[0] hostname := args[0]
return experimental.NewRegistryLogout(cfg).Run(out, hostname) return action.NewRegistryLogout(cfg).Run(out, hostname)
}, },
} }
} }

@ -19,9 +19,8 @@ package action
import ( import (
"strings" "strings"
"helm.sh/helm/v3/internal/experimental/pusher" "helm.sh/helm/v3/pkg/action/pusher"
"helm.sh/helm/v3/internal/experimental/uploader" "helm.sh/helm/v3/pkg/action/uploader"
"helm.sh/helm/v3/pkg/action"
"helm.sh/helm/v3/pkg/cli" "helm.sh/helm/v3/pkg/cli"
"helm.sh/helm/v3/pkg/registry" "helm.sh/helm/v3/pkg/registry"
) )
@ -31,14 +30,14 @@ import (
// It provides the implementation of 'helm push'. // It provides the implementation of 'helm push'.
type Push struct { type Push struct {
Settings *cli.EnvSettings Settings *cli.EnvSettings
cfg *action.Configuration cfg *Configuration
} }
// PushOpt is a type of function that sets options for a push action. // PushOpt is a type of function that sets options for a push action.
type PushOpt func(*Push) type PushOpt func(*Push)
// WithPushConfig sets the cfg field on the push configuration object. // 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) { return func(p *Push) {
p.cfg = cfg p.cfg = cfg
} }

@ -19,17 +19,16 @@ package action
import ( import (
"io" "io"
"helm.sh/helm/v3/pkg/action"
"helm.sh/helm/v3/pkg/registry" "helm.sh/helm/v3/pkg/registry"
) )
// RegistryLogin performs a registry login operation. // RegistryLogin performs a registry login operation.
type RegistryLogin struct { type RegistryLogin struct {
cfg *action.Configuration cfg *Configuration
} }
// NewRegistryLogin creates a new RegistryLogin object with the given configuration. // NewRegistryLogin creates a new RegistryLogin object with the given configuration.
func NewRegistryLogin(cfg *action.Configuration) *RegistryLogin { func NewRegistryLogin(cfg *Configuration) *RegistryLogin {
return &RegistryLogin{ return &RegistryLogin{
cfg: cfg, cfg: cfg,
} }

@ -18,17 +18,15 @@ package action
import ( import (
"io" "io"
"helm.sh/helm/v3/pkg/action"
) )
// RegistryLogout performs a registry login operation. // RegistryLogout performs a registry login operation.
type RegistryLogout struct { type RegistryLogout struct {
cfg *action.Configuration cfg *Configuration
} }
// NewRegistryLogout creates a new RegistryLogout object with the given configuration. // NewRegistryLogout creates a new RegistryLogout object with the given configuration.
func NewRegistryLogout(cfg *action.Configuration) *RegistryLogout { func NewRegistryLogout(cfg *Configuration) *RegistryLogout {
return &RegistryLogout{ return &RegistryLogout{
cfg: cfg, cfg: cfg,
} }

@ -22,7 +22,7 @@ import (
"github.com/pkg/errors" "github.com/pkg/errors"
"helm.sh/helm/v3/internal/experimental/pusher" "helm.sh/helm/v3/pkg/action/pusher"
"helm.sh/helm/v3/pkg/registry" "helm.sh/helm/v3/pkg/registry"
) )
Loading…
Cancel
Save