Moving chartutil to chart/util

chartutil was originally created to operate on protobufs which are
no longer part of Helm. The util package makes more sense to be
part of the chart package.

This change is part of the HIP 20 to create v3 charts and
explicitly call out v2 charts. The changes for this are in smaller
bite size changes.

Signed-off-by: Matt Farina <matt.farina@suse.com>
pull/30567/head
Matt Farina 7 months ago
parent a780fa60ed
commit 5c0deec327
No known key found for this signature in database
GPG Key ID: 92C44A3D421FF7F9

@ -65,8 +65,8 @@ K8S_MODULES_MINOR_VER=$(word 2,$(K8S_MODULES_VER))
LDFLAGS += -X helm.sh/helm/v4/pkg/lint/rules.k8sVersionMajor=$(K8S_MODULES_MAJOR_VER)
LDFLAGS += -X helm.sh/helm/v4/pkg/lint/rules.k8sVersionMinor=$(K8S_MODULES_MINOR_VER)
LDFLAGS += -X helm.sh/helm/v4/pkg/chartutil.k8sVersionMajor=$(K8S_MODULES_MAJOR_VER)
LDFLAGS += -X helm.sh/helm/v4/pkg/chartutil.k8sVersionMinor=$(K8S_MODULES_MINOR_VER)
LDFLAGS += -X helm.sh/helm/v4/pkg/chart/util.k8sVersionMajor=$(K8S_MODULES_MAJOR_VER)
LDFLAGS += -X helm.sh/helm/v4/pkg/chart/util.k8sVersionMinor=$(K8S_MODULES_MINOR_VER)
.PHONY: all
all: build

@ -25,7 +25,7 @@ import (
"helm.sh/helm/v4/cmd/helm/require"
"helm.sh/helm/v4/pkg/chart"
"helm.sh/helm/v4/pkg/chartutil"
chartutil "helm.sh/helm/v4/pkg/chart/util"
"helm.sh/helm/v4/pkg/helmpath"
)

@ -25,7 +25,7 @@ import (
"helm.sh/helm/v4/internal/test/ensure"
"helm.sh/helm/v4/pkg/chart"
"helm.sh/helm/v4/pkg/chart/loader"
"helm.sh/helm/v4/pkg/chartutil"
chartutil "helm.sh/helm/v4/pkg/chart/util"
"helm.sh/helm/v4/pkg/helmpath"
)

@ -22,7 +22,7 @@ import (
"strings"
"testing"
"helm.sh/helm/v4/pkg/chartutil"
chartutil "helm.sh/helm/v4/pkg/chart/util"
"helm.sh/helm/v4/pkg/provenance"
"helm.sh/helm/v4/pkg/repo"
"helm.sh/helm/v4/pkg/repo/repotest"

@ -24,7 +24,7 @@ import (
"helm.sh/helm/v4/internal/test/ensure"
"helm.sh/helm/v4/pkg/chart"
"helm.sh/helm/v4/pkg/chartutil"
chartutil "helm.sh/helm/v4/pkg/chart/util"
"helm.sh/helm/v4/pkg/helmpath"
"helm.sh/helm/v4/pkg/provenance"
"helm.sh/helm/v4/pkg/repo"

@ -30,7 +30,7 @@ import (
"helm.sh/helm/v4/internal/test"
"helm.sh/helm/v4/pkg/action"
"helm.sh/helm/v4/pkg/chartutil"
chartutil "helm.sh/helm/v4/pkg/chart/util"
"helm.sh/helm/v4/pkg/cli"
kubefake "helm.sh/helm/v4/pkg/kube/fake"
"helm.sh/helm/v4/pkg/release"

@ -27,7 +27,7 @@ import (
"github.com/spf13/cobra"
"helm.sh/helm/v4/pkg/action"
"helm.sh/helm/v4/pkg/chartutil"
chartutil "helm.sh/helm/v4/pkg/chart/util"
"helm.sh/helm/v4/pkg/cli/values"
"helm.sh/helm/v4/pkg/getter"
"helm.sh/helm/v4/pkg/lint/support"

@ -30,7 +30,7 @@ import (
"helm.sh/helm/v4/cmd/helm/require"
"helm.sh/helm/v4/pkg/action"
"helm.sh/helm/v4/pkg/chartutil"
chartutil "helm.sh/helm/v4/pkg/chart/util"
"helm.sh/helm/v4/pkg/cli/output"
"helm.sh/helm/v4/pkg/release"
)

@ -34,7 +34,7 @@ import (
"helm.sh/helm/v4/cmd/helm/require"
"helm.sh/helm/v4/pkg/action"
"helm.sh/helm/v4/pkg/chartutil"
chartutil "helm.sh/helm/v4/pkg/chart/util"
"helm.sh/helm/v4/pkg/cli/values"
"helm.sh/helm/v4/pkg/releaseutil"
)

@ -26,7 +26,7 @@ import (
"helm.sh/helm/v4/pkg/chart"
"helm.sh/helm/v4/pkg/chart/loader"
"helm.sh/helm/v4/pkg/chartutil"
chartutil "helm.sh/helm/v4/pkg/chart/util"
"helm.sh/helm/v4/pkg/release"
)

@ -33,7 +33,7 @@ import (
"k8s.io/client-go/rest"
"helm.sh/helm/v4/pkg/chart"
"helm.sh/helm/v4/pkg/chartutil"
chartutil "helm.sh/helm/v4/pkg/chart/util"
"helm.sh/helm/v4/pkg/engine"
"helm.sh/helm/v4/pkg/kube"
"helm.sh/helm/v4/pkg/postrender"

@ -25,7 +25,7 @@ import (
fakeclientset "k8s.io/client-go/kubernetes/fake"
"helm.sh/helm/v4/pkg/chart"
"helm.sh/helm/v4/pkg/chartutil"
chartutil "helm.sh/helm/v4/pkg/chart/util"
kubefake "helm.sh/helm/v4/pkg/kube/fake"
"helm.sh/helm/v4/pkg/registry"
"helm.sh/helm/v4/pkg/release"

@ -26,7 +26,7 @@ import (
"helm.sh/helm/v4/internal/test"
"helm.sh/helm/v4/pkg/chart"
"helm.sh/helm/v4/pkg/chartutil"
chartutil "helm.sh/helm/v4/pkg/chart/util"
)
func TestList(t *testing.T) {

@ -17,7 +17,7 @@ limitations under the License.
package action
import (
"helm.sh/helm/v4/pkg/chartutil"
chartutil "helm.sh/helm/v4/pkg/chart/util"
)
// GetValues is the action for checking a given release's values.

@ -19,7 +19,7 @@ package action
import (
"github.com/pkg/errors"
"helm.sh/helm/v4/pkg/chartutil"
chartutil "helm.sh/helm/v4/pkg/chart/util"
"helm.sh/helm/v4/pkg/release"
)

@ -40,7 +40,7 @@ import (
"sigs.k8s.io/yaml"
"helm.sh/helm/v4/pkg/chart"
"helm.sh/helm/v4/pkg/chartutil"
chartutil "helm.sh/helm/v4/pkg/chart/util"
"helm.sh/helm/v4/pkg/cli"
"helm.sh/helm/v4/pkg/downloader"
"helm.sh/helm/v4/pkg/getter"

@ -33,7 +33,7 @@ import (
"helm.sh/helm/v4/internal/test"
"helm.sh/helm/v4/pkg/chart"
"helm.sh/helm/v4/pkg/chartutil"
chartutil "helm.sh/helm/v4/pkg/chart/util"
kubefake "helm.sh/helm/v4/pkg/kube/fake"
"helm.sh/helm/v4/pkg/release"
"helm.sh/helm/v4/pkg/storage/driver"

@ -23,7 +23,7 @@ import (
"github.com/pkg/errors"
"helm.sh/helm/v4/pkg/chartutil"
chartutil "helm.sh/helm/v4/pkg/chart/util"
"helm.sh/helm/v4/pkg/lint"
"helm.sh/helm/v4/pkg/lint/support"
)

@ -27,7 +27,7 @@ import (
"golang.org/x/term"
"helm.sh/helm/v4/pkg/chart/loader"
"helm.sh/helm/v4/pkg/chartutil"
chartutil "helm.sh/helm/v4/pkg/chart/util"
"helm.sh/helm/v4/pkg/provenance"
)

@ -24,7 +24,7 @@ import (
"github.com/pkg/errors"
"helm.sh/helm/v4/pkg/chartutil"
chartutil "helm.sh/helm/v4/pkg/chart/util"
"helm.sh/helm/v4/pkg/cli"
"helm.sh/helm/v4/pkg/downloader"
"helm.sh/helm/v4/pkg/getter"

@ -27,7 +27,7 @@ import (
"github.com/pkg/errors"
v1 "k8s.io/api/core/v1"
"helm.sh/helm/v4/pkg/chartutil"
chartutil "helm.sh/helm/v4/pkg/chart/util"
"helm.sh/helm/v4/pkg/release"
)

@ -24,7 +24,7 @@ import (
"github.com/pkg/errors"
"helm.sh/helm/v4/pkg/chartutil"
chartutil "helm.sh/helm/v4/pkg/chart/util"
"helm.sh/helm/v4/pkg/release"
helmtime "helm.sh/helm/v4/pkg/time"
)

@ -27,7 +27,7 @@ import (
"helm.sh/helm/v4/pkg/chart"
"helm.sh/helm/v4/pkg/chart/loader"
"helm.sh/helm/v4/pkg/chartutil"
chartutil "helm.sh/helm/v4/pkg/chart/util"
"helm.sh/helm/v4/pkg/registry"
)

@ -24,7 +24,7 @@ import (
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"helm.sh/helm/v4/pkg/chartutil"
chartutil "helm.sh/helm/v4/pkg/chart/util"
"helm.sh/helm/v4/pkg/kube"
"helm.sh/helm/v4/pkg/release"
"helm.sh/helm/v4/pkg/releaseutil"

@ -29,7 +29,7 @@ import (
"k8s.io/cli-runtime/pkg/resource"
"helm.sh/helm/v4/pkg/chart"
"helm.sh/helm/v4/pkg/chartutil"
chartutil "helm.sh/helm/v4/pkg/chart/util"
"helm.sh/helm/v4/pkg/kube"
"helm.sh/helm/v4/pkg/postrender"
"helm.sh/helm/v4/pkg/registry"

@ -13,7 +13,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
package chartutil
package util
import (
"fmt"

@ -13,7 +13,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
package chartutil
package util
import (
"testing"

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
package chartutil
package util
import (
"os"

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
package chartutil
package util
import (
"testing"

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
package chartutil
package util
import (
"fmt"

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
package chartutil
package util
import (
"encoding/json"

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
package chartutil
package util
import "github.com/Masterminds/semver/v3"

@ -15,7 +15,7 @@ limitations under the License.
*/
// Package version represents the current version of the project.
package chartutil
package util
import "testing"

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
package chartutil
package util
import (
"fmt"

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
package chartutil
package util
import (
"bytes"

@ -13,7 +13,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
package chartutil
package util
import (
"log"

@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package chartutil
package util
import (
"encoding/json"

@ -15,7 +15,7 @@ limitations under the License.
*/
/*
Package chartutil contains tools for working with charts.
package util contains tools for working with charts.
Charts are described in the chart package (pkg/chart).
This package provides utilities for serializing and deserializing charts.
@ -42,4 +42,4 @@ into a Chart.
When creating charts in memory, use the 'helm.sh/helm/pkg/chart'
package directly.
*/
package chartutil // import "helm.sh/helm/v4/pkg/chartutil"
package util // import chartutil "helm.sh/helm/v4/pkg/chart/util"

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
package chartutil
package util
import (
"fmt"

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
package chartutil
package util
import (
"testing"

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
package chartutil
package util
import (
"io"

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
package chartutil
package util
import (
"os"

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
package chartutil
package util
import (
"bytes"

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
package chartutil
package util
import (
"os"

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
package chartutil
package util
import (
"archive/tar"

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
package chartutil
package util
import (
"archive/tar"

Before

Width:  |  Height:  |  Size: 374 B

After

Width:  |  Height:  |  Size: 374 B

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save