istio

Форк
0
/
route-precedence.yaml.golden 
290 строк · 6.3 Кб
1
apiVersion: networking.istio.io/v1alpha3
2
kind: Gateway
3
metadata:
4
  annotations:
5
    internal.istio.io/gateway-semantics: gateway
6
    internal.istio.io/gateway-service: istio-ingressgateway.istio-system.svc.domain.suffix
7
    internal.istio.io/parents: Gateway/gateway/default.istio-system
8
  creationTimestamp: null
9
  name: gateway-istio-autogenerated-k8s-gateway-default
10
  namespace: istio-system
11
spec:
12
  servers:
13
  - hosts:
14
    - allowed-1/*.domain.example
15
    - allowed-2/*.domain.example
16
    port:
17
      name: default
18
      number: 80
19
      protocol: HTTP
20
---
21
apiVersion: networking.istio.io/v1alpha3
22
kind: VirtualService
23
metadata:
24
  annotations:
25
    internal.istio.io/parents: HTTPRoute/http.allowed-1,HTTPRoute/http.allowed-2
26
    internal.istio.io/route-semantics: gateway
27
  creationTimestamp: null
28
  name: http-0-istio-autogenerated-k8s-gateway
29
  namespace: allowed-1
30
spec:
31
  gateways:
32
  - istio-system/gateway-istio-autogenerated-k8s-gateway-default
33
  hosts:
34
  - a.domain.example
35
  http:
36
  - match:
37
    - headers:
38
        my-header:
39
          exact: some-value
40
      queryParams:
41
        my-param:
42
          regex: some-value
43
      uri:
44
        exact: /baz
45
    name: allowed-2.http.1
46
    route:
47
    - destination:
48
        host: svc2.allowed-2.svc.domain.suffix
49
        port:
50
          number: 80
51
  - match:
52
    - uri:
53
        prefix: /foo/bar
54
    name: allowed-2.http.0
55
    route:
56
    - destination:
57
        host: svc2.allowed-2.svc.domain.suffix
58
        port:
59
          number: 80
60
  - match:
61
    - headers:
62
        my-header:
63
          exact: some-value
64
      uri:
65
        prefix: /foo
66
    name: allowed-1.http.0
67
    route:
68
    - destination:
69
        host: svc1.allowed-1.svc.domain.suffix
70
        port:
71
          number: 80
72
  - match:
73
    - uri:
74
        prefix: /bar
75
    name: allowed-2.http.0
76
    route:
77
    - destination:
78
        host: svc2.allowed-2.svc.domain.suffix
79
        port:
80
          number: 80
81
  - match:
82
    - method:
83
        exact: PATCH
84
      uri:
85
        prefix: /
86
    name: allowed-2.http.3
87
    route:
88
    - destination:
89
        host: svc2.allowed-2.svc.domain.suffix
90
        port:
91
          number: 80
92
  - match:
93
    - uri:
94
        prefix: /
95
    name: allowed-2.http.2
96
    route:
97
    - destination:
98
        host: svc3.allowed-2.svc.domain.suffix
99
        port:
100
          number: 80
101
  - match:
102
    - uri:
103
        regex: /foo((\/).*)?
104
    name: allowed-1.http.1
105
    route:
106
    - destination:
107
        host: svc2.allowed-1.svc.domain.suffix
108
        port:
109
          number: 80
110
---
111
apiVersion: networking.istio.io/v1alpha3
112
kind: VirtualService
113
metadata:
114
  annotations:
115
    internal.istio.io/parents: HTTPRoute/http.allowed-1
116
    internal.istio.io/route-semantics: gateway
117
  creationTimestamp: null
118
  name: http-1-istio-autogenerated-k8s-gateway
119
  namespace: allowed-1
120
spec:
121
  gateways:
122
  - istio-system/gateway-istio-autogenerated-k8s-gateway-default
123
  hosts:
124
  - b.domain.example
125
  http:
126
  - match:
127
    - headers:
128
        my-header:
129
          exact: some-value
130
      uri:
131
        prefix: /foo
132
    name: allowed-1.http.0
133
    route:
134
    - destination:
135
        host: svc1.allowed-1.svc.domain.suffix
136
        port:
137
          number: 80
138
  - match:
139
    - uri:
140
        regex: /foo((\/).*)?
141
    name: allowed-1.http.1
142
    route:
143
    - destination:
144
        host: svc2.allowed-1.svc.domain.suffix
145
        port:
146
          number: 80
147
---
148
apiVersion: networking.istio.io/v1alpha3
149
kind: VirtualService
150
metadata:
151
  annotations:
152
    internal.istio.io/parents: HTTPRoute/http.allowed-1
153
    internal.istio.io/route-semantics: gateway
154
  creationTimestamp: null
155
  name: http-2-istio-autogenerated-k8s-gateway
156
  namespace: allowed-1
157
spec:
158
  gateways:
159
  - mesh
160
  hosts:
161
  - a-example.allowed-1.svc.domain.suffix
162
  http:
163
  - match:
164
    - headers:
165
        my-header:
166
          exact: some-value
167
      uri:
168
        prefix: /foo
169
    name: allowed-1.http.0
170
    route:
171
    - destination:
172
        host: svc1.allowed-1.svc.domain.suffix
173
        port:
174
          number: 80
175
  - match:
176
    - uri:
177
        regex: /foo((\/).*)?
178
    name: allowed-1.http.1
179
    route:
180
    - destination:
181
        host: svc2.allowed-1.svc.domain.suffix
182
        port:
183
          number: 80
184
---
185
apiVersion: networking.istio.io/v1alpha3
186
kind: VirtualService
187
metadata:
188
  annotations:
189
    internal.istio.io/parents: HTTPRoute/http.allowed-1
190
    internal.istio.io/route-semantics: gateway
191
  creationTimestamp: null
192
  name: http-3-istio-autogenerated-k8s-gateway
193
  namespace: allowed-1
194
spec:
195
  gateways:
196
  - mesh
197
  hosts:
198
  - b-example.allowed-1.svc.domain.suffix
199
  http:
200
  - match:
201
    - headers:
202
        my-header:
203
          exact: some-value
204
      uri:
205
        prefix: /foo
206
    name: allowed-1.http.0
207
    route:
208
    - destination:
209
        host: svc1.allowed-1.svc.domain.suffix
210
        port:
211
          number: 80
212
  - match:
213
    - uri:
214
        regex: /foo((\/).*)?
215
    name: allowed-1.http.1
216
    route:
217
    - destination:
218
        host: svc2.allowed-1.svc.domain.suffix
219
        port:
220
          number: 80
221
---
222
apiVersion: networking.istio.io/v1alpha3
223
kind: VirtualService
224
metadata:
225
  annotations:
226
    internal.istio.io/parents: HTTPRoute/http.allowed-2
227
    internal.istio.io/route-semantics: gateway
228
  creationTimestamp: null
229
  name: http-0-istio-autogenerated-k8s-gateway
230
  namespace: allowed-2
231
spec:
232
  gateways:
233
  - mesh
234
  hosts:
235
  - a-example.allowed-2.svc.domain.suffix
236
  http:
237
  - match:
238
    - headers:
239
        my-header:
240
          exact: some-value
241
      queryParams:
242
        my-param:
243
          regex: some-value
244
      uri:
245
        exact: /baz
246
    name: allowed-2.http.1
247
    route:
248
    - destination:
249
        host: svc2.allowed-2.svc.domain.suffix
250
        port:
251
          number: 80
252
  - match:
253
    - uri:
254
        prefix: /foo/bar
255
    name: allowed-2.http.0
256
    route:
257
    - destination:
258
        host: svc2.allowed-2.svc.domain.suffix
259
        port:
260
          number: 80
261
  - match:
262
    - uri:
263
        prefix: /bar
264
    name: allowed-2.http.0
265
    route:
266
    - destination:
267
        host: svc2.allowed-2.svc.domain.suffix
268
        port:
269
          number: 80
270
  - match:
271
    - method:
272
        exact: PATCH
273
      uri:
274
        prefix: /
275
    name: allowed-2.http.3
276
    route:
277
    - destination:
278
        host: svc2.allowed-2.svc.domain.suffix
279
        port:
280
          number: 80
281
  - match:
282
    - uri:
283
        prefix: /
284
    name: allowed-2.http.2
285
    route:
286
    - destination:
287
        host: svc3.allowed-2.svc.domain.suffix
288
        port:
289
          number: 80
290
---
291

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.