Error when configuring `gitlab.webservice.service.loadBalancerSourceRanges` and `gitlab.webservice.service.type`
Summary
On the helm chart 4.8.0, we added the feature to change the service type of the webservice deployment.
However, one of our customers encountered an error when setting the following values:
gitlab:
webservice:
service:
loadBalancerSourceRanges:
- 10.0.0.0/8
type: LoadBalancer
Error: template: gitlab/charts/gitlab/charts/webservice/templates/service.yaml:2:4: executing "gitlab/charts/gitlab/charts/webservice/templates/service.yaml" at <include "webservice.datamodel.prepare" $>: error calling include: template: gitlab/charts/gitlab/charts/webservice/templates/_datamodel.tpl:17:22: executing "webservice.datamodel.prepare" at <$blank.ingress>: wrong type for value; expected map[string]interface {}; got interface {}
Steps to reproduce
- Add this in your
values.yamlfile:
gitlab:
webservice:
service:
loadBalancerSourceRanges:
- 10.0.0.0/8
type: LoadBalancer
- Run
helm template --values values.yaml --version 4.8.0 gitlab/gitlab- This also happens on the latest version of the Helm chart
Configuration used
gitlab:
webservice:
service:
loadBalancerSourceRanges:
- 10.0.0.0/8
type: LoadBalancer
Current behavior
Failing with an error:
Error: template: gitlab/charts/gitlab/charts/webservice/templates/service.yaml:2:4: executing "gitlab/charts/gitlab/charts/webservice/templates/service.yaml" at <include "webservice.datamodel.prepare" $>: error calling include: template: gitlab/charts/gitlab/charts/webservice/templates/_datamodel.tpl:17:22: executing "webservice.datamodel.prepare" at <$blank.ingress>: wrong type for value; expected map[string]interface {}; got interface {}
Expected behavior
Should be successfully installed.
Versions
- Chart: 4.8.0 (and later) (Fixed in 4.10.0)
Relevant logs
Error: template: gitlab/charts/gitlab/charts/webservice/templates/service.yaml:2:4: executing "gitlab/charts/gitlab/charts/webservice/templates/service.yaml" at <include "webservice.datamodel.prepare" $>: error calling include: template: gitlab/charts/gitlab/charts/webservice/templates/_datamodel.tpl:17:22: executing "webservice.datamodel.prepare" at <$blank.ingress>: wrong type for value; expected map[string]interface {}; got interface {}
Edited by Jason Plum