Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix usage of extra envs as map in Helm chart #2146

Merged
merged 2 commits into from
Jun 12, 2023
Merged

Fix usage of extra envs as map in Helm chart #2146

merged 2 commits into from
Jun 12, 2023

Conversation

alexintech
Copy link
Contributor

@alexintech alexintech commented Jun 9, 2023

What this PR does

  1. Fixes setting extra envs using:
env:
  proxy: http://example.com
  SOME_VAR: some-value

It had failed if postgresql setting enabled and in job-migrate

  1. Fixes an issue if custom database and username set for internal mariadb, MYSQL_ envs did not use them
mariadb:
  auth:
     database: grafana_oncall
     username: grafana_oncall
  1. Added imagePullSecrets: [] to values.yaml. It used in helm chart, but does not present in the values.yaml
  2. More unit tests

Which issue(s) this PR fixes

Checklist

  • Unit, integration, and e2e (if applicable) tests updated
  • Documentation added (or pr:no public docs PR label added if not required)
  • CHANGELOG.md updated (or pr:no changelog PR label added if not required)

@alexintech alexintech requested a review from a team June 9, 2023 07:34
@alexintech
Copy link
Contributor Author

@joeyorlando take a look please 👀

@iskhakov iskhakov self-requested a review June 12, 2023 02:30
@iskhakov iskhakov self-assigned this Jun 12, 2023
@iskhakov iskhakov added the pr:no public docs Added to a PR that does not require public documentation updates label Jun 12, 2023
@iskhakov iskhakov added this pull request to the merge queue Jun 12, 2023
Merged via the queue into grafana:dev with commit d324744 Jun 12, 2023
@alexintech alexintech deleted the helm-unittests branch June 12, 2023 05:50
Comment on lines +118 to +130
{{- define "oncall.extraEnvs" -}}
{{- if .Values.env }}
{{- if (kindIs "map" .Values.env) }}
{{- range $key, $value := .Values.env }}
- name: {{ $key }}
value: {{ $value }}
{{- end -}}
{{/* support previous schema */}}
{{- else }}
{{- toYaml .Values.env }}
{{- end }}
{{- end }}
{{- end }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr:no public docs Added to a PR that does not require public documentation updates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants