6290322f1b
- VM stack 10 charts: victoria-metrics-cluster/auth, victoria-logs-cluster, victoria-metrics-agent/alert, opentelemetry-collector, kube-state-metrics, prometheus-node-exporter, alertmanager, perses (JWT/OIDC, Infisical-ready) - ArgoCD ApplicationSet (syncWave) + per-chart dip-values overlays - doc/victoria-metrics-architecture.md, define-chart-resources updates - includes pending working-tree changes (mlflow, kubeflow, apisix, CLAUDE.md) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
82 lines
2.7 KiB
YAML
82 lines
2.7 KiB
YAML
{{- if .Values.gateway.enabled }}
|
|
{{- $fullName := include "perses.fullname" . -}}
|
|
{{- $gatewayName := default (printf "%s-gateway" $fullName) .Values.gateway.name -}}
|
|
{{- $routeName := default (printf "%s-http-route" $fullName) .Values.gateway.httpRoute.name -}}
|
|
{{- $svcPort := .Values.service.port -}}
|
|
{{- $defaultParentRef := dict "name" $gatewayName -}}
|
|
{{- if .Values.gateway.namespace }}
|
|
{{- $_ := set $defaultParentRef "namespace" .Values.gateway.namespace -}}
|
|
{{- end }}
|
|
{{- $parentRefs := .Values.gateway.httpRoute.parentRefs }}
|
|
{{- if and (empty $parentRefs) .Values.gateway.createGateway }}
|
|
{{- $parentRefs = (list $defaultParentRef) }}
|
|
{{- end }}
|
|
{{- if empty $parentRefs }}
|
|
{{- fail "gateway.httpRoute.parentRefs must be set when gateway.enabled is true and gateway.createGateway is false" }}
|
|
{{- end }}
|
|
{{- $rules := .Values.gateway.httpRoute.rules }}
|
|
{{- if empty $rules }}
|
|
{{- $rules = list (dict "matches" (list (dict "path" (dict "type" "PathPrefix" "value" "/"))) "backendRefs" (list (dict "name" $fullName "port" $svcPort))) }}
|
|
{{- end }}
|
|
apiVersion: gateway.networking.k8s.io/v1
|
|
kind: HTTPRoute
|
|
metadata:
|
|
name: {{ $routeName }}
|
|
labels:
|
|
{{- include "perses.labels" . | nindent 4 }}
|
|
app.kubernetes.io/component: networking
|
|
{{- with .Values.gateway.httpRoute.labels }}
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
{{- with .Values.gateway.httpRoute.annotations }}
|
|
annotations:
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
parentRefs:
|
|
{{- range $parentRefs }}
|
|
- name: {{ .name }}
|
|
{{- if .namespace }}
|
|
namespace: {{ .namespace }}
|
|
{{- end }}
|
|
{{- if .sectionName }}
|
|
sectionName: {{ .sectionName }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if .Values.gateway.httpRoute.hostnames }}
|
|
hostnames:
|
|
{{- range .Values.gateway.httpRoute.hostnames }}
|
|
- {{ . | quote }}
|
|
{{- end }}
|
|
{{- end }}
|
|
rules:
|
|
{{- range $rules }}
|
|
- {{- if .matches }}
|
|
matches:
|
|
{{- toYaml .matches | nindent 8 }}
|
|
{{- end }}
|
|
{{- if .filters }}
|
|
filters:
|
|
{{- toYaml .filters | nindent 8 }}
|
|
{{- end }}
|
|
{{- $backendRefs := .backendRefs | default (list (dict "name" $fullName "port" $svcPort)) }}
|
|
backendRefs:
|
|
{{- range $backendRefs }}
|
|
- name: {{ .name | default $fullName }}
|
|
{{- if .namespace }}
|
|
namespace: {{ .namespace }}
|
|
{{- end }}
|
|
{{- if .kind }}
|
|
kind: {{ .kind }}
|
|
{{- end }}
|
|
{{- if .group }}
|
|
group: {{ .group }}
|
|
{{- end }}
|
|
port: {{ .port | default $svcPort }}
|
|
{{- if .weight }}
|
|
weight: {{ .weight }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|