httproute.yaml 1.1 KB

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