[KAS] Helm 3.7.0 fails to render with `global.kas.enabled=true`
Summary
Helm 3.7.0
seems to render an error when generating a template with global.kas.enabled
:
$ ~/.asdf/installs/helm/3.7.0/bin/helm template gitlab . -f .build/test.values.yaml
Error: template: gitlab/charts/gitlab/charts/webservice/templates/deployment.yaml:54:28: executing "gitlab/charts/gitlab/charts/webservice/templates/deployment.yaml" at <include (print $.Template.BasePath "/configmap.yml") $>: error calling include: template: gitlab/charts/gitlab/charts/webservice/templates/configmap.yml:121:10: executing "gitlab/charts/gitlab/charts/webservice/templates/configmap.yml" at <include "gitlab.appConfig.kas" .>: error calling include: template: gitlab/charts/gitlab/templates/_gitlab.yaml.tpl:35:19: executing "gitlab.appConfig.kas" at <include "gitlab.appConfig.kas.internalUrl" .>: error calling include: template: gitlab/charts/gitlab/templates/_kas.tpl:47:24: executing "gitlab.appConfig.kas.internalUrl" at <.Values.global.kas.service.apiExternalPort>: nil pointer evaluating interface {}.apiExternalPort
Use --debug flag to render out invalid YAML
emplate: gitlab/charts/gitlab/templates/_kas.tpl:47:24: executing "gitlab.appConfig.kas.internalUrl" at <.Values.global.kas.service.apiExternalPort>: nil pointer evaluating interface {}.apiExternalPort
So it's unable to reference global.kas.service.apiExternalPort
from gitlab/charts/gitlab/charts/webservice/templates/configmap
, which makes sense because the only place that a default value for apiExternalPort
is set in charts/gitlab/charts/kas/values.yaml
.
Therefore, the template appears to work given the following diff:
diff --git a/values.yaml b/values.yaml
index 70b033aa5..408b09c95 100644
--- a/values.yaml
+++ b/values.yaml
@@ -487,6 +487,8 @@ global:
## https://docs.gitlab.com/charts/charts/gitlab/kas/
kas:
enabled: false
+ service:
+ apiExternalPort: 8153
## https://docs.gitlab.com/charts/charts/globals#configure-gitlab-shell
shell: