Skip to content

fix: avoid rendering empty env key in querier deployment#650

Merged
kd7lxl merged 2 commits into
cortexproject:masterfrom
sophotechlabs:fix/querier-empty-env
Jul 9, 2026
Merged

fix: avoid rendering empty env key in querier deployment#650
kd7lxl merged 2 commits into
cortexproject:masterfrom
sophotechlabs:fix/querier-empty-env

Conversation

@archy-rock3t-cloud

Copy link
Copy Markdown
Contributor

What this PR does:

The querier deployment renders an empty env: key when no environment variables are configured. Wrapped in conditional to match existig pattern.

Checklist

  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX], [DEPENDENCY]

Signed-off-by: Artem Muterko <artem@sopho.tech>
Comment on lines +91 to +93
{{- if .Values.querier.env }}
env:
{{- if .Values.querier.env }}
{{- toYaml .Values.querier.env | nindent 12 }}
{{- end }}
{{- toYaml .Values.querier.env | nindent 12 }}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Cleaner syntax for this is:

Suggested change
{{- if .Values.querier.env }}
env:
{{- if .Values.querier.env }}
{{- toYaml .Values.querier.env | nindent 12 }}
{{- end }}
{{- toYaml .Values.querier.env | nindent 12 }}
{{- with .Values.querier.env }}
env:
{{- toYaml . | nindent 12 }}

@kd7lxl
kd7lxl enabled auto-merge (squash) July 9, 2026 21:12
@kd7lxl
kd7lxl merged commit 02f5521 into cortexproject:master Jul 9, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants