|
214 | 214 | "pattern": "^cr-[0-9a-z]+$", |
215 | 215 | "type": "string" |
216 | 216 | }, |
| 217 | + "instanceMatchCriteria": { |
| 218 | + "description": "InstanceMatchCriteria specifies how instances are matched to capacity reservations.", |
| 219 | + "enum": [ |
| 220 | + "open", |
| 221 | + "targeted" |
| 222 | + ], |
| 223 | + "type": "string" |
| 224 | + }, |
217 | 225 | "ownerID": { |
218 | 226 | "description": "Owner is the owner id for the ami.", |
219 | 227 | "pattern": "^[0-9]{12}$", |
|
241 | 249 | "type": "array", |
242 | 250 | "x-kubernetes-validations": [ |
243 | 251 | { |
244 | | - "message": "expected at least one, got none, ['tags', 'id']", |
245 | | - "rule": "self.all(x, has(x.tags) || has(x.id))" |
| 252 | + "message": "expected at least one, got none, ['tags', 'id', 'instanceMatchCriteria']", |
| 253 | + "rule": "self.all(x, has(x.tags) || has(x.id) || has(x.instanceMatchCriteria))" |
246 | 254 | }, |
247 | 255 | { |
248 | | - "message": "'id' is mutually exclusive, cannot be set along with tags in a capacity reservation selector term", |
249 | | - "rule": "!self.all(x, has(x.id) && (has(x.tags) || has(x.ownerID)))" |
| 256 | + "message": "'id' is mutually exclusive, cannot be set along with other fields in a capacity reservation selector term", |
| 257 | + "rule": "!self.all(x, has(x.id) && (has(x.tags) || has(x.ownerID) || has(x.instanceMatchCriteria)))" |
250 | 258 | } |
251 | 259 | ] |
252 | 260 | }, |
|
275 | 283 | ], |
276 | 284 | "type": "string" |
277 | 285 | }, |
| 286 | + "ipPrefixCount": { |
| 287 | + "description": "IPPrefixCount sets the number of IPv4 prefixes to be automatically assigned to the network interface.", |
| 288 | + "format": "int32", |
| 289 | + "minimum": 0, |
| 290 | + "type": "integer" |
| 291 | + }, |
278 | 292 | "kubelet": { |
279 | 293 | "description": "Kubelet defines args to be used when configuring kubelet on provisioned nodes.\nThey are a subset of the upstream types, recognizing not all options may be supported.\nWherever possible, the types and names should reflect the upstream kubelet types.", |
280 | 294 | "properties": { |
|
291 | 305 | }, |
292 | 306 | "evictionHard": { |
293 | 307 | "additionalProperties": { |
294 | | - "pattern": "^((\\d{1,2}(\\.\\d{1,2})?|100(\\.0{1,2})?)%||(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?)$", |
295 | | - "type": "string" |
| 308 | + "type": "string", |
| 309 | + "pattern": "^((\\d{1,2}(\\.\\d{1,2})?|100(\\.0{1,2})?)%||(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?)$" |
296 | 310 | }, |
297 | 311 | "description": "EvictionHard is the map of signal names to quantities that define hard eviction thresholds", |
298 | 312 | "type": "object", |
|
310 | 324 | }, |
311 | 325 | "evictionSoft": { |
312 | 326 | "additionalProperties": { |
313 | | - "pattern": "^((\\d{1,2}(\\.\\d{1,2})?|100(\\.0{1,2})?)%||(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?)$", |
314 | | - "type": "string" |
| 327 | + "type": "string", |
| 328 | + "pattern": "^((\\d{1,2}(\\.\\d{1,2})?|100(\\.0{1,2})?)%||(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?)$" |
315 | 329 | }, |
316 | 330 | "description": "EvictionSoft is the map of signal names to quantities that define soft eviction thresholds", |
317 | 331 | "type": "object", |
|
351 | 365 | }, |
352 | 366 | "kubeReserved": { |
353 | 367 | "additionalProperties": { |
354 | | - "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$", |
355 | | - "type": "string" |
| 368 | + "type": "string", |
| 369 | + "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$" |
356 | 370 | }, |
357 | 371 | "description": "KubeReserved contains resources reserved for Kubernetes system components.", |
358 | 372 | "type": "object", |
|
381 | 395 | }, |
382 | 396 | "systemReserved": { |
383 | 397 | "additionalProperties": { |
384 | | - "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$", |
385 | | - "type": "string" |
| 398 | + "type": "string", |
| 399 | + "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$" |
386 | 400 | }, |
387 | 401 | "description": "SystemReserved contains resources reserved for OS system daemons and kernel memory.", |
388 | 402 | "type": "object", |
|
464 | 478 | "additionalProperties": false |
465 | 479 | }, |
466 | 480 | "role": { |
467 | | - "description": "Role is the AWS identity that nodes use. This field is immutable.\nThis field is mutually exclusive from instanceProfile.\nMarking this field as immutable avoids concerns around terminating managed instance profiles from running instances.\nThis field may be made mutable in the future, assuming the correct garbage collection and drift handling is implemented\nfor the old instance profiles on an update.", |
| 481 | + "description": "Role is the AWS identity that nodes use.\nThis field is mutually exclusive from instanceProfile.", |
468 | 482 | "type": "string", |
469 | 483 | "x-kubernetes-validations": [ |
470 | 484 | { |
471 | 485 | "message": "role cannot be empty", |
472 | 486 | "rule": "self != ''" |
473 | | - }, |
474 | | - { |
475 | | - "message": "immutable field changed", |
476 | | - "rule": "self == oldSelf" |
477 | 487 | } |
478 | 488 | ] |
479 | 489 | }, |
|
624 | 634 | "message": "must specify exactly one of ['role', 'instanceProfile']", |
625 | 635 | "rule": "(has(self.role) && !has(self.instanceProfile)) || (!has(self.role) && has(self.instanceProfile))" |
626 | 636 | }, |
627 | | - { |
628 | | - "message": "changing from 'instanceProfile' to 'role' is not supported. You must delete and recreate this node class if you want to change this.", |
629 | | - "rule": "(has(oldSelf.role) && has(self.role)) || (has(oldSelf.instanceProfile) && has(self.instanceProfile))" |
630 | | - }, |
631 | 637 | { |
632 | 638 | "message": "if set, amiFamily must be 'AL2' or 'Custom' when using an AL2 alias", |
633 | 639 | "rule": "!has(self.amiFamily) || (self.amiSelectorTerms.exists(x, has(x.alias) && x.alias.find('^[^@]+') == 'al2') ? (self.amiFamily == 'Custom' || self.amiFamily == 'AL2') : true)" |
|
750 | 756 | "description": "The ID of the AWS account that owns the capacity reservation.", |
751 | 757 | "pattern": "^[0-9]{12}$", |
752 | 758 | "type": "string" |
| 759 | + }, |
| 760 | + "reservationType": { |
| 761 | + "default": "default", |
| 762 | + "description": "The type of capacity reservation.", |
| 763 | + "enum": [ |
| 764 | + "default", |
| 765 | + "capacity-block" |
| 766 | + ], |
| 767 | + "type": "string" |
| 768 | + }, |
| 769 | + "state": { |
| 770 | + "default": "active", |
| 771 | + "description": "The state of the capacity reservation. A capacity reservation is considered to be expiring if it is within the EC2\nreclaimation window. Only capacity-block reservations may be in this state.", |
| 772 | + "enum": [ |
| 773 | + "active", |
| 774 | + "expiring" |
| 775 | + ], |
| 776 | + "type": "string" |
753 | 777 | } |
754 | 778 | }, |
755 | 779 | "required": [ |
|
0 commit comments