Repository: helm/helm (go)

Issue:
Helm3.beta4 - failed to install chart: value of type interface {} is not assignable to type string
We're trying to install a helm chart, but is not working with helm3 (it works with helm2).
```
❯ helm upgrade --install mychart incubator/raw --version 0.1.0 --namespace default --values myvalues.yaml
Release "mychart" does not exist. Installing it now.
Error: template: raw/templates/resources.yaml:4:12: executing "raw/templates/resources.yaml" at <merge . $template>: error calling merge: reflect.Value.MapIndex: value of type interface {} is not assignable to type string
```

Where (updated) `myvalues.yaml` is:
```
resources:
  - apiVersion: v1
    kind: Secret
    type: kubernetes.io/dockerconfigjson
    metadata:
      name: docker-monitoring-release-flb
    stringData:
      .dockerconfigjson: "{\"auths\":{ \"docker2-monitoring-release-local.test.com\":{\"auth\":\"dXNlcjpwYXNzd29yZAo=\"}}}"
```

Chart is here: https://github.com/helm/charts/tree/master/incubator/raw

Output of `helm version`:
```
version.BuildInfo{Version:"v3.0.0-beta.4", GitCommit:"7ffc879f137bd3a69eea53349b01f05e3d1d2385", GitTreeState:"dirty", GoVersion:"go1.13.1"}
```

Output of `kubectl version`:
```
 kubectl version
Client Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.7", GitCommit:"8fca2ec50a6133511b771a11559e24191b1aa2b4", GitTreeState:"clean", BuildDate:"2019-09-18T14:47:22Z", GoVersion:"go1.12.9", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"14+", GitVersion:"v1.14.6-eks-5047ed", GitCommit:"5047edce664593832e9b889e447ac75ab104f527", GitTreeState:"clean", BuildDate:"2019-08-21T22:32:40Z", GoVersion:"go1.12.9", Compiler:"gc", Platform:"linux/amd64"}
```

Cloud Provider/Platform (AKS, GKE, Minikube etc.): 
EKS



Pull request:
fix(v3): fix type error while merging map loaded with `fromYaml` template func
Closes #6626

**What this PR does / why we need it**:

Helm v3 has a regression in merging dicts loaded with the `fromYaml` template function.

In my manual testing, it turned out to be due to that in #6016 we missed migrating helm-specific (non-sprig) template functions to use the new yaml package(sigs.k8s.io/yaml). Perhaps it was intentional? But the inconsistency seems to have broken it anyway.

This changes the import path to that of the new yaml package.

I've manually verified this to work as expecited, fixing the issue described in #6626.

**Special notes for your reviewer**:

**If applicable**:
- [ ] this PR contains documentation
- [x] this PR contains unit tests
- [x] this PR has been tested for backwards compatibility


Patch:
diff --git a/pkg/engine/funcs.go b/pkg/engine/funcs.go
index b80a80412..dac105e74 100644
--- a/pkg/engine/funcs.go
+++ b/pkg/engine/funcs.go
@@ -24,7 +24,7 @@ import (
 
 	"github.com/BurntSushi/toml"
 	"github.com/Masterminds/sprig/v3"
-	yaml "gopkg.in/yaml.v2"
+	"sigs.k8s.io/yaml"
 )
 
 // funcMap returns a mapping of all of the functions that Engine has.


Test patch:
diff --git a/pkg/engine/funcs_test.go b/pkg/engine/funcs_test.go
index 4c2addcee..a94ff257e 100644
--- a/pkg/engine/funcs_test.go
+++ b/pkg/engine/funcs_test.go
@@ -52,7 +52,7 @@ func TestFuncs(t *testing.T) {
 		vars:   map[string]map[string]string{"mast": {"sail": "white"}},
 	}, {
 		tpl:    `{{ fromYaml . }}`,
-		expect: "map[Error:yaml: unmarshal errors:\n  line 1: cannot unmarshal !!seq into map[string]interface {}]",
+		expect: "map[Error:error unmarshaling JSON: while decoding JSON: json: cannot unmarshal array into Go value of type map[string]interface {}]",
 		vars:   "- one\n- two\n",
 	}, {
 		tpl:    `{{ fromJson .}}`,
@@ -62,6 +62,18 @@ func TestFuncs(t *testing.T) {
 		tpl:    `{{ fromJson . }}`,
 		expect: `map[Error:json: cannot unmarshal array into Go value of type map[string]interface {}]`,
 		vars:   `["one", "two"]`,
+	}, {
+		tpl:    `{{ merge .dict (fromYaml .yaml) }}`,
+		expect: `map[a:map[b:c]]`,
+		vars:   map[string]interface{}{"dict": map[string]interface{}{"a": map[string]interface{}{"b": "c"}}, "yaml": `{"a":{"b":"d"}}`},
+	}, {
+		tpl:    `{{ merge (fromYaml .yaml) .dict }}`,
+		expect: `map[a:map[b:d]]`,
+		vars:   map[string]interface{}{"dict": map[string]interface{}{"a": map[string]interface{}{"b": "c"}}, "yaml": `{"a":{"b":"d"}}`},
+	}, {
+		tpl:    `{{ fromYaml . }}`,
+		expect: `map[Error:error unmarshaling JSON: while decoding JSON: json: cannot unmarshal array into Go value of type map[string]interface {}]`,
+		vars:   `["one", "two"]`,
 	}}
 
 	for _, tt := range tests {