Skip to content

Fix calls to extraEnvFrom template

Mitchell Nielsen requested to merge 5161-fix-calls-to-extraenvfrom into master

What does this MR do?

Fix calls to extraEnvFrom

Fixes calls to extraEnvFrom by passing in the current context '.' instead of an empty dictionary 'dict'.

Changelog: fixed

Related issues

Closes #5161

Author checklist

See Definition of done.

For anything in this list which will not be completed, please provide a reason in the MR discussion.

Required

  • Merge Request Title and Description are up to date, accurate, and descriptive
  • MR targeting the appropriate branch
  • MR has a green pipeline on GitLab.com
  • When ready for review, follow the instructions in the "Reviewer Roulette" section of the Danger Bot MR comment, as per the Distribution experimental MR workflow

For merge requests from forks, consider the following options for Danger to work properly:

Expected (please provide an explanation if not completing)

  • Test plan indicating conditions for success has been posted and passes: all tests pass in CI
  • Documentation created/updated
  • Tests added/updated
  • Integration tests added to GitLab QA
  • Equivalent MR/issue for omnibus-gitlab opened
  • Equivalent MR/issue for Gitlab Operator project opened (see Operator documentation on impact of Charts changes)
  • Validate potential values for new configuration settings. Formats such as integer 10, duration 10s, URI scheme://user:passwd@host:port may require quotation or other special handling when rendered in a template and written to a configuration file.

Test plan

Confirm that the specs_without_cluster jobs that include extraEnvFrom tests pass:

Worth noting: click below to see the current calls to extraEnvFrom on master. You'll see that the correct form is implemented in the components that have tests. The rest that have it wrong do not have associated tests, which explains why the tests are all passing on master without this fix.

Click to expand current calls to extraEnvFrom template
$ rg 'include "gitlab.extraEnvFrom"'
templates/_certificates.tpl:15:7:  {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" (dict)) | nindent 2 }}
charts/registry/templates/migrations-job.yaml:60:13:        {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" (dict)) | nindent 8 }}
charts/registry/templates/migrations-job.yaml:82:13:        {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" (dict)) | nindent 8 }}
charts/registry/templates/deployment.yaml:97:15:          {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" (dict)) | nindent 10 }}
charts/registry/templates/deployment.yaml:112:15:          {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" (dict)) | nindent 10 }}
charts/registry/templates/deployment.yaml:122:15:          {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" (dict)) | nindent 10 }}
charts/gitlab/charts/spamcheck/templates/deployment.yaml:77:17:            {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" (dict)) | nindent 12 }}
charts/gitlab/charts/gitlab-pages/templates/deployment.yaml:88:15:          {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" (dict)) | nindent 12 }}
charts/gitlab/charts/gitlab-pages/templates/deployment.yaml:111:15:          {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" (dict)) | nindent 12 }}
charts/gitlab/charts/toolbox/templates/backup-job.yaml:62:21:                {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" .) | nindent 16 }}
charts/gitlab/charts/toolbox/templates/backup-job.yaml:96:21:                {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" .) | nindent 16 }}
charts/gitlab/charts/toolbox/templates/deployment.yaml:56:15:          {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" .) | nindent 10 }}
charts/gitlab/charts/toolbox/templates/deployment.yaml:156:17:            {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" .) | nindent 12 }}
charts/gitlab/charts/praefect/templates/statefulset.yaml:75:15:          {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" (dict)) | nindent 10 }}
charts/gitlab/charts/praefect/templates/statefulset.yaml:127:13:        {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" (dict)) | nindent 8 }}
charts/gitlab/charts/gitlab-shell/templates/deployment.yaml:62:15:          {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" (dict)) | nindent 10 }}
charts/gitlab/charts/gitlab-shell/templates/deployment.yaml:126:17:            {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" (dict)) | nindent 12 }}
charts/gitlab/charts/webservice/templates/deployment.yaml:118:17:            {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" .) | nindent 12 }}
charts/gitlab/charts/webservice/templates/deployment.yaml:163:17:            {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" .) | nindent 12 }}
charts/gitlab/charts/webservice/templates/deployment.yaml:253:17:            {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" .) | nindent 12 }}
charts/gitlab/charts/webservice/templates/deployment.yaml:377:17:            {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" .) | nindent 12 }}
charts/gitlab/charts/mailroom/templates/deployment.yaml:70:15:          {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" (dict)) | nindent 12 }}
charts/gitlab/charts/mailroom/templates/deployment.yaml:94:15:          {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" (dict)) | nindent 10 }}
charts/gitlab/charts/sidekiq/templates/deployment.yaml:121:15:          {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" .) | nindent 10 }}
charts/gitlab/charts/sidekiq/templates/deployment.yaml:160:17:            {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" (dict)) | nindent 12 }}
charts/gitlab/charts/sidekiq/templates/deployment.yaml:227:17:            {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" .) | nindent 12 }}
charts/gitlab/charts/kas/templates/deployment.yaml:95:17:            {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" (dict)) | nindent 12 }}
charts/gitlab/charts/gitlab-exporter/templates/deployment.yaml:83:15:          {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" (dict)) | nindent 10 }}
charts/gitlab/charts/gitlab-exporter/templates/deployment.yaml:111:17:            {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" (dict)) | nindent 12 }}
charts/gitlab/charts/gitaly/templates/_statefulset_spec.yaml:67:15:          {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" (dict)) | nindent 10 }}
charts/gitlab/charts/gitaly/templates/_statefulset_spec.yaml:136:17:            {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" (dict)) | nindent 12 }}
charts/gitlab/charts/geo-logcursor/templates/deployment.yaml:75:15:          {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" (dict)) | nindent 10 }}
charts/gitlab/charts/geo-logcursor/templates/deployment.yaml:107:17:            {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" (dict)) | nindent 12 }}
charts/gitlab/charts/geo-logcursor/templates/deployment.yaml:136:17:            {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" (dict)) | nindent 12 }}
charts/gitlab/charts/migrations/templates/_jobspec.yaml:55:15:          {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" (dict)) | nindent 10 }}
charts/gitlab/charts/migrations/templates/_jobspec.yaml:102:17:            {{- include "gitlab.extraEnvFrom" (dict "root" $ "local" (dict)) | nindent 12 }}
Edited by Mitchell Nielsen

Merge request reports