From f58e8d70f2b27fa3b30d3c45819ecdf894c64535 Mon Sep 17 00:00:00 2001 From: akuitybot <105087302+akuitybot@users.noreply.github.com> Date: Wed, 2 Oct 2024 10:46:59 -0700 Subject: [PATCH] chore(backport release-0.9): fix(directives): require release name for `helm-template` (#2631) Co-authored-by: Hidde Beydals --- internal/directives/schemas/helm-template-config.json | 5 +++-- internal/directives/zz_config_types.go | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/internal/directives/schemas/helm-template-config.json b/internal/directives/schemas/helm-template-config.json index 17c4e9ba5..69aecdfe2 100644 --- a/internal/directives/schemas/helm-template-config.json +++ b/internal/directives/schemas/helm-template-config.json @@ -3,7 +3,7 @@ "title": "HelmTemplateConfig", "type": "object", "additionalProperties": false, - "required": ["path", "outPath"], + "required": ["outPath", "path", "releaseName"], "properties": { "path": { "type": "string", @@ -17,7 +17,8 @@ }, "releaseName": { "type": "string", - "description": "ReleaseName to use for the rendered manifests." + "description": "ReleaseName to use for the rendered manifests.", + "minLength": 1 }, "useReleaseName": { "type": "boolean", diff --git a/internal/directives/zz_config_types.go b/internal/directives/zz_config_types.go index 5e27ba694..207822ae7 100644 --- a/internal/directives/zz_config_types.go +++ b/internal/directives/zz_config_types.go @@ -236,7 +236,7 @@ type HelmTemplateConfig struct { // Path at which the Helm chart can be found. Path string `json:"path"` // ReleaseName to use for the rendered manifests. - ReleaseName string `json:"releaseName,omitempty"` + ReleaseName string `json:"releaseName"` // Whether to skip tests when rendering the manifests. SkipTests bool `json:"skipTests,omitempty"` // Whether to use the release name in the output path (instead of the chart name). This only