Skip to content

Bug: contact_email template error - using .Values inside with block #106

@btwshivam

Description

@btwshivam

Description

In templates/configmap_env.yaml at lines 50-51, the template incorrectly uses .Values inside a with block, which changes the context to the value itself (a string), making .Values inaccessible.

Location

templates/configmap_env.yaml lines 50-51

Current Code (Broken)

{{- with .Values.pixelfed.instance.contact_email }}
INSTANCE_CONTACT_EMAIL: {{ .Values.pixelfed.instance.contact_email }}
{{- end }}

Error Message

template: pixelfed/templates/configmap_env.yaml:51:36: executing \"pixelfed/templates/configmap_env.yaml\" at <.Values.pixelfed.instance.contact_email>: can't evaluate field Values in type string

Suggested Fix

Either use if instead of with:

{{- if .Values.pixelfed.instance.contact_email }}
INSTANCE_CONTACT_EMAIL: {{ .Values.pixelfed.instance.contact_email }}
{{- end }}

Or use the context variable inside with:

{{- with .Values.pixelfed.instance.contact_email }}
INSTANCE_CONTACT_EMAIL: {{ . }}
{{- end }}

Chart Version

v0.23.0"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions