Files
devops-infra-helm-charts-gcp/helm-templates/victoria-metrics-mcp/templates/route.yaml
T
2026-08-26 03:39:42 +05:30

37 lines
1001 B
YAML

{{- if .Values.route.enabled -}}
{{- $ctx := dict "helm" . }}
{{- $fullname := include "vm.fullname" $ctx }}
{{- $ns := include "vm.namespace" $ctx }}
{{- $svcPort := .Values.service.port -}}
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: {{ $fullname }}
namespace: {{ $ns }}
labels: {{ include "vm.labels" $ctx | nindent 4 }}
{{- with .Values.route.annotations }}
annotations: {{ toYaml . | nindent 4 }}
{{- end }}
spec:
parentRefs:
{{- with .Values.route.parentRefs }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.route.hostnames }}
hostnames: {{ toYaml . | nindent 4 }}
{{- end }}
rules:
{{- range .Values.route.rules }}
- backendRefs:
- name: {{ $fullname }}
port: {{ $svcPort }}
weight: 1
{{- with .matches }}
matches: {{ toYaml . | nindent 8 }}
{{- end }}
{{- with .filters }}
filters: {{ toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- end }}