apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:  
  namespace: {{ .Release.Namespace }}
  labels:
    app: {{ include "openslice.fullname" . }}
    chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
    {{- include "openslice.labels" . | nindent 4 }}
  annotations:
    {{- toYaml .Values.ingress.annotations | nindent 4 }}
  name: {{ include "openslice.fullname" . }}-openslice-ingress
spec:
  ingressClassName: nginx
  rules:
  - http:
      paths:
      {{- range .Values.ingress.paths }}
      - pathType: Prefix
        path: "{{ .path }}"
        backend:
          service:
            name: {{ include "openslice.fullname" . }}-{{ .service }}
            port:
              number: {{ .port }}
      {{- end }}
