KubeZero/charts/kubezero-ci/templates/gitea/istio-service.yaml

34 lines
774 B
YAML
Raw Permalink Normal View History

2021-11-08 15:54:48 +00:00
{{- if and .Values.gitea.enabled .Values.gitea.istio.enabled }}
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: gitea
2021-11-08 15:54:48 +00:00
namespace: {{ .Release.Namespace }}
labels:
{{- include "kubezero-lib.labels" $ | nindent 4 }}
2021-11-08 15:54:48 +00:00
spec:
gateways:
- {{ .Values.gitea.istio.gateway }}
hosts:
- {{ .Values.gitea.istio.url }}
http:
2023-10-02 12:57:25 +00:00
{{- if .Values.gitea.istio.authProvider }}
# https://github.com/go-gitea/gitea/issues/13606
- match:
- uri:
regex: ^/user/login.*
redirect:
uri: /user/oauth2/{{ .Values.gitea.istio.authProvider }}
redirectCode: 302
{{- end }}
2021-11-08 15:54:48 +00:00
- route:
- destination:
host: gitea-http
tcp:
- match:
- port: 22
route:
- destination:
host: gitea-ssh
2021-11-08 15:54:48 +00:00
{{- end }}