{{- 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: ad8a7a55c2536a97d1e04148b6677ce1c72b6d5c katenary.v3/version: develop-89fd516 {{- 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 -}}