-
Notifications
You must be signed in to change notification settings - Fork 28
/
stackset_crd.yaml
7853 lines (7792 loc) · 551 KB
/
stackset_crd.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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.16.1
name: stacksets.zalando.org
spec:
group: zalando.org
names:
categories:
- all
kind: StackSet
listKind: StackSetList
plural: stacksets
singular: stackset
scope: Namespaced
versions:
- additionalPrinterColumns:
- description: Number of Stacks belonging to the StackSet
jsonPath: .status.stacks
name: Stacks
type: integer
- description: Number of Ready Stacks
jsonPath: .status.readyStacks
name: Ready
type: integer
- description: Number of Ready Stacks with traffic
jsonPath: .status.stacksWithTraffic
name: Traffic
type: integer
- description: Age of the stack
jsonPath: .metadata.creationTimestamp
name: Age
type: date
name: v1
schema:
openAPIV3Schema:
description: StackSet describes an application resource.
properties:
apiVersion:
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
spec:
description: StackSetSpec is the spec part of the StackSet.
properties:
externalIngress:
description: |-
ExternalIngress is used to specify the backend port to
generate the services for the stacks.
properties:
backendPort:
anyOf:
- type: integer
- type: string
x-kubernetes-int-or-string: true
required:
- backendPort
type: object
ingress:
description: |-
Ingress is the information we need to create ingress and
service. Ingress is optional, because other controller
might create ingress objects, but stackset owns the traffic
switch. In this case we would only have a Traffic, but no
ingress.
properties:
backendPort:
anyOf:
- type: integer
- type: string
x-kubernetes-int-or-string: true
hosts:
items:
type: string
minItems: 1
type: array
x-kubernetes-list-type: set
metadata:
description: |-
EmbeddedObjectMetaWithAnnotations defines the metadata which can be attached
to a resource. It's a slimmed down version of metav1.ObjectMeta only
containing annotations.
properties:
annotations:
additionalProperties:
type: string
description: |-
Annotations is an unstructured key value map stored with a resource that may be
set by external tools to store and retrieve arbitrary metadata. They are not
queryable and should be preserved when modifying objects.
More info: http://kubernetes.io/docs/user-guide/annotations
type: object
type: object
path:
type: string
required:
- backendPort
- hosts
type: object
minReadyPercent:
description: |-
minReadyPercent sets the minimum percentage of Pods expected
to be Ready to consider a Stack for traffic switch
type: integer
routegroup:
description: |-
RouteGroup is an alternative to ingress allowing more advanced
routing configuration while still maintaining the ability to switch
traffic to stacks. Use this if you need skipper filters or
predicates.
properties:
additionalBackends:
description: |-
AdditionalBackends is the list of additional backends to use for
routing.
items:
properties:
address:
description: Address is required for type `network`
type: string
algorithm:
description: |-
Algorithm is required for type `lb`.
`roundRobin` - backend is chosen by the round robin algorithm, starting with a random selected backend to spread across all backends from the beginning.
`random` - backend is chosen at random.
`consistentHash` - backend is chosen by [consistent hashing](https://en.wikipedia.org/wiki/Consistent_hashing) algorithm based on the request key. The request key is derived from `X-Forwarded-For` header or request remote IP address as the fallback. Use [`consistentHashKey`](filters.md#consistenthashkey) filter to set the request key. Use [`consistentHashBalanceFactor`](filters.md#consistenthashbalancefactor) to prevent popular keys from overloading a single backend endpoint.
`powerOfRandomNChoices` - backend is chosen by selecting N random endpoints and picking the one with least outstanding requests from them (see http://www.eecs.harvard.edu/~michaelm/postscripts/handbook2001.pdf).
enum:
- roundRobin
- random
- consistentHash
- powerOfRandomNChoices
type: string
endpoints:
description: Endpoints is required for type `lb`
items:
type: string
minItems: 1
type: array
name:
description: Name is the BackendName that can be referenced
as RouteGroupBackendReference
type: string
serviceName:
description: ServiceName is required for type `service`
type: string
servicePort:
description: ServicePort is required for type `service`
type: integer
type:
description: |-
Type of the backend.
`service`- resolve Kubernetes service to the available Endpoints belonging to the Service, and generate load balanced routes using them.
`shunt` - reply directly from the proxy itself. This can be used to shortcut, for example have a default that replies with 404 or use skipper as a backend serving static content in demos.
`loopback` - lookup again the routing table to a better matching route after processing the current route. Like this you can add some headers or change the request path for some specific matching requests.
`dynamic` - use the backend provided by filters. This allows skipper as library users to do proxy calls to a certain target from their own implementation dynamically looked up by their filters.
`lb` - balance the load across multiple network endpoints using specified algorithm. If algorithm is not specified it will use the default algorithm set by Skipper at start.
`network` - use arbitrary HTTP or HTTPS URL.
enum:
- service
- shunt
- loopback
- dynamic
- lb
- network
type: string
required:
- name
- type
type: object
type: array
backendPort:
type: integer
hosts:
description: Hosts is the list of hostnames to add to the routegroup.
items:
type: string
minItems: 1
type: array
x-kubernetes-list-type: set
lbAlgorithm:
description: The load balancing algorithm used for the generated
per stack backends.
type: string
metadata:
description: |-
EmbeddedObjectMetaWithAnnotations defines the metadata which can be attached
to a resource. It's a slimmed down version of metav1.ObjectMeta only
containing annotations.
properties:
annotations:
additionalProperties:
type: string
description: |-
Annotations is an unstructured key value map stored with a resource that may be
set by external tools to store and retrieve arbitrary metadata. They are not
queryable and should be preserved when modifying objects.
More info: http://kubernetes.io/docs/user-guide/annotations
type: object
type: object
routes:
description: Routes is the list of routes to be applied to the
routegroup.
items:
properties:
backends:
description: |-
RouteGroupBackendReference specifies the list of backendReference that should
be applied to override the defaultBackends
items:
properties:
backendName:
description: BackendName references backend by name
type: string
weight:
description: |-
Weight defines a portion of traffic for the referenced backend.
It equals to weight divided by the sum of all backend weights.
When all references have zero (or unspecified) weight then traffic is split equally between them.
minimum: 0
type: integer
required:
- backendName
type: object
type: array
filters:
description: Filters specifies the list of filters applied
to the routeSpec
items:
type: string
type: array
methods:
description: Methods defines valid HTTP methods for the
specified routeSpec
items:
description: HTTPMethod is a valid HTTP method in uppercase.
enum:
- GET
- HEAD
- POST
- PUT
- PATCH
- DELETE
- CONNECT
- OPTIONS
- TRACE
type: string
type: array
path:
description: Path specifies Path predicate, only one of
Path or PathSubtree is allowed
type: string
pathRegexp:
description: PathRegexp can be added additionally
type: string
pathSubtree:
description: PathSubtree specifies PathSubtree predicate,
only one of Path or PathSubtree is allowed
type: string
predicates:
description: Predicates specifies the list of predicates
applied to the routeSpec
items:
type: string
type: array
type: object
minItems: 1
type: array
required:
- backendPort
- hosts
- routes
type: object
stackLifecycle:
description: StackLifecycle defines the cleanup rules for old stacks.
properties:
limit:
description: |-
Limit defines the maximum number of Stacks to keep around. If the
number of Stacks exceeds the limit then the oldest stacks which are
not getting traffic are deleted.
format: int32
minimum: 1
type: integer
scaledownTTLSeconds:
description: |-
ScaledownTTLSeconds is the ttl in seconds for when Stacks of a
StackSet should be scaled down to 0 replicas in case they are not
getting traffic.
Defaults to 300 seconds.
format: int64
type: integer
type: object
stackTemplate:
description: |-
StackTemplate container for resources to be created that
belong to one stack.
properties:
metadata:
description: |-
EmbeddedObjectMetaWithAnnotations defines the metadata which can be attached
to a resource. It's a slimmed down version of metav1.ObjectMeta only
containing annotations.
properties:
annotations:
additionalProperties:
type: string
description: |-
Annotations is an unstructured key value map stored with a resource that may be
set by external tools to store and retrieve arbitrary metadata. They are not
queryable and should be preserved when modifying objects.
More info: http://kubernetes.io/docs/user-guide/annotations
type: object
type: object
spec:
description: StackSpecTemplate is the spec part of the Stack.
properties:
autoscaler:
description: Autoscaler is the autoscaling definition for
a stack
properties:
behavior:
description: |-
behavior configures the scaling behavior of the target
in both Up and Down directions (scaleUp and scaleDown fields respectively).
If not set, the default HPAScalingRules for scale up and scale down are used.
properties:
scaleDown:
description: |-
scaleDown is scaling policy for scaling Down.
If not set, the default value is to allow to scale down to minReplicas pods, with a
300 second stabilization window (i.e., the highest recommendation for
the last 300sec is used).
properties:
policies:
description: |-
policies is a list of potential scaling polices which can be used during scaling.
At least one policy must be specified, otherwise the HPAScalingRules will be discarded as invalid
items:
description: HPAScalingPolicy is a single policy
which must hold true for a specified past
interval.
properties:
periodSeconds:
description: |-
periodSeconds specifies the window of time for which the policy should hold true.
PeriodSeconds must be greater than zero and less than or equal to 1800 (30 min).
format: int32
type: integer
type:
description: type is used to specify the
scaling policy.
type: string
value:
description: |-
value contains the amount of change which is permitted by the policy.
It must be greater than zero
format: int32
type: integer
required:
- periodSeconds
- type
- value
type: object
type: array
x-kubernetes-list-type: atomic
selectPolicy:
description: |-
selectPolicy is used to specify which policy should be used.
If not set, the default value Max is used.
type: string
stabilizationWindowSeconds:
description: |-
stabilizationWindowSeconds is the number of seconds for which past recommendations should be
considered while scaling up or scaling down.
StabilizationWindowSeconds must be greater than or equal to zero and less than or equal to 3600 (one hour).
If not set, use the default values:
- For scale up: 0 (i.e. no stabilization is done).
- For scale down: 300 (i.e. the stabilization window is 300 seconds long).
format: int32
type: integer
type: object
scaleUp:
description: |-
scaleUp is scaling policy for scaling Up.
If not set, the default value is the higher of:
* increase no more than 4 pods per 60 seconds
* double the number of pods per 60 seconds
No stabilization is used.
properties:
policies:
description: |-
policies is a list of potential scaling polices which can be used during scaling.
At least one policy must be specified, otherwise the HPAScalingRules will be discarded as invalid
items:
description: HPAScalingPolicy is a single policy
which must hold true for a specified past
interval.
properties:
periodSeconds:
description: |-
periodSeconds specifies the window of time for which the policy should hold true.
PeriodSeconds must be greater than zero and less than or equal to 1800 (30 min).
format: int32
type: integer
type:
description: type is used to specify the
scaling policy.
type: string
value:
description: |-
value contains the amount of change which is permitted by the policy.
It must be greater than zero
format: int32
type: integer
required:
- periodSeconds
- type
- value
type: object
type: array
x-kubernetes-list-type: atomic
selectPolicy:
description: |-
selectPolicy is used to specify which policy should be used.
If not set, the default value Max is used.
type: string
stabilizationWindowSeconds:
description: |-
stabilizationWindowSeconds is the number of seconds for which past recommendations should be
considered while scaling up or scaling down.
StabilizationWindowSeconds must be greater than or equal to zero and less than or equal to 3600 (one hour).
If not set, use the default values:
- For scale up: 0 (i.e. no stabilization is done).
- For scale down: 300 (i.e. the stabilization window is 300 seconds long).
format: int32
type: integer
type: object
type: object
maxReplicas:
description: |-
maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up.
It cannot be less that minReplicas.
format: int32
type: integer
metrics:
items:
description: AutoscalerMetrics is the type of metric
to be be used for autoscaling.
properties:
average:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
averageUtilization:
format: int32
type: integer
clusterScalingSchedule:
description: |-
MetricsClusterScalingSchedule specifies the ClusterScalingSchedule
object which should be used for scaling.
properties:
name:
description: The name of the referenced ClusterScalingSchedule
object.
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
type: string
required:
- name
type: object
container:
description: |-
optional container name that can be used to scale based on CPU or
Memory metrics of a specific container as opposed to an average of
all containers in a pod.
type: string
endpoint:
description: |-
MetricsEndpoint specified the endpoint where the custom endpoint where the metrics
can be queried
properties:
key:
type: string
name:
type: string
path:
type: string
port:
format: int32
type: integer
required:
- key
- name
- path
- port
type: object
queue:
description: |-
MetricsQueue specifies the SQS queue whose length should be used for
scaling.
properties:
name:
type: string
region:
type: string
required:
- name
- region
type: object
requestsPerSecond:
description: |-
MetricRequestsPerSecond specifies basic information to scale based on
on external RPS metric.
properties:
hostnames:
items:
type: string
type: array
required:
- hostnames
type: object
scalingSchedule:
description: |-
MetricsScalingSchedule specifies the ScalingSchedule object which
should be used for scaling.
properties:
name:
description: The name of the referenced ScalingSchedule
object.
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
type: string
required:
- name
type: object
type:
description: AutoscalerMetricType is the type of
the metric used for scaling.
enum:
- CPU
- Memory
- AmazonSQS
- PodJSON
- Ingress
- RouteGroup
- ZMON
- ScalingSchedule
- ClusterScalingSchedule
- RequestsPerSecond
type: string
zmon:
description: MetricsZMON specifies the ZMON check
which should be used for scaling.
properties:
aggregators:
items:
description: |-
ZMONMetricAggregatorType is the type of aggregator used in a ZMON based
metric.
enum:
- avg
- dev
- count
- first
- last
- max
- min
- sum
- diff
type: string
type: array
checkID:
pattern: ^[0-9]+$
type: string
duration:
default: 5m
type: string
key:
type: string
tags:
additionalProperties:
type: string
type: object
required:
- checkID
- key
type: object
required:
- type
type: object
type: array
minReplicas:
description: |-
minReplicas is the lower limit for the number of replicas to which the autoscaler can scale down.
It defaults to 1 pod.
format: int32
type: integer
required:
- maxReplicas
- metrics
type: object
configurationResources:
description: |-
ConfigurationResources describes the ConfigMaps, Secrets, and/or
PlatformCredentialsSet that will be created.
items:
description: ConfigurationResourcesSpec makes it possible
to defined the config resources to be created
properties:
configMap:
description: ConfigMap is an inline ConfigMap to be
owned by Stack
properties:
data:
additionalProperties:
type: string
description: Data is the data of the ConfigMap.
type: object
name:
description: Name is the name of the ConfigMap.
type: string
type: object
configMapRef:
description: ConfigMapRef is a reference to a ConfigMap
to be owned by Stack
properties:
name:
default: ""
description: |-
Name of the referent.
This field is effectively required, but due to backwards compatibility is
allowed to be empty. Instances of this type with an empty value here are
almost certainly wrong.
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
type: string
type: object
x-kubernetes-map-type: atomic
platformCredentialsSet:
description: PlatformCredentialsSet to be created and
owned by Stack
properties:
name:
type: string
tokens:
additionalProperties:
properties:
privileges:
items:
type: string
type: array
required:
- privileges
type: object
type: object
type: object
secretRef:
description: SecretRef is a reference to a Secret to
be owned by Stack
properties:
name:
default: ""
description: |-
Name of the referent.
This field is effectively required, but due to backwards compatibility is
allowed to be empty. Instances of this type with an empty value here are
almost certainly wrong.
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
type: string
type: object
x-kubernetes-map-type: atomic
type: object
type: array
minReadySeconds:
description: |-
Minimum number of seconds for which a newly created pod should be ready
without any of its container crashing, for it to be considered available.
Defaults to 0 (pod will be considered available as soon as it is ready)
format: int32
type: integer
podTemplate:
description: PodTemplate describes the pods that will be created.
properties:
metadata:
description: Object's metadata.
properties:
annotations:
additionalProperties:
type: string
description: |-
Annotations is an unstructured key value map stored with a resource that may be
set by external tools to store and retrieve arbitrary metadata. They are not
queryable and should be preserved when modifying objects.
More info: http://kubernetes.io/docs/user-guide/annotations
type: object
labels:
additionalProperties:
type: string
description: |-
Map of string keys and values that can be used to organize and categorize
(scope and select) objects. May match selectors of replication controllers
and services.
More info: http://kubernetes.io/docs/user-guide/labels
type: object
type: object
spec:
description: |-
Specification of the desired behavior of the pod.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
properties:
activeDeadlineSeconds:
description: |-
Optional duration in seconds the pod may be active on the node relative to
StartTime before the system will actively try to mark it failed and kill associated containers.
Value must be a positive integer.
format: int64
type: integer
affinity:
description: If specified, the pod's scheduling constraints
properties:
nodeAffinity:
description: Describes node affinity scheduling
rules for the pod.
properties:
preferredDuringSchedulingIgnoredDuringExecution:
description: |-
The scheduler will prefer to schedule pods to nodes that satisfy
the affinity expressions specified by this field, but it may choose
a node that violates one or more of the expressions. The node that is
most preferred is the one with the greatest sum of weights, i.e.
for each node that meets all of the scheduling requirements (resource
request, requiredDuringScheduling affinity expressions, etc.),
compute a sum by iterating through the elements of this field and adding
"weight" to the sum if the node matches the corresponding matchExpressions; the
node(s) with the highest sum are the most preferred.
items:
description: |-
An empty preferred scheduling term matches all objects with implicit weight 0
(i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op).
properties:
preference:
description: A node selector term, associated
with the corresponding weight.
properties:
matchExpressions:
items:
properties:
key:
type: string
operator:
type: string
values:
items:
type: string
type: array
x-kubernetes-list-type: atomic
required:
- key
- operator
type: object
type: array
x-kubernetes-list-type: atomic
matchFields:
items:
properties:
key:
type: string
operator:
type: string
values:
items:
type: string
type: array
x-kubernetes-list-type: atomic
required:
- key
- operator
type: object
type: array
x-kubernetes-list-type: atomic
type: object
x-kubernetes-map-type: atomic
weight:
description: Weight associated with
matching the corresponding nodeSelectorTerm,
in the range 1-100.
format: int32
type: integer
required:
- preference
- weight
type: object
type: array
x-kubernetes-list-type: atomic
requiredDuringSchedulingIgnoredDuringExecution:
description: |-
If the affinity requirements specified by this field are not met at
scheduling time, the pod will not be scheduled onto the node.
If the affinity requirements specified by this field cease to be met
at some point during pod execution (e.g. due to an update), the system
may or may not try to eventually evict the pod from its node.
properties:
nodeSelectorTerms:
description: Required. A list of node
selector terms. The terms are ORed.
items:
description: |-
A null or empty node selector term matches no objects. The requirements of
them are ANDed.
The TopologySelectorTerm type implements a subset of the NodeSelectorTerm.
properties:
matchExpressions:
items:
properties:
key:
type: string
operator:
type: string
values:
items:
type: string
type: array
x-kubernetes-list-type: atomic
required:
- key
- operator
type: object
type: array
x-kubernetes-list-type: atomic
matchFields:
items:
properties:
key:
type: string
operator:
type: string
values:
items:
type: string
type: array
x-kubernetes-list-type: atomic
required:
- key
- operator
type: object
type: array
x-kubernetes-list-type: atomic
type: object
x-kubernetes-map-type: atomic
type: array
x-kubernetes-list-type: atomic
required:
- nodeSelectorTerms
type: object
x-kubernetes-map-type: atomic
type: object
podAffinity:
description: Describes pod affinity scheduling
rules (e.g. co-locate this pod in the same node,
zone, etc. as some other pod(s)).
properties:
preferredDuringSchedulingIgnoredDuringExecution:
description: |-
The scheduler will prefer to schedule pods to nodes that satisfy
the affinity expressions specified by this field, but it may choose
a node that violates one or more of the expressions. The node that is
most preferred is the one with the greatest sum of weights, i.e.
for each node that meets all of the scheduling requirements (resource
request, requiredDuringScheduling affinity expressions, etc.),
compute a sum by iterating through the elements of this field and adding
"weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the
node(s) with the highest sum are the most preferred.
items:
description: The weights of all of the matched
WeightedPodAffinityTerm fields are added
per-node to find the most preferred node(s)
properties:
podAffinityTerm:
description: Required. A pod affinity
term, associated with the corresponding
weight.
properties:
labelSelector:
properties:
matchExpressions:
items:
properties:
key:
type: string
operator:
type: string
values:
items:
type: string
type: array
x-kubernetes-list-type: atomic
required:
- key
- operator
type: object
type: array
x-kubernetes-list-type: atomic
matchLabels:
additionalProperties:
type: string
type: object
type: object
x-kubernetes-map-type: atomic
matchLabelKeys:
items:
type: string
type: array
x-kubernetes-list-type: atomic
mismatchLabelKeys:
items:
type: string
type: array
x-kubernetes-list-type: atomic
namespaceSelector:
properties:
matchExpressions:
items:
properties:
key:
type: string
operator:
type: string
values:
items:
type: string
type: array
x-kubernetes-list-type: atomic
required:
- key
- operator
type: object
type: array
x-kubernetes-list-type: atomic
matchLabels:
additionalProperties:
type: string
type: object
type: object
x-kubernetes-map-type: atomic
namespaces:
items:
type: string
type: array
x-kubernetes-list-type: atomic
topologyKey:
type: string
required:
- topologyKey
type: object
weight:
description: |-
weight associated with matching the corresponding podAffinityTerm,
in the range 1-100.
format: int32
type: integer
required:
- podAffinityTerm
- weight
type: object
type: array
x-kubernetes-list-type: atomic
requiredDuringSchedulingIgnoredDuringExecution:
description: |-
If the affinity requirements specified by this field are not met at
scheduling time, the pod will not be scheduled onto the node.
If the affinity requirements specified by this field cease to be met
at some point during pod execution (e.g. due to a pod label update), the
system may or may not try to eventually evict the pod from its node.
When there are multiple elements, the lists of nodes corresponding to each
podAffinityTerm are intersected, i.e. all terms must be satisfied.
items:
description: |-
Defines a set of pods (namely those matching the labelSelector
relative to the given namespace(s)) that this pod should be
co-located (affinity) or not co-located (anti-affinity) with,
where co-located is defined as running on a node whose value of
the label with key <topologyKey> matches that of any node on which
a pod of the set of pods is running
properties:
labelSelector:
description: |-