<p>i'm bit troubled, i want to create ingress with multiple pathes </p>

<p>here is my /templates/ingress.yaml</p>

<pre><code>{{- if .Values.ingress.enabled -}}
{{- $ingressPath := .Values.ingress.path -}}
{{- $appName := .Values.appName -}}
apiVersion: extensions/v1beta1
kind: Ingress
metadata: 
  name: {{ .Values.appName }}-ingress
  labels:
    app: {{ .Values.appName }}
    chart: {{ template "chart.chart" . }}
    release: {{ .Release.Name }}
    heritage: {{ .Release.Service }}
{{- with .Values.ingress.annotations }}
  annotations:
{{ toYaml . | indent 4 }}
{{- end }}
spec:
{{- if .Values.ingress.tls }}
  tls:
  {{- range .Values.ingress.tls }}
    - hosts:
      {{- range .hosts }}
        - {{ . }}
      {{- end }}
      secretName: {{ .secretName }}
  {{- end }}
{{- end }}
  rules:
  {{- range .Values.ingress.hosts }}
    - host: {{ . }}
      http:
        paths:
          - path: {{ $ingressPath }}
            backend:
              serviceName: {{ $appName }}-service
              servicePort: 80
  {{- end }}
{{- end }}
</code></pre>

<p>and here is my values.yaml file </p>

<pre><code>appName: vsemPrivet
replicaCount: 1
image:
  repository: kakoito.domen.kg
  tag: dev-56739-272faaf
  pullPolicy: Always
imagePullSecretName: regcred
nodeSelector:
  project: vazhni-project
service: vsem-privet
  name: 
  type: ClusterIP
  protocol: TCP
  targetPort: 8080

## Configure ingress resourse
## ref: https://kubernetes.io/docs/concepts/services-networking/ingress/
ingress:
  enabled: true
  annotations:
    kubernetes.io/ingress.class: "nginx-prod-01"
    nginx.ingress.kubernetes.io/rewrite-target: "/"
    nginx.ingress.kubernetes.io/enable-cors: "true"
    nginx.ingress.kubernetes.io/cors-allow-methods: "GET, POST, PUT, DELETE, OPTIONS, HEAD"
    nginx.ingress.kubernetes.io/cors-allow-origin: "*"
    nginx.ingress.kubernetes.io/cors-allow-credentials: "true"
    nginx.ingress.kubernetes.io/cors-allow-headers: "*"
    nginx.ingress.kubernetes.io/cors-max-age: "3600"
    nginx.ingress.kubernetes.io/from-to-www-redirect: "true"
  hosts:
    - mirtebe4elovek.com
  path: /letter
  hosts:
    - mirtebe4elovek.com
  path: /swagger-ui
  hosts:
    - mirtebe4elovek.com
  path: /webjars

  tls:
    - secretName: ssl-secret
      hosts:
        - qa-ibank.anthill.fortebank.com
</code></pre>

<p>So here im my scenario i want to make 3 different paths, but when i helm install  and then kubectl describe ing my-ing i get the following</p>

<pre><code>Name:             service-core-ingress
Namespace:        default
Address:          
Default backend:  default-http-backend:80 (&lt;none&gt;)
TLS:
  ssl-secret terminates mirtebe4elovek.com
Rules:
  Host                            Path  Backends
  ----                            ----  --------
  mirtebe4elovek.com  
                                  /webjars   my-service:80 (&lt;none&gt;)
Annotations:
  kubernetes.io/ingress.class:                         nginxnginx
  nginx.ingress.kubernetes.io/cors-allow-methods:      GET, POST, PUT, DELETE, OPTIONS, HEAD
  nginx.ingress.kubernetes.io/cors-max-age:            3600
  nginx.ingress.kubernetes.io/rewrite-target:          /
  nginx.ingress.kubernetes.io/cors-allow-credentials:  true
  nginx.ingress.kubernetes.io/cors-allow-headers:      *
  nginx.ingress.kubernetes.io/cors-allow-origin:       *
  nginx.ingress.kubernetes.io/enable-cors:             true
  nginx.ingress.kubernetes.io/from-to-www-redirect:    true
Events:                                                &lt;none&gt;
</code></pre>

<p>so as you can see i have only 1 path /webjars but where is 2 others? /letters and /swagger-ui which i've described in my values.yaml file
how can i fix this? </p>

Joom187
<p>In Helm, <code>range</code> operator is used to iterate through a collection.
Looks like here need to have multiple paths over a single host <code>mirtebe4elovek.com</code></p>

<p>You may modified the <code>ingress.yaml</code> as the following.</p>

<pre><code>rules:

    - host: {{ .Values.ingress.host }}
      http:
        paths:
        {{- range .Values.ingress.paths }}
          - path: {{ . }}
            backend:
              serviceName: {{ $appName }}-service
              servicePort: 80
        {{- end }}
</code></pre>

<p>And the value.yaml file as:</p>

<pre><code>ingress:
  enabled: true
  annotations:
    kubernetes.io/ingress.class: "nginx-prod-01"
    nginx.ingress.kubernetes.io/rewrite-target: "/"
    nginx.ingress.kubernetes.io/enable-cors: "true"
    nginx.ingress.kubernetes.io/cors-allow-methods: "GET, POST, PUT, DELETE, OPTIONS, HEAD"
    nginx.ingress.kubernetes.io/cors-allow-origin: "*"
    nginx.ingress.kubernetes.io/cors-allow-credentials: "true"
    nginx.ingress.kubernetes.io/cors-allow-headers: "*"
    nginx.ingress.kubernetes.io/cors-max-age: "3600"
    nginx.ingress.kubernetes.io/from-to-www-redirect: "true"
  host: "mirtebe4elovek.com"
  paths:
    - "/letter"
    - "/swagger-ui"
    - "/webjars"
</code></pre>
