hotrod-ing.yaml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435
  1. {{- if .Values.hotrod.enabled -}}
  2. {{- if .Values.hotrod.ingress.enabled -}}
  3. {{- $ingressSupportsIngressClassName := eq (include "common.ingress.supportsIngressClassname" .) "true" }}
  4. {{- $serviceName := include "jaeger.fullname" . -}}
  5. {{- $servicePort := .Values.hotrod.service.port -}}
  6. apiVersion: {{ include "common.capabilities.ingress.apiVersion" $ }}
  7. kind: Ingress
  8. metadata:
  9. name: {{ include "jaeger.fullname" . }}-hotrod
  10. labels:
  11. {{- include "jaeger.labels" . | nindent 4 }}
  12. app.kubernetes.io/component: hotrod
  13. {{- if .Values.hotrod.ingress.annotations }}
  14. annotations:
  15. {{- toYaml .Values.hotrod.ingress.annotations | nindent 4 }}
  16. {{- end }}
  17. spec:
  18. {{- if and $ingressSupportsIngressClassName .Values.hotrod.ingress.ingressClassName }}
  19. ingressClassName: {{ .Values.hotrod.ingress.ingressClassName }}
  20. {{- end }}
  21. rules:
  22. {{- range $host := .Values.hotrod.ingress.hosts }}
  23. - host: {{ $host }}
  24. http:
  25. paths:
  26. - path: /
  27. pathType: {{ default "ImplementationSpecific" $.Values.hotrod.ingress.pathType }}
  28. backend: {{- include "common.ingress.backend" (dict "serviceName" (printf "%s-hotrod" $serviceName) "servicePort" $servicePort "context" $) | nindent 14 }}
  29. {{- end -}}
  30. {{- if .Values.hotrod.ingress.tls }}
  31. tls:
  32. {{- toYaml .Values.hotrod.ingress.tls | nindent 4 }}
  33. {{- end -}}
  34. {{- end -}}
  35. {{- end -}}