grpcroute.yaml 1.1 KB

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