Files
k8s-cluster/manifest/sonarqube/templates/http-route.yaml
2026-04-27 21:52:01 +07:00

36 lines
985 B
YAML

{{- if .Values.httproute.enabled -}}
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: {{ template "sonarqube.fullname" . }}-http-route
labels:
{{- include "sonarqube.labels" . | nindent 4 }}
{{- with .Values.httproute.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
parentRefs:
- name: {{ .Values.httproute.gateway }}
{{- if .Values.httproute.gatewayNamespace }}
namespace: {{ .Values.httproute.gatewayNamespace }}
{{- end }}
hostnames:
{{- with .Values.httproute.hostnames }}
{{- toYaml . | nindent 4 }}
{{- end }}
rules:
{{- if .Values.httproute.rules -}}
{{- with .Values.httproute.rules -}}
{{ toYaml . | nindent 4 }}
{{- end }}
{{- else }}
- matches:
- path:
type: PathPrefix
value: {{ include "sonarqube.webcontext" . }}
backendRefs:
- name: {{ include "sonarqube.fullname" . }}
port: {{ .Values.service.externalPort }}
{{- end }}
{{- end }}