<p>I have helm 3 template created using <code>helm create microservice</code> command. it has below files.</p>
<pre><code>/Chart.yaml
./values.yaml
./.helmignore
./templates/ingress.yaml
./templates/deployment.yaml
./templates/service.yaml
./templates/serviceaccount.yaml
./templates/hpa.yaml
./templates/NOTES.txt
./templates/_helpers.tpl
./templates/tests/test-connection.yaml
</code></pre>
<p>Updated values file based on my application, when I try to install the helm chat its giving below error message.</p>
<pre><code>Error: UPGRADE FAILED: template: microservice/templates/ingress.yaml:20:8: executing &quot;microservice/templates/ingress.yaml&quot; at &lt;include &quot;microservice.labels&quot; .&gt;: error calling include: template: no template &quot;microservice.labels&quot; associated with template &quot;gotpl&quot;
helm.go:75: [debug] template: microservice/templates/ingress.yaml:20:8: executing &quot;microservice/templates/ingress.yaml&quot; at &lt;include &quot;microservice.labels&quot; .&gt;: error calling include: template: no template &quot;microservice.labels&quot; associated with template &quot;gotpl&quot;
</code></pre>
<p>Here is the <code>ingress.yaml</code> file.</p>
<pre><code>{{- if .Values.ingress.enabled -}}
{{- $fullName := include &quot;microservice.fullname&quot; . -}}
{{- $svcPort := .Values.service.port -}}
{{- if and .Values.ingress.className (not (semverCompare &quot;&gt;=1.18-0&quot; .Capabilities.KubeVersion.GitVersion)) }}
  {{- if not (hasKey .Values.ingress.annotations &quot;kubernetes.io/ingress.class&quot;) }}
  {{- $_ := set .Values.ingress.annotations &quot;kubernetes.io/ingress.class&quot; .Values.ingress.className}}
  {{- end }}
{{- end }}
{{- if semverCompare &quot;&gt;=1.19-0&quot; .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1
{{- else if semverCompare &quot;&gt;=1.14-0&quot; .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1beta1
{{- else -}}
apiVersion: extensions/v1beta1
{{- end }}
kind: Ingress
metadata:
  name: {{ $fullName }}
  labels:
    {{- include &quot;microservice.labels&quot; . | nindent 4 }}
  {{- with .Values.ingress.annotations }}
  annotations:
    {{- toYaml . | nindent 4 }}
  {{- end }}
spec:
  {{- if and .Values.ingress.className (semverCompare &quot;&gt;=1.18-0&quot; .Capabilities.KubeVersion.GitVersion) }}
  ingressClassName: {{ .Values.ingress.className }}
  {{- end }}
  {{- if .Values.ingress.tls }}
  tls:
    {{- range .Values.ingress.tls }}
    - hosts:
        {{- range .hosts }}
        - {{ . | quote }}
        {{- end }}
      secretName: {{ .secretName }}
    {{- end }}
  {{- end }}
  rules:
    {{- range .Values.ingress.hosts }}
    - host: {{ .host | quote }}
      http:
        paths:
          {{- range .paths }}
          - path: {{ .path }}
            {{- if and .pathType (semverCompare &quot;&gt;=1.18-0&quot; $.Capabilities.KubeVersion.GitVersion) }}
            pathType: {{ .pathType }}
            {{- end }}
            backend:
              {{- if semverCompare &quot;&gt;=1.19-0&quot; $.Capabilities.KubeVersion.GitVersion }}
              service:
                name: {{ $fullName }}
                port:
                  number: {{ $svcPort }}
              {{- else }}
              serviceName: {{ $fullName }}
              servicePort: {{ $svcPort }}
              {{- end }}
          {{- end }}
    {{- end }}
{{- end }}
</code></pre>
<p>How to I added <code>microservice.labels</code> template?. Do I need to create <code>microservice.labels.tlp</code> file?</p>
<p>Any tips to fix this error.</p>
<p>Thanks
SR</p>

sfgroups
<p>I copied the <code>ingress.yaml</code> file to, chart created older version helm. this value was missing in <code>_helpers.tpl</code> file. Now I copied new version of hellpers.tpl file. deployment works now.</p>
