diff --git a/cmd/helm/push.go b/cmd/helm/push.go index a239a43c75d..ed5d1699ac7 100644 --- a/cmd/helm/push.go +++ b/cmd/helm/push.go @@ -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" ) @@ -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]", diff --git a/cmd/helm/registry_login.go b/cmd/helm/registry_login.go index 9418ff6f139..84f9f27b5e8 100644 --- a/cmd/helm/registry_login.go +++ b/cmd/helm/registry_login.go @@ -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" ) @@ -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) }, } diff --git a/cmd/helm/registry_logout.go b/cmd/helm/registry_logout.go index fcdd9f10282..8d6a54d974b 100644 --- a/cmd/helm/registry_logout.go +++ b/cmd/helm/registry_logout.go @@ -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" ) @@ -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) }, } } diff --git a/internal/experimental/action/push.go b/pkg/action/push.go similarity index 88% rename from internal/experimental/action/push.go rename to pkg/action/push.go index 9a7fbedd5f2..134abe99a91 100644 --- a/internal/experimental/action/push.go +++ b/pkg/action/push.go @@ -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" ) @@ -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 } diff --git a/internal/experimental/pusher/doc.go b/pkg/action/pusher/doc.go similarity index 100% rename from internal/experimental/pusher/doc.go rename to pkg/action/pusher/doc.go diff --git a/internal/experimental/pusher/ocipusher.go b/pkg/action/pusher/ocipusher.go similarity index 100% rename from internal/experimental/pusher/ocipusher.go rename to pkg/action/pusher/ocipusher.go diff --git a/internal/experimental/pusher/ocipusher_test.go b/pkg/action/pusher/ocipusher_test.go similarity index 100% rename from internal/experimental/pusher/ocipusher_test.go rename to pkg/action/pusher/ocipusher_test.go diff --git a/internal/experimental/pusher/pusher.go b/pkg/action/pusher/pusher.go similarity index 100% rename from internal/experimental/pusher/pusher.go rename to pkg/action/pusher/pusher.go diff --git a/internal/experimental/pusher/pusher_test.go b/pkg/action/pusher/pusher_test.go similarity index 100% rename from internal/experimental/pusher/pusher_test.go rename to pkg/action/pusher/pusher_test.go diff --git a/internal/experimental/action/registry_login.go b/pkg/action/registry_login.go similarity index 90% rename from internal/experimental/action/registry_login.go rename to pkg/action/registry_login.go index 966c03380dc..68bcc7442fc 100644 --- a/internal/experimental/action/registry_login.go +++ b/pkg/action/registry_login.go @@ -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, } diff --git a/internal/experimental/action/registry_logout.go b/pkg/action/registry_logout.go similarity index 88% rename from internal/experimental/action/registry_logout.go rename to pkg/action/registry_logout.go index 039515c7eaf..69add4163de 100644 --- a/internal/experimental/action/registry_logout.go +++ b/pkg/action/registry_logout.go @@ -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, } diff --git a/internal/experimental/uploader/chart_uploader.go b/pkg/action/uploader/chart_uploader.go similarity index 97% rename from internal/experimental/uploader/chart_uploader.go rename to pkg/action/uploader/chart_uploader.go index e8edd94a9f8..8152b263b35 100644 --- a/internal/experimental/uploader/chart_uploader.go +++ b/pkg/action/uploader/chart_uploader.go @@ -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" ) diff --git a/internal/experimental/uploader/doc.go b/pkg/action/uploader/doc.go similarity index 100% rename from internal/experimental/uploader/doc.go rename to pkg/action/uploader/doc.go