mirror of https://github.com/helm/helm.git
Move repo package to versioned directory
The repo package is internally versioned at v1. Repos were designed to be versioned. This change moves it to a versioned directory the same way other packages are now being handled. Signed-off-by: Matt Farina <matt.farina@suse.com>
This commit is contained in:
parent
6f957f4922
commit
52267ee74b
|
@ -33,7 +33,7 @@ import (
|
||||||
"helm.sh/helm/v4/pkg/helmpath"
|
"helm.sh/helm/v4/pkg/helmpath"
|
||||||
"helm.sh/helm/v4/pkg/provenance"
|
"helm.sh/helm/v4/pkg/provenance"
|
||||||
"helm.sh/helm/v4/pkg/registry"
|
"helm.sh/helm/v4/pkg/registry"
|
||||||
"helm.sh/helm/v4/pkg/repo"
|
"helm.sh/helm/v4/pkg/repo/v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Resolver resolves dependencies from semantic version ranges to a particular version.
|
// Resolver resolves dependencies from semantic version ranges to a particular version.
|
||||||
|
|
|
@ -52,7 +52,7 @@ import (
|
||||||
"helm.sh/helm/v4/pkg/registry"
|
"helm.sh/helm/v4/pkg/registry"
|
||||||
release "helm.sh/helm/v4/pkg/release/v1"
|
release "helm.sh/helm/v4/pkg/release/v1"
|
||||||
releaseutil "helm.sh/helm/v4/pkg/release/v1/util"
|
releaseutil "helm.sh/helm/v4/pkg/release/v1/util"
|
||||||
"helm.sh/helm/v4/pkg/repo"
|
"helm.sh/helm/v4/pkg/repo/v1"
|
||||||
"helm.sh/helm/v4/pkg/storage"
|
"helm.sh/helm/v4/pkg/storage"
|
||||||
"helm.sh/helm/v4/pkg/storage/driver"
|
"helm.sh/helm/v4/pkg/storage/driver"
|
||||||
)
|
)
|
||||||
|
|
|
@ -27,7 +27,7 @@ import (
|
||||||
"helm.sh/helm/v4/pkg/downloader"
|
"helm.sh/helm/v4/pkg/downloader"
|
||||||
"helm.sh/helm/v4/pkg/getter"
|
"helm.sh/helm/v4/pkg/getter"
|
||||||
"helm.sh/helm/v4/pkg/registry"
|
"helm.sh/helm/v4/pkg/registry"
|
||||||
"helm.sh/helm/v4/pkg/repo"
|
"helm.sh/helm/v4/pkg/repo/v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Pull is the action for checking a given release's information.
|
// Pull is the action for checking a given release's information.
|
||||||
|
|
|
@ -24,8 +24,8 @@ import (
|
||||||
|
|
||||||
chartutil "helm.sh/helm/v4/pkg/chart/v2/util"
|
chartutil "helm.sh/helm/v4/pkg/chart/v2/util"
|
||||||
"helm.sh/helm/v4/pkg/provenance"
|
"helm.sh/helm/v4/pkg/provenance"
|
||||||
"helm.sh/helm/v4/pkg/repo"
|
"helm.sh/helm/v4/pkg/repo/v1"
|
||||||
"helm.sh/helm/v4/pkg/repo/repotest"
|
"helm.sh/helm/v4/pkg/repo/v1/repotest"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestDependencyBuildCmd(t *testing.T) {
|
func TestDependencyBuildCmd(t *testing.T) {
|
||||||
|
|
|
@ -29,8 +29,8 @@ import (
|
||||||
chartutil "helm.sh/helm/v4/pkg/chart/v2/util"
|
chartutil "helm.sh/helm/v4/pkg/chart/v2/util"
|
||||||
"helm.sh/helm/v4/pkg/helmpath"
|
"helm.sh/helm/v4/pkg/helmpath"
|
||||||
"helm.sh/helm/v4/pkg/provenance"
|
"helm.sh/helm/v4/pkg/provenance"
|
||||||
"helm.sh/helm/v4/pkg/repo"
|
"helm.sh/helm/v4/pkg/repo/v1"
|
||||||
"helm.sh/helm/v4/pkg/repo/repotest"
|
"helm.sh/helm/v4/pkg/repo/v1/repotest"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestDependencyUpdateCmd(t *testing.T) {
|
func TestDependencyUpdateCmd(t *testing.T) {
|
||||||
|
|
|
@ -37,7 +37,7 @@ import (
|
||||||
"helm.sh/helm/v4/pkg/helmpath"
|
"helm.sh/helm/v4/pkg/helmpath"
|
||||||
"helm.sh/helm/v4/pkg/kube"
|
"helm.sh/helm/v4/pkg/kube"
|
||||||
"helm.sh/helm/v4/pkg/postrenderer"
|
"helm.sh/helm/v4/pkg/postrenderer"
|
||||||
"helm.sh/helm/v4/pkg/repo"
|
"helm.sh/helm/v4/pkg/repo/v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -23,7 +23,7 @@ import (
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"helm.sh/helm/v4/pkg/repo/repotest"
|
"helm.sh/helm/v4/pkg/repo/v1/repotest"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestInstall(t *testing.T) {
|
func TestInstall(t *testing.T) {
|
||||||
|
|
|
@ -24,7 +24,7 @@ import (
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"helm.sh/helm/v4/pkg/repo/repotest"
|
"helm.sh/helm/v4/pkg/repo/v1/repotest"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestPullCmd(t *testing.T) {
|
func TestPullCmd(t *testing.T) {
|
||||||
|
|
|
@ -34,7 +34,7 @@ import (
|
||||||
|
|
||||||
"helm.sh/helm/v4/pkg/cmd/require"
|
"helm.sh/helm/v4/pkg/cmd/require"
|
||||||
"helm.sh/helm/v4/pkg/getter"
|
"helm.sh/helm/v4/pkg/getter"
|
||||||
"helm.sh/helm/v4/pkg/repo"
|
"helm.sh/helm/v4/pkg/repo/v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Repositories that have been permanently deleted and no longer work
|
// Repositories that have been permanently deleted and no longer work
|
||||||
|
|
|
@ -31,8 +31,8 @@ import (
|
||||||
|
|
||||||
"helm.sh/helm/v4/pkg/helmpath"
|
"helm.sh/helm/v4/pkg/helmpath"
|
||||||
"helm.sh/helm/v4/pkg/helmpath/xdg"
|
"helm.sh/helm/v4/pkg/helmpath/xdg"
|
||||||
"helm.sh/helm/v4/pkg/repo"
|
"helm.sh/helm/v4/pkg/repo/v1"
|
||||||
"helm.sh/helm/v4/pkg/repo/repotest"
|
"helm.sh/helm/v4/pkg/repo/v1/repotest"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestRepoAddCmd(t *testing.T) {
|
func TestRepoAddCmd(t *testing.T) {
|
||||||
|
|
|
@ -27,7 +27,7 @@ import (
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
"helm.sh/helm/v4/pkg/cmd/require"
|
"helm.sh/helm/v4/pkg/cmd/require"
|
||||||
"helm.sh/helm/v4/pkg/repo"
|
"helm.sh/helm/v4/pkg/repo/v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
const repoIndexDesc = `
|
const repoIndexDesc = `
|
||||||
|
|
|
@ -24,7 +24,7 @@ import (
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"helm.sh/helm/v4/pkg/repo"
|
"helm.sh/helm/v4/pkg/repo/v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestRepoIndexCmd(t *testing.T) {
|
func TestRepoIndexCmd(t *testing.T) {
|
||||||
|
|
|
@ -25,7 +25,7 @@ import (
|
||||||
|
|
||||||
"helm.sh/helm/v4/pkg/cli/output"
|
"helm.sh/helm/v4/pkg/cli/output"
|
||||||
"helm.sh/helm/v4/pkg/cmd/require"
|
"helm.sh/helm/v4/pkg/cmd/require"
|
||||||
"helm.sh/helm/v4/pkg/repo"
|
"helm.sh/helm/v4/pkg/repo/v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newRepoListCmd(out io.Writer) *cobra.Command {
|
func newRepoListCmd(out io.Writer) *cobra.Command {
|
||||||
|
|
|
@ -28,7 +28,7 @@ import (
|
||||||
|
|
||||||
"helm.sh/helm/v4/pkg/cmd/require"
|
"helm.sh/helm/v4/pkg/cmd/require"
|
||||||
"helm.sh/helm/v4/pkg/helmpath"
|
"helm.sh/helm/v4/pkg/helmpath"
|
||||||
"helm.sh/helm/v4/pkg/repo"
|
"helm.sh/helm/v4/pkg/repo/v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
type repoRemoveOptions struct {
|
type repoRemoveOptions struct {
|
||||||
|
|
|
@ -25,8 +25,8 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"helm.sh/helm/v4/pkg/helmpath"
|
"helm.sh/helm/v4/pkg/helmpath"
|
||||||
"helm.sh/helm/v4/pkg/repo"
|
"helm.sh/helm/v4/pkg/repo/v1"
|
||||||
"helm.sh/helm/v4/pkg/repo/repotest"
|
"helm.sh/helm/v4/pkg/repo/v1/repotest"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestRepoRemove(t *testing.T) {
|
func TestRepoRemove(t *testing.T) {
|
||||||
|
|
|
@ -28,7 +28,7 @@ import (
|
||||||
|
|
||||||
"helm.sh/helm/v4/pkg/cmd/require"
|
"helm.sh/helm/v4/pkg/cmd/require"
|
||||||
"helm.sh/helm/v4/pkg/getter"
|
"helm.sh/helm/v4/pkg/getter"
|
||||||
"helm.sh/helm/v4/pkg/repo"
|
"helm.sh/helm/v4/pkg/repo/v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
const updateDesc = `
|
const updateDesc = `
|
||||||
|
|
|
@ -26,8 +26,8 @@ import (
|
||||||
|
|
||||||
"helm.sh/helm/v4/internal/test/ensure"
|
"helm.sh/helm/v4/internal/test/ensure"
|
||||||
"helm.sh/helm/v4/pkg/getter"
|
"helm.sh/helm/v4/pkg/getter"
|
||||||
"helm.sh/helm/v4/pkg/repo"
|
"helm.sh/helm/v4/pkg/repo/v1"
|
||||||
"helm.sh/helm/v4/pkg/repo/repotest"
|
"helm.sh/helm/v4/pkg/repo/v1/repotest"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestUpdateCmd(t *testing.T) {
|
func TestUpdateCmd(t *testing.T) {
|
||||||
|
|
|
@ -40,7 +40,7 @@ import (
|
||||||
kubefake "helm.sh/helm/v4/pkg/kube/fake"
|
kubefake "helm.sh/helm/v4/pkg/kube/fake"
|
||||||
"helm.sh/helm/v4/pkg/registry"
|
"helm.sh/helm/v4/pkg/registry"
|
||||||
release "helm.sh/helm/v4/pkg/release/v1"
|
release "helm.sh/helm/v4/pkg/release/v1"
|
||||||
"helm.sh/helm/v4/pkg/repo"
|
"helm.sh/helm/v4/pkg/repo/v1"
|
||||||
"helm.sh/helm/v4/pkg/storage/driver"
|
"helm.sh/helm/v4/pkg/storage/driver"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ import (
|
||||||
|
|
||||||
"github.com/Masterminds/semver/v3"
|
"github.com/Masterminds/semver/v3"
|
||||||
|
|
||||||
"helm.sh/helm/v4/pkg/repo"
|
"helm.sh/helm/v4/pkg/repo/v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Result is a search result.
|
// Result is a search result.
|
||||||
|
|
|
@ -21,7 +21,7 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
chart "helm.sh/helm/v4/pkg/chart/v2"
|
chart "helm.sh/helm/v4/pkg/chart/v2"
|
||||||
"helm.sh/helm/v4/pkg/repo"
|
"helm.sh/helm/v4/pkg/repo/v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestSortScore(t *testing.T) {
|
func TestSortScore(t *testing.T) {
|
||||||
|
|
|
@ -34,7 +34,7 @@ import (
|
||||||
"helm.sh/helm/v4/pkg/cli/output"
|
"helm.sh/helm/v4/pkg/cli/output"
|
||||||
"helm.sh/helm/v4/pkg/cmd/search"
|
"helm.sh/helm/v4/pkg/cmd/search"
|
||||||
"helm.sh/helm/v4/pkg/helmpath"
|
"helm.sh/helm/v4/pkg/helmpath"
|
||||||
"helm.sh/helm/v4/pkg/repo"
|
"helm.sh/helm/v4/pkg/repo/v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
const searchRepoDesc = `
|
const searchRepoDesc = `
|
||||||
|
|
|
@ -22,7 +22,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"helm.sh/helm/v4/pkg/repo/repotest"
|
"helm.sh/helm/v4/pkg/repo/v1/repotest"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestShowPreReleaseChart(t *testing.T) {
|
func TestShowPreReleaseChart(t *testing.T) {
|
||||||
|
|
|
@ -36,7 +36,7 @@ import (
|
||||||
"helm.sh/helm/v4/pkg/helmpath"
|
"helm.sh/helm/v4/pkg/helmpath"
|
||||||
"helm.sh/helm/v4/pkg/provenance"
|
"helm.sh/helm/v4/pkg/provenance"
|
||||||
"helm.sh/helm/v4/pkg/registry"
|
"helm.sh/helm/v4/pkg/registry"
|
||||||
"helm.sh/helm/v4/pkg/repo"
|
"helm.sh/helm/v4/pkg/repo/v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
// VerificationStrategy describes a strategy for determining whether to verify a chart.
|
// VerificationStrategy describes a strategy for determining whether to verify a chart.
|
||||||
|
|
|
@ -28,8 +28,8 @@ import (
|
||||||
"helm.sh/helm/v4/pkg/cli"
|
"helm.sh/helm/v4/pkg/cli"
|
||||||
"helm.sh/helm/v4/pkg/getter"
|
"helm.sh/helm/v4/pkg/getter"
|
||||||
"helm.sh/helm/v4/pkg/registry"
|
"helm.sh/helm/v4/pkg/registry"
|
||||||
"helm.sh/helm/v4/pkg/repo"
|
"helm.sh/helm/v4/pkg/repo/v1"
|
||||||
"helm.sh/helm/v4/pkg/repo/repotest"
|
"helm.sh/helm/v4/pkg/repo/v1/repotest"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -42,7 +42,7 @@ import (
|
||||||
"helm.sh/helm/v4/pkg/getter"
|
"helm.sh/helm/v4/pkg/getter"
|
||||||
"helm.sh/helm/v4/pkg/helmpath"
|
"helm.sh/helm/v4/pkg/helmpath"
|
||||||
"helm.sh/helm/v4/pkg/registry"
|
"helm.sh/helm/v4/pkg/registry"
|
||||||
"helm.sh/helm/v4/pkg/repo"
|
"helm.sh/helm/v4/pkg/repo/v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ErrRepoNotFound indicates that chart repositories can't be found in local repo cache.
|
// ErrRepoNotFound indicates that chart repositories can't be found in local repo cache.
|
||||||
|
|
|
@ -32,8 +32,8 @@ import (
|
||||||
"helm.sh/helm/v4/pkg/chart/v2/loader"
|
"helm.sh/helm/v4/pkg/chart/v2/loader"
|
||||||
chartutil "helm.sh/helm/v4/pkg/chart/v2/util"
|
chartutil "helm.sh/helm/v4/pkg/chart/v2/util"
|
||||||
"helm.sh/helm/v4/pkg/getter"
|
"helm.sh/helm/v4/pkg/getter"
|
||||||
"helm.sh/helm/v4/pkg/repo"
|
"helm.sh/helm/v4/pkg/repo/v1"
|
||||||
"helm.sh/helm/v4/pkg/repo/repotest"
|
"helm.sh/helm/v4/pkg/repo/v1/repotest"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestVersionEquals(t *testing.T) {
|
func TestVersionEquals(t *testing.T) {
|
||||||
|
|
|
@ -231,7 +231,7 @@ func testPush(suite *TestSuite) {
|
||||||
suite.NotNil(err, "error pushing non-chart bytes")
|
suite.NotNil(err, "error pushing non-chart bytes")
|
||||||
|
|
||||||
// Load a test chart
|
// Load a test chart
|
||||||
chartData, err := os.ReadFile("../repo/repotest/testdata/examplechart-0.1.0.tgz")
|
chartData, err := os.ReadFile("../repo/v1/repotest/testdata/examplechart-0.1.0.tgz")
|
||||||
suite.Nil(err, "no error loading test chart")
|
suite.Nil(err, "no error loading test chart")
|
||||||
meta, err := extractChartMeta(chartData)
|
meta, err := extractChartMeta(chartData)
|
||||||
suite.Nil(err, "no error extracting chart meta")
|
suite.Nil(err, "no error extracting chart meta")
|
||||||
|
|
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package repo // import "helm.sh/helm/v4/pkg/repo"
|
package repo // import "helm.sh/helm/v4/pkg/repo/v1"
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"crypto/rand"
|
"crypto/rand"
|
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package repo // import "helm.sh/helm/v4/pkg/repo"
|
package repo // import "helm.sh/helm/v4/pkg/repo/v1"
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
|
@ -37,7 +37,7 @@ import (
|
||||||
"helm.sh/helm/v4/pkg/chart/v2/loader"
|
"helm.sh/helm/v4/pkg/chart/v2/loader"
|
||||||
chartutil "helm.sh/helm/v4/pkg/chart/v2/util"
|
chartutil "helm.sh/helm/v4/pkg/chart/v2/util"
|
||||||
ociRegistry "helm.sh/helm/v4/pkg/registry"
|
ociRegistry "helm.sh/helm/v4/pkg/registry"
|
||||||
"helm.sh/helm/v4/pkg/repo"
|
"helm.sh/helm/v4/pkg/repo/v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
func BasicAuthMiddleware(t *testing.T) http.HandlerFunc {
|
func BasicAuthMiddleware(t *testing.T) http.HandlerFunc {
|
|
@ -25,7 +25,7 @@ import (
|
||||||
"sigs.k8s.io/yaml"
|
"sigs.k8s.io/yaml"
|
||||||
|
|
||||||
"helm.sh/helm/v4/internal/test/ensure"
|
"helm.sh/helm/v4/internal/test/ensure"
|
||||||
"helm.sh/helm/v4/pkg/repo"
|
"helm.sh/helm/v4/pkg/repo/v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Young'n, in these here parts, we test our tests.
|
// Young'n, in these here parts, we test our tests.
|
||||||
|
@ -113,7 +113,7 @@ func TestNewTempServer(t *testing.T) {
|
||||||
"tls": {
|
"tls": {
|
||||||
options: []ServerOption{
|
options: []ServerOption{
|
||||||
WithChartSourceGlob("testdata/examplechart-0.1.0.tgz"),
|
WithChartSourceGlob("testdata/examplechart-0.1.0.tgz"),
|
||||||
WithTLSConfig(MakeTestTLSConfig(t, "../../../testdata")),
|
WithTLSConfig(MakeTestTLSConfig(t, "../../../../testdata")),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -212,7 +212,7 @@ func TestNewTempServer_TLS(t *testing.T) {
|
||||||
srv := NewTempServer(
|
srv := NewTempServer(
|
||||||
t,
|
t,
|
||||||
WithChartSourceGlob("testdata/examplechart-0.1.0.tgz"),
|
WithChartSourceGlob("testdata/examplechart-0.1.0.tgz"),
|
||||||
WithTLSConfig(MakeTestTLSConfig(t, "../../../testdata")),
|
WithTLSConfig(MakeTestTLSConfig(t, "../../../../testdata")),
|
||||||
)
|
)
|
||||||
defer srv.Stop()
|
defer srv.Stop()
|
||||||
|
|
Loading…
Reference in New Issue