2021-11-08 16:54:48 +01:00
|
|
|
{{- if and .Values.gitea.enabled .Values.gitea.istio.enabled }}
|
|
|
|
apiVersion: networking.istio.io/v1beta1
|
|
|
|
kind: VirtualService
|
|
|
|
metadata:
|
2022-01-20 00:04:35 +01:00
|
|
|
name: gitea
|
2021-11-08 16:54:48 +01:00
|
|
|
namespace: {{ .Release.Namespace }}
|
|
|
|
labels:
|
2022-01-20 00:04:35 +01:00
|
|
|
{{- include "kubezero-lib.labels" $ | nindent 4 }}
|
2021-11-08 16:54:48 +01:00
|
|
|
spec:
|
|
|
|
gateways:
|
|
|
|
- {{ .Values.gitea.istio.gateway }}
|
|
|
|
hosts:
|
|
|
|
- {{ .Values.gitea.istio.url }}
|
|
|
|
http:
|
2025-03-04 11:47:19 +00:00
|
|
|
{{- if .Values.gitea.istio.blockApi }}
|
2023-10-02 12:57:25 +00:00
|
|
|
- match:
|
|
|
|
- uri:
|
2025-03-04 11:47:19 +00:00
|
|
|
prefix: /api
|
|
|
|
directResponse:
|
|
|
|
status: 401
|
2023-10-02 12:57:25 +00:00
|
|
|
{{- end }}
|
2021-11-08 16:54:48 +01:00
|
|
|
- route:
|
|
|
|
- destination:
|
|
|
|
host: gitea-http
|
2022-01-20 00:04:35 +01:00
|
|
|
tcp:
|
|
|
|
- match:
|
|
|
|
- port: 22
|
|
|
|
route:
|
|
|
|
- destination:
|
|
|
|
host: gitea-ssh
|
2021-11-08 16:54:48 +01:00
|
|
|
{{- end }}
|