kuma

Форк
0
/
kuma.io_meshloadbalancingstrategies.yaml 
536 строк · 30.2 Кб
1
---
2
apiVersion: apiextensions.k8s.io/v1
3
kind: CustomResourceDefinition
4
metadata:
5
  annotations:
6
    controller-gen.kubebuilder.io/version: v0.14.0
7
  name: meshloadbalancingstrategies.kuma.io
8
spec:
9
  group: kuma.io
10
  names:
11
    categories:
12
    - kuma
13
    kind: MeshLoadBalancingStrategy
14
    listKind: MeshLoadBalancingStrategyList
15
    plural: meshloadbalancingstrategies
16
    singular: meshloadbalancingstrategy
17
  scope: Namespaced
18
  versions:
19
  - additionalPrinterColumns:
20
    - jsonPath: .spec.targetRef.kind
21
      name: TargetRef Kind
22
      type: string
23
    - jsonPath: .spec.targetRef.name
24
      name: TargetRef Name
25
      type: string
26
    name: v1alpha1
27
    schema:
28
      openAPIV3Schema:
29
        properties:
30
          apiVersion:
31
            description: |-
32
              APIVersion defines the versioned schema of this representation of an object.
33
              Servers should convert recognized schemas to the latest internal value, and
34
              may reject unrecognized values.
35
              More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
36
            type: string
37
          kind:
38
            description: |-
39
              Kind is a string value representing the REST resource this object represents.
40
              Servers may infer this from the endpoint the client submits requests to.
41
              Cannot be updated.
42
              In CamelCase.
43
              More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
44
            type: string
45
          metadata:
46
            type: object
47
          spec:
48
            description: Spec is the specification of the Kuma MeshLoadBalancingStrategy
49
              resource.
50
            properties:
51
              targetRef:
52
                description: |-
53
                  TargetRef is a reference to the resource the policy takes an effect on.
54
                  The resource could be either a real store object or virtual resource
55
                  defined inplace.
56
                properties:
57
                  kind:
58
                    description: Kind of the referenced resource
59
                    enum:
60
                    - Mesh
61
                    - MeshSubset
62
                    - MeshGateway
63
                    - MeshService
64
                    - MeshServiceSubset
65
                    - MeshHTTPRoute
66
                    type: string
67
                  mesh:
68
                    description: Mesh is reserved for future use to identify cross
69
                      mesh resources.
70
                    type: string
71
                  name:
72
                    description: |-
73
                      Name of the referenced resource. Can only be used with kinds: `MeshService`,
74
                      `MeshServiceSubset` and `MeshGatewayRoute`
75
                    type: string
76
                  proxyTypes:
77
                    description: |-
78
                      ProxyTypes specifies the data plane types that are subject to the policy. When not specified,
79
                      all data plane types are targeted by the policy.
80
                    items:
81
                      enum:
82
                      - Sidecar
83
                      - Gateway
84
                      type: string
85
                    minItems: 1
86
                    type: array
87
                  tags:
88
                    additionalProperties:
89
                      type: string
90
                    description: |-
91
                      Tags used to select a subset of proxies by tags. Can only be used with kinds
92
                      `MeshSubset` and `MeshServiceSubset`
93
                    type: object
94
                type: object
95
              to:
96
                description: To list makes a match between the consumed services and
97
                  corresponding configurations
98
                items:
99
                  properties:
100
                    default:
101
                      description: |-
102
                        Default is a configuration specific to the group of destinations referenced in
103
                        'targetRef'
104
                      properties:
105
                        loadBalancer:
106
                          description: LoadBalancer allows to specify load balancing
107
                            algorithm.
108
                          properties:
109
                            leastRequest:
110
                              description: |-
111
                                LeastRequest selects N random available hosts as specified in 'choiceCount' (2 by default)
112
                                and picks the host which has the fewest active requests
113
                              properties:
114
                                activeRequestBias:
115
                                  anyOf:
116
                                  - type: integer
117
                                  - type: string
118
                                  description: |-
119
                                    ActiveRequestBias refers to dynamic weights applied when hosts have varying load
120
                                    balancing weights. A higher value here aggressively reduces the weight of endpoints
121
                                    that are currently handling active requests. In essence, the higher the ActiveRequestBias
122
                                    value, the more forcefully it reduces the load balancing weight of endpoints that are
123
                                    actively serving requests.
124
                                  x-kubernetes-int-or-string: true
125
                                choiceCount:
126
                                  description: |-
127
                                    ChoiceCount is the number of random healthy hosts from which the host with
128
                                    the fewest active requests will be chosen. Defaults to 2 so that Envoy performs
129
                                    two-choice selection if the field is not set.
130
                                  format: int32
131
                                  minimum: 2
132
                                  type: integer
133
                              type: object
134
                            maglev:
135
                              description: |-
136
                                Maglev implements consistent hashing to upstream hosts. Maglev can be used as
137
                                a drop in replacement for the ring hash load balancer any place in which
138
                                consistent hashing is desired.
139
                              properties:
140
                                hashPolicies:
141
                                  description: |-
142
                                    HashPolicies specify a list of request/connection properties that are used to calculate a hash.
143
                                    These hash policies are executed in the specified order. If a hash policy has the “terminal” attribute
144
                                    set to true, and there is already a hash generated, the hash is returned immediately,
145
                                    ignoring the rest of the hash policy list.
146
                                  items:
147
                                    properties:
148
                                      connection:
149
                                        properties:
150
                                          sourceIP:
151
                                            description: Hash on source IP address.
152
                                            type: boolean
153
                                        type: object
154
                                      cookie:
155
                                        properties:
156
                                          name:
157
                                            description: The name of the cookie that
158
                                              will be used to obtain the hash key.
159
                                            minLength: 1
160
                                            type: string
161
                                          path:
162
                                            description: The name of the path for
163
                                              the cookie.
164
                                            type: string
165
                                          ttl:
166
                                            description: If specified, a cookie with
167
                                              the TTL will be generated if the cookie
168
                                              is not present.
169
                                            type: string
170
                                        required:
171
                                        - name
172
                                        type: object
173
                                      filterState:
174
                                        properties:
175
                                          key:
176
                                            description: |-
177
                                              The name of the Object in the per-request filterState, which is
178
                                              an Envoy::Hashable object. If there is no data associated with the key,
179
                                              or the stored object is not Envoy::Hashable, no hash will be produced.
180
                                            minLength: 1
181
                                            type: string
182
                                        required:
183
                                        - key
184
                                        type: object
185
                                      header:
186
                                        properties:
187
                                          name:
188
                                            description: The name of the request header
189
                                              that will be used to obtain the hash
190
                                              key.
191
                                            minLength: 1
192
                                            type: string
193
                                        required:
194
                                        - name
195
                                        type: object
196
                                      queryParameter:
197
                                        properties:
198
                                          name:
199
                                            description: |-
200
                                              The name of the URL query parameter that will be used to obtain the hash key.
201
                                              If the parameter is not present, no hash will be produced. Query parameter names
202
                                              are case-sensitive.
203
                                            minLength: 1
204
                                            type: string
205
                                        required:
206
                                        - name
207
                                        type: object
208
                                      terminal:
209
                                        description: |-
210
                                          Terminal is a flag that short-circuits the hash computing. This field provides
211
                                          a ‘fallback’ style of configuration: “if a terminal policy doesn’t work, fallback
212
                                          to rest of the policy list”, it saves time when the terminal policy works.
213
                                          If true, and there is already a hash computed, ignore rest of the list of hash polices.
214
                                        type: boolean
215
                                      type:
216
                                        enum:
217
                                        - Header
218
                                        - Cookie
219
                                        - SourceIP
220
                                        - QueryParameter
221
                                        - FilterState
222
                                        type: string
223
                                    required:
224
                                    - type
225
                                    type: object
226
                                  type: array
227
                                tableSize:
228
                                  description: |-
229
                                    The table size for Maglev hashing. Maglev aims for “minimal disruption”
230
                                    rather than an absolute guarantee. Minimal disruption means that when
231
                                    the set of upstream hosts change, a connection will likely be sent
232
                                    to the same upstream as it was before. Increasing the table size reduces
233
                                    the amount of disruption. The table size must be prime number limited to 5000011.
234
                                    If it is not specified, the default is 65537.
235
                                  format: int32
236
                                  maximum: 5000011
237
                                  minimum: 1
238
                                  type: integer
239
                              type: object
240
                            random:
241
                              description: |-
242
                                Random selects a random available host. The random load balancer generally
243
                                performs better than round-robin if no health checking policy is configured.
244
                                Random selection avoids bias towards the host in the set that comes after a failed host.
245
                              type: object
246
                            ringHash:
247
                              description: |-
248
                                RingHash  implements consistent hashing to upstream hosts. Each host is mapped
249
                                onto a circle (the “ring”) by hashing its address; each request is then routed
250
                                to a host by hashing some property of the request, and finding the nearest
251
                                corresponding host clockwise around the ring.
252
                              properties:
253
                                hashFunction:
254
                                  description: |-
255
                                    HashFunction is a function used to hash hosts onto the ketama ring.
256
                                    The value defaults to XX_HASH. Available values – XX_HASH, MURMUR_HASH_2.
257
                                  enum:
258
                                  - XXHash
259
                                  - MurmurHash2
260
                                  type: string
261
                                hashPolicies:
262
                                  description: |-
263
                                    HashPolicies specify a list of request/connection properties that are used to calculate a hash.
264
                                    These hash policies are executed in the specified order. If a hash policy has the “terminal” attribute
265
                                    set to true, and there is already a hash generated, the hash is returned immediately,
266
                                    ignoring the rest of the hash policy list.
267
                                  items:
268
                                    properties:
269
                                      connection:
270
                                        properties:
271
                                          sourceIP:
272
                                            description: Hash on source IP address.
273
                                            type: boolean
274
                                        type: object
275
                                      cookie:
276
                                        properties:
277
                                          name:
278
                                            description: The name of the cookie that
279
                                              will be used to obtain the hash key.
280
                                            minLength: 1
281
                                            type: string
282
                                          path:
283
                                            description: The name of the path for
284
                                              the cookie.
285
                                            type: string
286
                                          ttl:
287
                                            description: If specified, a cookie with
288
                                              the TTL will be generated if the cookie
289
                                              is not present.
290
                                            type: string
291
                                        required:
292
                                        - name
293
                                        type: object
294
                                      filterState:
295
                                        properties:
296
                                          key:
297
                                            description: |-
298
                                              The name of the Object in the per-request filterState, which is
299
                                              an Envoy::Hashable object. If there is no data associated with the key,
300
                                              or the stored object is not Envoy::Hashable, no hash will be produced.
301
                                            minLength: 1
302
                                            type: string
303
                                        required:
304
                                        - key
305
                                        type: object
306
                                      header:
307
                                        properties:
308
                                          name:
309
                                            description: The name of the request header
310
                                              that will be used to obtain the hash
311
                                              key.
312
                                            minLength: 1
313
                                            type: string
314
                                        required:
315
                                        - name
316
                                        type: object
317
                                      queryParameter:
318
                                        properties:
319
                                          name:
320
                                            description: |-
321
                                              The name of the URL query parameter that will be used to obtain the hash key.
322
                                              If the parameter is not present, no hash will be produced. Query parameter names
323
                                              are case-sensitive.
324
                                            minLength: 1
325
                                            type: string
326
                                        required:
327
                                        - name
328
                                        type: object
329
                                      terminal:
330
                                        description: |-
331
                                          Terminal is a flag that short-circuits the hash computing. This field provides
332
                                          a ‘fallback’ style of configuration: “if a terminal policy doesn’t work, fallback
333
                                          to rest of the policy list”, it saves time when the terminal policy works.
334
                                          If true, and there is already a hash computed, ignore rest of the list of hash polices.
335
                                        type: boolean
336
                                      type:
337
                                        enum:
338
                                        - Header
339
                                        - Cookie
340
                                        - SourceIP
341
                                        - QueryParameter
342
                                        - FilterState
343
                                        type: string
344
                                    required:
345
                                    - type
346
                                    type: object
347
                                  type: array
348
                                maxRingSize:
349
                                  description: |-
350
                                    Maximum hash ring size. Defaults to 8M entries, and limited to 8M entries,
351
                                    but can be lowered to further constrain resource use.
352
                                  format: int32
353
                                  maximum: 8000000
354
                                  minimum: 1
355
                                  type: integer
356
                                minRingSize:
357
                                  description: |-
358
                                    Minimum hash ring size. The larger the ring is (that is,
359
                                    the more hashes there are for each provided host) the better the request distribution
360
                                    will reflect the desired weights. Defaults to 1024 entries, and limited to 8M entries.
361
                                  format: int32
362
                                  maximum: 8000000
363
                                  minimum: 1
364
                                  type: integer
365
                              type: object
366
                            roundRobin:
367
                              description: |-
368
                                RoundRobin is a load balancing algorithm that distributes requests
369
                                across available upstream hosts in round-robin order.
370
                              type: object
371
                            type:
372
                              enum:
373
                              - RoundRobin
374
                              - LeastRequest
375
                              - RingHash
376
                              - Random
377
                              - Maglev
378
                              type: string
379
                          required:
380
                          - type
381
                          type: object
382
                        localityAwareness:
383
                          description: LocalityAwareness contains configuration for
384
                            locality aware load balancing.
385
                          properties:
386
                            crossZone:
387
                              description: |-
388
                                CrossZone defines locality aware load balancing priorities when dataplane proxies inside local zone
389
                                are unavailable
390
                              properties:
391
                                failover:
392
                                  description: Failover defines list of load balancing
393
                                    rules in order of priority
394
                                  items:
395
                                    properties:
396
                                      from:
397
                                        description: From defines the list of zones
398
                                          to which the rule applies
399
                                        properties:
400
                                          zones:
401
                                            items:
402
                                              type: string
403
                                            type: array
404
                                        required:
405
                                        - zones
406
                                        type: object
407
                                      to:
408
                                        description: To defines to which zones the
409
                                          traffic should be load balanced
410
                                        properties:
411
                                          type:
412
                                            description: Type defines how target zones
413
                                              will be picked from available zones
414
                                            enum:
415
                                            - None
416
                                            - Only
417
                                            - Any
418
                                            - AnyExcept
419
                                            type: string
420
                                          zones:
421
                                            items:
422
                                              type: string
423
                                            type: array
424
                                        required:
425
                                        - type
426
                                        type: object
427
                                    required:
428
                                    - to
429
                                    type: object
430
                                  type: array
431
                                failoverThreshold:
432
                                  description: |-
433
                                    FailoverThreshold defines the percentage of live destination dataplane proxies below which load balancing to the
434
                                    next priority starts.
435
                                    Example: If you configure failoverThreshold to 70, and you have deployed 10 destination dataplane proxies.
436
                                    Load balancing to next priority will start when number of live destination dataplane proxies drops below 7.
437
                                    Default 50
438
                                  properties:
439
                                    percentage:
440
                                      anyOf:
441
                                      - type: integer
442
                                      - type: string
443
                                      x-kubernetes-int-or-string: true
444
                                  required:
445
                                  - percentage
446
                                  type: object
447
                              type: object
448
                            disabled:
449
                              description: |-
450
                                Disabled allows to disable locality-aware load balancing.
451
                                When disabled requests are distributed across all endpoints regardless of locality.
452
                              type: boolean
453
                            localZone:
454
                              description: LocalZone defines locality aware load balancing
455
                                priorities between dataplane proxies inside a zone
456
                              properties:
457
                                affinityTags:
458
                                  description: AffinityTags list of tags for local
459
                                    zone load balancing.
460
                                  items:
461
                                    properties:
462
                                      key:
463
                                        description: Key defines tag for which affinity
464
                                          is configured
465
                                        type: string
466
                                      weight:
467
                                        description: |-
468
                                          Weight of the tag used for load balancing. The bigger the weight the bigger the priority.
469
                                          Percentage of local traffic load balanced to tag is computed by dividing weight by sum of weights from all tags.
470
                                          For example with two affinity tags first with weight 80 and second with weight 20,
471
                                          then 80% of traffic will be redirected to the first tag, and 20% of traffic will be redirected to second one.
472
                                          Setting weights is not mandatory. When weights are not set control plane will compute default weight based on list order.
473
                                          Default: If you do not specify weight we will adjust them so that 90% traffic goes to first tag, 9% to next, and 1% to third and so on.
474
                                        format: int32
475
                                        type: integer
476
                                    required:
477
                                    - key
478
                                    type: object
479
                                  type: array
480
                              type: object
481
                          type: object
482
                      type: object
483
                    targetRef:
484
                      description: |-
485
                        TargetRef is a reference to the resource that represents a group of
486
                        destinations.
487
                      properties:
488
                        kind:
489
                          description: Kind of the referenced resource
490
                          enum:
491
                          - Mesh
492
                          - MeshSubset
493
                          - MeshGateway
494
                          - MeshService
495
                          - MeshServiceSubset
496
                          - MeshHTTPRoute
497
                          type: string
498
                        mesh:
499
                          description: Mesh is reserved for future use to identify
500
                            cross mesh resources.
501
                          type: string
502
                        name:
503
                          description: |-
504
                            Name of the referenced resource. Can only be used with kinds: `MeshService`,
505
                            `MeshServiceSubset` and `MeshGatewayRoute`
506
                          type: string
507
                        proxyTypes:
508
                          description: |-
509
                            ProxyTypes specifies the data plane types that are subject to the policy. When not specified,
510
                            all data plane types are targeted by the policy.
511
                          items:
512
                            enum:
513
                            - Sidecar
514
                            - Gateway
515
                            type: string
516
                          minItems: 1
517
                          type: array
518
                        tags:
519
                          additionalProperties:
520
                            type: string
521
                          description: |-
522
                            Tags used to select a subset of proxies by tags. Can only be used with kinds
523
                            `MeshSubset` and `MeshServiceSubset`
524
                          type: object
525
                      type: object
526
                  required:
527
                  - targetRef
528
                  type: object
529
                type: array
530
            required:
531
            - targetRef
532
            type: object
533
        type: object
534
    served: true
535
    storage: true
536
    subresources: {}
537

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

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

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

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