{{- if .Values.ingress.enabled -}} {{- $ingressPath := include "pathBase" . -}} {{- $serviceName := include "zipkin.fullname" . -}} {{- $svcPort := .Values.service.port -}} apiVersion: networking.k8s.io/v1beta1 kind: Ingress metadata: name: {{ template "zipkin.fullname" . }} labels: app: {{ template "zipkin.name" . }} chart: {{ template "zipkin.chart" . }} release: {{ .Release.Name }} heritage: {{ .Release.Service }} {{- with .Values.ingress.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} spec: {{- if .Values.ingress.tls }} tls: {{- range .Values.ingress.tls }} - hosts: {{- range .hosts }} - {{ . }} {{- end }} secretName: {{ .secretName }} {{- end }} {{- end }} rules: {{- range .Values.ingress.hosts }} - host: {{ . }} http: paths: - path: {{ $ingressPath }} backend: serviceName: {{ $.Values.app.svc.zipkin }} servicePort: http {{- end }} {{- end }}