2021-12-19 22:18:01 +00:00
|
|
|
{{- if and .Values.jenkins.enabled .Values.jenkins.istio.enabled }}
|
2022-01-19 23:04:35 +00:00
|
|
|
apiVersion: networking.istio.io/v1beta1
|
2021-12-19 22:18:01 +00:00
|
|
|
kind: VirtualService
|
|
|
|
metadata:
|
2022-01-19 23:04:35 +00:00
|
|
|
name: {{ template "kubezero-lib.fullname" (merge (dict "subchart" "jenkins") .) }}
|
2021-12-19 22:18:01 +00:00
|
|
|
namespace: {{ template "jenkins.namespace" . }}
|
|
|
|
spec:
|
|
|
|
hosts:
|
|
|
|
- {{ .Values.jenkins.istio.url }}
|
|
|
|
gateways:
|
|
|
|
- {{ .Values.jenkins.istio.gateway }}
|
|
|
|
http:
|
|
|
|
- route:
|
|
|
|
- destination:
|
2022-01-19 23:04:35 +00:00
|
|
|
host: {{ template "kubezero-lib.fullname" (merge (dict "subchart" "jenkins") .) }}
|
2021-12-19 22:18:01 +00:00
|
|
|
port:
|
|
|
|
number: 8080
|
2022-01-19 23:04:35 +00:00
|
|
|
|
|
|
|
{{- if .Values.jenkins.istio.webhook.enabled }}
|
|
|
|
---
|
|
|
|
apiVersion: networking.istio.io/v1beta1
|
|
|
|
kind: VirtualService
|
|
|
|
metadata:
|
|
|
|
name: {{ template "kubezero-lib.fullname" (merge (dict "subchart" "jenkins") .) }}-webhook
|
|
|
|
namespace: {{ template "jenkins.namespace" . }}
|
|
|
|
spec:
|
|
|
|
hosts:
|
|
|
|
- {{ .Values.jenkins.istio.webhook.url }}
|
|
|
|
gateways:
|
|
|
|
- {{ .Values.jenkins.istio.webhook.gateway }}
|
|
|
|
http:
|
|
|
|
- route:
|
|
|
|
- destination:
|
|
|
|
host: {{ template "kubezero-lib.fullname" (merge (dict "subchart" "jenkins") .) }}
|
|
|
|
port:
|
|
|
|
number: 8080
|
|
|
|
match:
|
|
|
|
- uri:
|
|
|
|
exact: "/bitbucket-scmsource-hook/notify"
|
|
|
|
method:
|
|
|
|
exact: "POST"
|
|
|
|
- uri:
|
|
|
|
exact: "/github-webhook/"
|
|
|
|
method:
|
|
|
|
exact: "POST"
|
|
|
|
{{- end }}
|
2022-04-28 09:17:49 +00:00
|
|
|
{{- if .Values.jenkins.istio.agent.enabled }}
|
|
|
|
---
|
|
|
|
apiVersion: networking.istio.io/v1beta1
|
|
|
|
kind: VirtualService
|
|
|
|
metadata:
|
|
|
|
name: {{ template "kubezero-lib.fullname" (merge (dict "subchart" "jenkins") .) }}-agent
|
|
|
|
namespace: {{ template "jenkins.namespace" . }}
|
|
|
|
spec:
|
|
|
|
hosts:
|
|
|
|
- {{ .Values.jenkins.istio.agent.url }}
|
|
|
|
gateways:
|
|
|
|
- {{ .Values.jenkins.istio.agent.gateway }}
|
|
|
|
http:
|
|
|
|
- route:
|
|
|
|
- destination:
|
|
|
|
host: {{ template "kubezero-lib.fullname" (merge (dict "subchart" "jenkins") .) }}
|
|
|
|
port:
|
|
|
|
number: 50000
|
|
|
|
{{- end }}
|
2021-12-19 22:18:01 +00:00
|
|
|
{{- end }}
|