mirror of
https://github.com/versity/versitygw.git
synced 2026-07-02 16:54:25 +00:00
84 lines
2.4 KiB
YAML
84 lines
2.4 KiB
YAML
{{- if .Values.httpRoute.enabled -}}
|
|
apiVersion: gateway.networking.k8s.io/v1
|
|
kind: HTTPRoute
|
|
metadata:
|
|
name: {{ include "versitygw.fullname" . }}
|
|
labels:
|
|
{{- include "versitygw.labels" . | nindent 4 }}
|
|
{{- with .Values.httpRoute.annotations }}
|
|
annotations:
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
parentRefs:
|
|
{{- toYaml .Values.httpRoute.parentRefs | nindent 4 }}
|
|
{{- if .Values.httpRoute.hostnames }}
|
|
hostnames:
|
|
{{- toYaml .Values.httpRoute.hostnames | nindent 4 }}
|
|
{{- end }}
|
|
rules:
|
|
{{- range .Values.httpRoute.rules }}
|
|
- matches:
|
|
{{- toYaml .matches | nindent 8 }}
|
|
backendRefs:
|
|
- name: {{ include "versitygw.fullname" $ }}
|
|
port: {{ .backendPort | default $.Values.gateway.port }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if and .Values.admin.enabled .Values.admin.httpRoute.enabled }}
|
|
---
|
|
apiVersion: gateway.networking.k8s.io/v1
|
|
kind: HTTPRoute
|
|
metadata:
|
|
name: {{ include "versitygw.fullname" . }}-admin
|
|
labels:
|
|
{{- include "versitygw.labels" . | nindent 4 }}
|
|
{{- with .Values.admin.httpRoute.annotations }}
|
|
annotations:
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
parentRefs:
|
|
{{- toYaml .Values.admin.httpRoute.parentRefs | nindent 4 }}
|
|
{{- if .Values.admin.httpRoute.hostnames }}
|
|
hostnames:
|
|
{{- toYaml .Values.admin.httpRoute.hostnames | nindent 4 }}
|
|
{{- end }}
|
|
rules:
|
|
{{- range .Values.admin.httpRoute.rules }}
|
|
- matches:
|
|
{{- toYaml .matches | nindent 8 }}
|
|
backendRefs:
|
|
- name: {{ include "versitygw.fullname" $ }}
|
|
port: {{ $.Values.admin.port }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if and .Values.webui.enabled .Values.webui.httpRoute.enabled }}
|
|
---
|
|
apiVersion: gateway.networking.k8s.io/v1
|
|
kind: HTTPRoute
|
|
metadata:
|
|
name: {{ include "versitygw.fullname" . }}-webui
|
|
labels:
|
|
{{- include "versitygw.labels" . | nindent 4 }}
|
|
{{- with .Values.webui.httpRoute.annotations }}
|
|
annotations:
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
parentRefs:
|
|
{{- toYaml .Values.webui.httpRoute.parentRefs | nindent 4 }}
|
|
{{- if .Values.webui.httpRoute.hostnames }}
|
|
hostnames:
|
|
{{- toYaml .Values.webui.httpRoute.hostnames | nindent 4 }}
|
|
{{- end }}
|
|
rules:
|
|
{{- range .Values.webui.httpRoute.rules }}
|
|
- matches:
|
|
{{- toYaml .matches | nindent 8 }}
|
|
backendRefs:
|
|
- name: {{ include "versitygw.fullname" $ }}
|
|
port: {{ $.Values.webui.port }}
|
|
{{- end }}
|
|
{{- end }}
|