KubeZero/charts/kubezero-sql/templates/mariadb/istio-service.yaml

23 lines
728 B
YAML
Raw Permalink Normal View History

{{- if index .Values "mariadb-galera" "istio" "enabled" }}
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
2021-08-25 14:02:21 +00:00
name: {{ template "kubezero-lib.fullname" $ }}-mariadb
namespace: {{ .Release.Namespace }}
labels:
{{ include "kubezero-lib.labels" . | indent 4 }}
spec:
hosts:
- {{ index .Values "mariadb-galera" "istio" "url" }}
gateways:
- {{ index .Values "mariadb-galera" "istio" "gateway" }}
tcp:
- match:
- port: {{ default 3306 ( index .Values "mariadb-galera" "service" "port" ) }}
route:
- destination:
host: {{ .Release.Name }}-mariadb-galera-headless
port:
number: {{ default 3306 ( index .Values "mariadb-galera" "service" "port" ) }}
{{- end }}