{{- if .Values.server.ingress.enabled -}} {{- $fullname := include "website.fullname" . -}} {{- $tlsname := printf "%s-%s-tls" $fullname "server" -}} apiVersion: networking.k8s.io/v1 kind: Ingress metadata: annotations: katenary.v3/compose-hash: 0c69ac40895910ccdabc3a2655ff7a3e6f5cf9fa katenary.v3/version: 3.0.0-rc5 {{- if .Values.server.ingress.annotations -}} {{- toYaml .Values.server.ingress.annotations | nindent 4 }} {{- end }} labels: {{- include "website.labels" . | nindent 4 }} katenary.v3/component: server name: '{{ $fullname }}-server' spec: {{- if ne .Values.server.ingress.class "-" }} ingressClassName: '{{ tpl .Values.server.ingress.class $ }}' {{- end }} rules: - host: '{{ tpl .Values.server.ingress.host $ }}' http: paths: - backend: service: name: '{{ $fullname }}-server' port: name: http path: '{{ tpl .Values.server.ingress.path $ }}' pathType: ImplementationSpecific {{- if .Values.server.ingress.tls.enabled }} tls: - hosts: - '{{ tpl .Values.server.ingress.host . }}' secretName: '{{ .Values.server.ingress.tls.secretName | default $tlsname }}' {{ end -}} {{- end -}}