{{- if .Values.gateway.ingress.enabled }} apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: {{ include "shop-recycle.fullname" . }}-gateway labels: app: {{ include "shop-recycle.fullname" . }}-gateway {{- include "shop-recycle.labels" . | nindent 4 }} namespace: {{ .Release.Namespace }} {{- with .Values.gateway.ingress.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} spec: {{- if .Values.gateway.ingress.className }} ingressClassName: {{ .Values.gateway.ingress.className }} {{- end }} {{- with .Values.gateway.ingress.tls }} tls: {{- toYaml . | nindent 4 }} {{- end }} rules: {{- range .Values.gateway.ingress.hosts }} - host: {{ .host | quote }} http: paths: {{- range .paths }} - path: {{ .path }} pathType: {{ .pathType }} backend: service: name: {{ include "shop-recycle.fullname" . }}-gateway port: number: {{ $.Values.gateway.service.port }} {{- end }} {{- end }} {{- end }}