diff --git a/pkg/chart/v2/util/create.go b/pkg/chart/v2/util/create.go index 149d9f456..0330055e4 100644 --- a/pkg/chart/v2/util/create.go +++ b/pkg/chart/v2/util/create.go @@ -54,8 +54,8 @@ const ( IgnorefileName = ".helmignore" // IngressFileName is the name of the example ingress file. IngressFileName = TemplatesDir + sep + "ingress.yaml" - // HttpRouteFileName is the name of the example HTTPRoute file. - HttpRouteFileName = TemplatesDir + sep + "httproute.yaml" + // HTTPRouteFileName is the name of the example HTTPRoute file. + HTTPRouteFileName = TemplatesDir + sep + "httproute.yaml" // DeploymentName is the name of the example deployment file. DeploymentName = TemplatesDir + sep + "deployment.yaml" // ServiceName is the name of the example service file. @@ -335,7 +335,7 @@ spec: {{- end }} ` -const defaultHttpRoute = `{{- if .Values.httpRoute.enabled -}} +const defaultHTTPRoute = `{{- if .Values.httpRoute.enabled -}} {{- $fullName := include ".fullname" . -}} {{- $svcPort := .Values.service.port -}} {{- if .Capabilities.APIVersions.Has "gateway.networking.k8s.io/v1" -}} @@ -755,8 +755,8 @@ func Create(name, dir string) (string, error) { }, { // httproute.yaml - path: filepath.Join(cdir, HttpRouteFileName), - content: transform(defaultHttpRoute, name), + path: filepath.Join(cdir, HTTPRouteFileName), + content: transform(defaultHTTPRoute, name), }, { // deployment.yaml diff --git a/pkg/cmd/create_test.go b/pkg/cmd/create_test.go index bfdf3db5a..26eabbfc3 100644 --- a/pkg/cmd/create_test.go +++ b/pkg/cmd/create_test.go @@ -105,7 +105,7 @@ func TestCreateStarterCmd(t *testing.T) { t.Errorf("Wrong API version: %q", c.Metadata.APIVersion) } - expectedNumberOfTemplates := 9 + expectedNumberOfTemplates := 10 if l := len(c.Templates); l != expectedNumberOfTemplates { t.Errorf("Expected %d templates, got %d", expectedNumberOfTemplates, l) } @@ -173,7 +173,7 @@ func TestCreateStarterAbsoluteCmd(t *testing.T) { t.Errorf("Wrong API version: %q", c.Metadata.APIVersion) } - expectedNumberOfTemplates := 9 + expectedNumberOfTemplates := 10 if l := len(c.Templates); l != expectedNumberOfTemplates { t.Errorf("Expected %d templates, got %d", expectedNumberOfTemplates, l) }