-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathapps.kusionstack.io_podtransitionrules.yaml
More file actions
478 lines (478 loc) · 23.5 KB
/
Copy pathapps.kusionstack.io_podtransitionrules.yaml
File metadata and controls
478 lines (478 loc) · 23.5 KB
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
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.15.0
name: podtransitionrules.apps.kusionstack.io
spec:
group: apps.kusionstack.io
names:
kind: PodTransitionRule
listKind: PodTransitionRuleList
plural: podtransitionrules
shortNames:
- ptr
singular: podtransitionrule
scope: Namespaced
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
description: PodTransitionRule is the Schema for the podtransitionrules API
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: PodTransitionRuleSpec defines the desired state of PodTransitionRule
properties:
rules:
description: Rules is a set of rules that need to be checked in certain
situations
items:
properties:
availablePolicy:
description: AvailablePolicy is the rule to check if the max
unavailable number is reached by current resource updated.
properties:
maxUnavailablePolicy:
description: MaxUnavailablePolicy is an option to apply
max unavailable by adaptive policy.
properties:
expFunc:
description: |-
ExpFunc is an exponentiation expression to calculate the expected value.
func: f(x) = coeff * x ^ pow.
properties:
coeff:
description: Coeff stands for coefficient in this
exponentiation.
type: string
pow:
description: Pow stands for power in this exponentiation.
type: string
type: object
type: object
maxUnavailableValue:
anyOf:
- type: integer
- type: string
description: |-
MaxUnavailableValue is the expected max unavailable replicas which is allowed to be an integer or a percentage of the whole
number of the target resources.
x-kubernetes-int-or-string: true
minAvailablePolicy:
description: MaxUnavailablePolicy is an option to apply
min available by adaptive policy.
properties:
expFunc:
description: |-
ExpFunc is an exponentiation expression to calculate the expected value.
func: f(x) = coeff * x ^ pow.
properties:
coeff:
description: Coeff stands for coefficient in this
exponentiation.
type: string
pow:
description: Pow stands for power in this exponentiation.
type: string
type: object
type: object
minAvailableValue:
anyOf:
- type: integer
- type: string
description: |-
MinAvailableValue is the expected min available replicas which is allowed to be an integer or a percentage of the whole
number of the target resources.
x-kubernetes-int-or-string: true
type: object
conditions:
description: Conditions is the condition to control this rule
enable or not.
items:
type: string
type: array
disabled:
description: Disabled is the switch to control this rule enable
or not.
type: boolean
filter:
description: Filter is used to filter the resource which will
be applied with this rule.
properties:
labelSelector:
description: LabelSelector is used to filter resource with
label match expression.
properties:
matchExpressions:
description: matchExpressions is a list of label selector
requirements. The requirements are ANDed.
items:
description: |-
A label selector requirement is a selector that contains values, a key, and an operator that
relates the key and values.
properties:
key:
description: key is the label key that the selector
applies to.
type: string
operator:
description: |-
operator represents a key's relationship to a set of values.
Valid operators are In, NotIn, Exists and DoesNotExist.
type: string
values:
description: |-
values is an array of string values. If the operator is In or NotIn,
the values array must be non-empty. If the operator is Exists or DoesNotExist,
the values array must be empty. This array is replaced during a strategic
merge patch.
items:
type: string
type: array
required:
- key
- operator
type: object
type: array
matchLabels:
additionalProperties:
type: string
description: |-
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
map is equivalent to an element of matchExpressions, whose key field is "key", the
operator is "In", and the values array contains only "value". The requirements are ANDed.
type: object
type: object
x-kubernetes-map-type: atomic
type: object
labelCheck:
description: LabelCheck is the rule to check labels on pods.
properties:
requires:
description: Requires is the expected labels on pods
properties:
matchExpressions:
description: matchExpressions is a list of label selector
requirements. The requirements are ANDed.
items:
description: |-
A label selector requirement is a selector that contains values, a key, and an operator that
relates the key and values.
properties:
key:
description: key is the label key that the selector
applies to.
type: string
operator:
description: |-
operator represents a key's relationship to a set of values.
Valid operators are In, NotIn, Exists and DoesNotExist.
type: string
values:
description: |-
values is an array of string values. If the operator is In or NotIn,
the values array must be non-empty. If the operator is Exists or DoesNotExist,
the values array must be empty. This array is replaced during a strategic
merge patch.
items:
type: string
type: array
required:
- key
- operator
type: object
type: array
matchLabels:
additionalProperties:
type: string
description: |-
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
map is equivalent to an element of matchExpressions, whose key field is "key", the
operator is "In", and the values array contains only "value". The requirements are ANDed.
type: object
type: object
x-kubernetes-map-type: atomic
required:
- requires
type: object
name:
description: Name is the name of this rule.
type: string
stage:
type: string
webhook:
properties:
clientConfig:
description: ClientConfig is the configuration for accessing
webhook.
properties:
caBundle:
description: CABundle is a PEM encoded CA bundle which
will be used to validate the webhook's server certificate.
type: string
poll:
description: Poll is the polling to query url.
properties:
caBundle:
description: CABundle is a PEM encoded CA bundle
which will be used to validate the webhook's server
certificate.
type: string
intervalSeconds:
description: Interval give the request time interval,
default 5s
format: int64
type: integer
rawQueryKey:
description: ReplaceRawQuery used to replace raw
key. QueryUrl=URL?rawQueryKey=<task-id>, default
is task-id
type: string
timeoutSeconds:
description: TimeoutSeconds give the request time
timeout, default 60s
format: int64
type: integer
url:
description: URL gives the location of the webhook,
URL?task-id=<task-id>
type: string
required:
- url
type: object
url:
description: URL gives the location of the webhook.
type: string
required:
- url
type: object
failurePolicy:
description: |-
FailurePolicy defines how unrecognized errors from the admission endpoint are handled -
allowed values are Ignore or Fail. Defaults to Ignore.
type: string
parameters:
description: Parameters contains the list of parameters
which will be passed in webhook body.
items:
properties:
key:
description: Key is the parameter key.
type: string
value:
description: |-
Value is the string value of this parameter.
Defaults to "".
type: string
valueFrom:
description: Source for the parameter's value. Cannot
be used if value is not empty.
properties:
fieldRef:
description: |-
Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations,
spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP.
properties:
apiVersion:
description: Version of the schema the FieldPath
is written in terms of, defaults to "v1".
type: string
fieldPath:
description: Path of the field to select in
the specified API version.
type: string
required:
- fieldPath
type: object
x-kubernetes-map-type: atomic
type:
description: Type defines target pod type.
type: string
type: object
type: object
type: array
type: object
type: object
type: array
selector:
description: Selector select the targets controlled by podtransitionrule
properties:
matchExpressions:
description: matchExpressions is a list of label selector requirements.
The requirements are ANDed.
items:
description: |-
A label selector requirement is a selector that contains values, a key, and an operator that
relates the key and values.
properties:
key:
description: key is the label key that the selector applies
to.
type: string
operator:
description: |-
operator represents a key's relationship to a set of values.
Valid operators are In, NotIn, Exists and DoesNotExist.
type: string
values:
description: |-
values is an array of string values. If the operator is In or NotIn,
the values array must be non-empty. If the operator is Exists or DoesNotExist,
the values array must be empty. This array is replaced during a strategic
merge patch.
items:
type: string
type: array
required:
- key
- operator
type: object
type: array
matchLabels:
additionalProperties:
type: string
description: |-
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
map is equivalent to an element of matchExpressions, whose key field is "key", the
operator is "In", and the values array contains only "value". The requirements are ANDed.
type: object
type: object
x-kubernetes-map-type: atomic
type: object
status:
description: PodTransitionRuleStatus defines the observed state of PodTransitionRule
properties:
details:
description: Details contains all pods podtransitionrule details
items:
properties:
name:
description: Name representing Pod name
type: string
passed:
description: Passed indicates whether the pod passed all rules
type: boolean
passedRules:
items:
type: string
type: array
rejectInfo:
items:
properties:
reason:
type: string
ruleName:
type: string
type: object
type: array
stage:
description: Stage is pod current stage
type: string
required:
- passed
type: object
type: array
observedGeneration:
description: ObservedGeneration is the most recent generation observed
for PodTransitionRule
format: int64
type: integer
ruleStates:
description: RuleStates contains the RuleState resource info in webhook
processing progress.
items:
description: RuleState defines the resource info in webhook processing
progress.
properties:
name:
description: Name is the name representing the rule
type: string
webhookStatus:
description: WebhookStatus is the webhook status representing
processing progress
properties:
history:
description: History records history taskStates which were
finished or failed. Valid for 10 minutes
items:
properties:
approved:
items:
type: string
type: array
beginTime:
format: date-time
type: string
lastTime:
format: date-time
type: string
message:
type: string
processing:
items:
type: string
type: array
taskId:
type: string
type: object
type: array
taskStates:
description: TaskStates is a list of tracing info
items:
properties:
approved:
items:
type: string
type: array
beginTime:
format: date-time
type: string
lastTime:
format: date-time
type: string
message:
type: string
processing:
items:
type: string
type: array
taskId:
type: string
type: object
type: array
type: object
type: object
type: array
targets:
description: Targets contains the target resource names this PodTransitionRule
is able to select.
items:
type: string
type: array
updateTime:
format: date-time
type: string
type: object
type: object
served: true
storage: true
subresources:
status: {}