httproute.yaml 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. {{- if .Values.httpRoute.enabled -}}
  2. {{- $fullName := include "podinfo.fullname" . -}}
  3. {{- $svcPort := .Values.service.externalPort -}}
  4. apiVersion: gateway.networking.k8s.io/v1
  5. kind: HTTPRoute
  6. metadata:
  7. name: {{ $fullName }}
  8. namespace: {{ include "podinfo.namespace" . }}
  9. labels:
  10. {{- include "podinfo.labels" . | nindent 4 }}
  11. {{- with .Values.httpRoute.additionalLabels }}
  12. {{- toYaml . | nindent 4 }}
  13. {{- end }}
  14. {{- with .Values.httpRoute.annotations }}
  15. annotations:
  16. {{- toYaml . | nindent 4 }}
  17. {{- end }}
  18. spec:
  19. parentRefs:
  20. {{- with .Values.httpRoute.parentRefs }}
  21. {{- toYaml . | nindent 4 }}
  22. {{- end }}
  23. {{- with .Values.httpRoute.hostnames }}
  24. hostnames:
  25. {{- toYaml . | nindent 4 }}
  26. {{- end }}
  27. rules:
  28. {{- range .Values.httpRoute.rules }}
  29. {{- with .matches }}
  30. - matches:
  31. {{- toYaml . | nindent 8 }}
  32. {{- end }}
  33. {{- with .filters }}
  34. filters:
  35. {{- toYaml . | nindent 8 }}
  36. {{- end }}
  37. backendRefs:
  38. - name: {{ $fullName }}
  39. port: {{ $svcPort }}
  40. weight: 1
  41. {{- end }}
  42. {{- end }}