Skip to content

Resources that only contain comments after processing cause issues #129

Closed
@michaelgeorgeattard

Description

@michaelgeorgeattard

Given the following resource for example:

# ConfigMap with extra configuration specified directly to the chart
# for client agents only.
{{- if (or (and (ne (.Values.client.enabled | toString) "-") .Values.client.enabled) (and (eq (.Values.client.enabled | toString) "-") .Values.global.enabled)) }}
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ template "consul.fullname" . }}-client-config
  namespace: {{ .Release.Namespace }}
  labels:
    app: {{ template "consul.name" . }}
    chart: {{ template "consul.chart" . }}
    heritage: {{ .Release.Service }}
    release: {{ .Release.Name }}
data:
  extra-from-values.json: |-
{{ tpl .Values.client.extraConfig . | trimAll "\"" | indent 4 }}
{{- end }}

If through configuration, only the comments are left after processing:

# ConfigMap with extra configuration specified directly to the chart
# for client agents only.

helm-diff complains with the following error:

2019/03/28 10:40:34 Error: Found duplicate key "foo, , ()" in manifest

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions