-
Notifications
You must be signed in to change notification settings - Fork 110
/
Copy pathistio_destination_rules.yaml
executable file
·101 lines (101 loc) · 2.68 KB
/
istio_destination_rules.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
{{ if .Values.global.istio.enabled }}
{{ if .Values.mysql.enabled }}
# MySQL
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: {{ template "bluecompute.mysql.fullname" . }}
spec:
host: {{ template "bluecompute.mysql.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local
trafficPolicy:
loadBalancer:
simple: {{ .Values.mysql.istio.loadBalancer }}
portLevelSettings:
- port:
number: {{ .Values.mysql.service.port }}
tls:
mode: {{ .Values.mysql.istio.mTLS }}
{{ end }}
---
{{ if .Values.elasticsearch.enabled }}
# Elasticsearch
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: {{ template "bluecompute.elasticsearch.client.fullname" . }}
spec:
host: {{ template "bluecompute.elasticsearch.client.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local
trafficPolicy:
portLevelSettings:
- port:
number: 9200
tls:
mode: DISABLE
- port:
number: 9300
tls:
mode: DISABLE
{{ end }}
---
{{ if .Values.couchdb.enabled }}
# CouchDB Service
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: {{ template "bluecompute.couchdb.svcname" . }}
spec:
host: {{ template "bluecompute.couchdb.svcname" . }}.{{ .Release.Namespace }}.svc.cluster.local
trafficPolicy:
portLevelSettings:
- port:
number: {{ .Values.couchdb.service.externalPort }}
tls:
mode: DISABLE
---
# CouchDB Headless
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: {{ template "bluecompute.couchdb.fullname" . }}
spec:
host: {{ template "bluecompute.couchdb.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local
trafficPolicy:
portLevelSettings:
- port:
number: 5984
tls:
mode: DISABLE
{{ end }}
---
{{ if .Values.mariadb.enabled }}
# MariaDB
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: {{ template "bluecompute.mariadb.fullname" . }}
spec:
host: {{ template "bluecompute.mariadb.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local
trafficPolicy:
portLevelSettings:
- port:
number: {{ .Values.mariadb.service.port }}
tls:
mode: DISABLE
---
# MariaDB Slave
{{ if .Values.mariadb.replication.enabled }}
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: {{ template "bluecompute.mariadb.slave.fullname" . }}
spec:
host: {{ template "bluecompute.mariadb.slave.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local
trafficPolicy:
portLevelSettings:
- port:
number: {{ .Values.mariadb.service.port }}
tls:
mode: DISABLE
{{ end }}
{{ end }}
{{ end }}