<p>I try to switch from <code>networking.k8s.io/v1beta1</code> to <code>networking.k8s.io/v1</code> but it seems I lost myself.
So I have a question to here. I got following error message when try a install dry-run.
<br><strong>Errormessage:</strong><br>
<em>Error: unable to build kubernetes objects from release manifest: error validating &quot;&quot;: error validating data: ValidationError(Ingress.spec.rules[0].http.paths[0].backend.service.port): invalid type for io.k8s.api.networking.v1.ServiceBackendPort: got &quot;string&quot;, expected &quot;map&quot;</em></p>
<p>It happen in this parts:</p>
<pre><code>kind: Ingress

apiVersion: {{.Values.ingress.apiVersion}}

metadata:

  name: ingress-backend-route

{{- if .Values.ingress.annotations }}

  annotations:

{{ toYaml .Values.ingress.annotations | indent 4 }}

{{- end }}  

spec:

  rules:

    - host: {{.Values.ingress.host}}

      http:

        paths:

          - path: {{.Values.ingress.path}} 

            pathType: {{.Values.generalPrefix}}

            backend:

              service:

                name: my-service-svc

                port: {{ if .Values.oauth2.enable }}http-protected{{ else }}http{{ end }}

          {{- if  .Values.debug }}   

          - path: /couchdb

            pathType: {{.Values.generalPrefix}}

            backend:

              service:

                name: {{ .Release.Name }}-svc-couchdb

                port:

                  number: 5984 

          - path: /rabbitmq

            pathType: {{.Values.generalPrefix}}

            backend:

              service:

                name: rabbitmq-svc

                port:

                  number: 80

          {{- end }}
</code></pre>
<p>I think at line <code>port: {{ if .Values.oauth2.enable }}http-protected{{ else }}http{{ end }}</code>
the http-protected / http is defined in my-service.yaml</p>
<pre><code>---
apiVersion: v1
kind: Service
metadata:
  name: my-service-svc
spec:
  selector:
    app: my-service
  ports:
  - name: http
    protocol: TCP
    port: 80
    targetPort: 80
  - name: http-protected
    protocol: TCP
    port: 8080
    targetPort: 8080
</code></pre>
<p>The new API use the new syntax for ports, maybe this is the issue, but I do not understand the error message well. MAy someone has a tip here`?</p>

IFThenElse
<p>It's your ingress. Port is expecting one further key. Use number if you just want to use the port by its given number or name by the defined service port name.</p>
<p>In example</p>
<pre><code>port:
  number: 80
</code></pre>
<p>or</p>
<pre><code>port:
  name: http
</code></pre>
