Skip to content

Commit 029a892

Browse files
Commit from GitHub Actions (Scheduled Jobs)
1 parent 6be03e3 commit 029a892

File tree

3 files changed

+88
-6
lines changed

3 files changed

+88
-6
lines changed

schema/karpenter.k8s.aws/ec2nodeclass_v1.json

Lines changed: 85 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,47 @@
166166
}
167167
]
168168
},
169+
"capacityReservationSelectorTerms": {
170+
"items": {
171+
"additionalProperties": false,
172+
"properties": {
173+
"id": {
174+
"pattern": "^cr-[0-9a-z]+$",
175+
"type": "string"
176+
},
177+
"ownerID": {
178+
"pattern": "^[0-9]{12}$",
179+
"type": "string"
180+
},
181+
"tags": {
182+
"additionalProperties": {
183+
"type": "string"
184+
},
185+
"maxProperties": 20,
186+
"type": "object",
187+
"x-kubernetes-validations": [
188+
{
189+
"message": "empty tag keys or values aren't supported",
190+
"rule": "self.all(k, k != '' && self[k] != '')"
191+
}
192+
]
193+
}
194+
},
195+
"type": "object"
196+
},
197+
"maxItems": 30,
198+
"type": "array",
199+
"x-kubernetes-validations": [
200+
{
201+
"message": "expected at least one, got none, ['tags', 'id']",
202+
"rule": "self.all(x, has(x.tags) || has(x.id))"
203+
},
204+
{
205+
"message": "'id' is mutually exclusive, cannot be set along with tags in a capacity reservation selector term",
206+
"rule": "!self.all(x, has(x.id) && (has(x.tags) || has(x.ownerID)))"
207+
}
208+
]
209+
},
169210
"context": {
170211
"type": "string"
171212
},
@@ -409,11 +450,11 @@
409450
"rule": "self.all(x, has(x.tags) || has(x.id) || has(x.name))"
410451
},
411452
{
412-
"message": "'id' is mutually exclusive, cannot be set with a combination of other fields in securityGroupSelectorTerms",
453+
"message": "'id' is mutually exclusive, cannot be set with a combination of other fields in a security group selector term",
413454
"rule": "!self.all(x, has(x.id) && (has(x.tags) || has(x.name)))"
414455
},
415456
{
416-
"message": "'name' is mutually exclusive, cannot be set with a combination of other fields in securityGroupSelectorTerms",
457+
"message": "'name' is mutually exclusive, cannot be set with a combination of other fields in a security group selector term",
417458
"rule": "!self.all(x, has(x.name) && (has(x.tags) || has(x.id)))"
418459
}
419460
]
@@ -454,7 +495,7 @@
454495
"rule": "self.all(x, has(x.tags) || has(x.id))"
455496
},
456497
{
457-
"message": "'id' is mutually exclusive, cannot be set with a combination of other fields in subnetSelectorTerms",
498+
"message": "'id' is mutually exclusive, cannot be set with a combination of other fields in a subnet selector term",
458499
"rule": "!self.all(x, has(x.id) && has(x.tags))"
459500
}
460501
]
@@ -587,6 +628,47 @@
587628
},
588629
"type": "array"
589630
},
631+
"capacityReservations": {
632+
"items": {
633+
"additionalProperties": false,
634+
"properties": {
635+
"availabilityZone": {
636+
"type": "string"
637+
},
638+
"endTime": {
639+
"format": "date-time",
640+
"type": "string"
641+
},
642+
"id": {
643+
"pattern": "^cr-[0-9a-z]+$",
644+
"type": "string"
645+
},
646+
"instanceMatchCriteria": {
647+
"enum": [
648+
"open",
649+
"targeted"
650+
],
651+
"type": "string"
652+
},
653+
"instanceType": {
654+
"type": "string"
655+
},
656+
"ownerID": {
657+
"pattern": "^[0-9]{12}$",
658+
"type": "string"
659+
}
660+
},
661+
"required": [
662+
"availabilityZone",
663+
"id",
664+
"instanceMatchCriteria",
665+
"instanceType",
666+
"ownerID"
667+
],
668+
"type": "object"
669+
},
670+
"type": "array"
671+
},
590672
"conditions": {
591673
"items": {
592674
"additionalProperties": false,

schema/karpenter.sh/nodeclaim_v1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
},
8484
{
8585
"message": "label domain \"karpenter.k8s.aws\" is restricted",
86-
"rule": "self in [\"karpenter.k8s.aws/ec2nodeclass\", \"karpenter.k8s.aws/instance-encryption-in-transit-supported\", \"karpenter.k8s.aws/instance-category\", \"karpenter.k8s.aws/instance-hypervisor\", \"karpenter.k8s.aws/instance-family\", \"karpenter.k8s.aws/instance-generation\", \"karpenter.k8s.aws/instance-local-nvme\", \"karpenter.k8s.aws/instance-size\", \"karpenter.k8s.aws/instance-cpu\", \"karpenter.k8s.aws/instance-cpu-manufacturer\", \"karpenter.k8s.aws/instance-cpu-sustained-clock-speed-mhz\", \"karpenter.k8s.aws/instance-memory\", \"karpenter.k8s.aws/instance-ebs-bandwidth\", \"karpenter.k8s.aws/instance-network-bandwidth\", \"karpenter.k8s.aws/instance-gpu-name\", \"karpenter.k8s.aws/instance-gpu-manufacturer\", \"karpenter.k8s.aws/instance-gpu-count\", \"karpenter.k8s.aws/instance-gpu-memory\", \"karpenter.k8s.aws/instance-accelerator-name\", \"karpenter.k8s.aws/instance-accelerator-manufacturer\", \"karpenter.k8s.aws/instance-accelerator-count\"] || !self.find(\"^([^/]+)\").endsWith(\"karpenter.k8s.aws\")"
86+
"rule": "self in [\"karpenter.k8s.aws/capacity-reservation-id\", \"karpenter.k8s.aws/ec2nodeclass\", \"karpenter.k8s.aws/instance-encryption-in-transit-supported\", \"karpenter.k8s.aws/instance-category\", \"karpenter.k8s.aws/instance-hypervisor\", \"karpenter.k8s.aws/instance-family\", \"karpenter.k8s.aws/instance-generation\", \"karpenter.k8s.aws/instance-local-nvme\", \"karpenter.k8s.aws/instance-size\", \"karpenter.k8s.aws/instance-cpu\", \"karpenter.k8s.aws/instance-cpu-manufacturer\", \"karpenter.k8s.aws/instance-cpu-sustained-clock-speed-mhz\", \"karpenter.k8s.aws/instance-memory\", \"karpenter.k8s.aws/instance-ebs-bandwidth\", \"karpenter.k8s.aws/instance-network-bandwidth\", \"karpenter.k8s.aws/instance-gpu-name\", \"karpenter.k8s.aws/instance-gpu-manufacturer\", \"karpenter.k8s.aws/instance-gpu-count\", \"karpenter.k8s.aws/instance-gpu-memory\", \"karpenter.k8s.aws/instance-accelerator-name\", \"karpenter.k8s.aws/instance-accelerator-manufacturer\", \"karpenter.k8s.aws/instance-accelerator-count\"] || !self.find(\"^([^/]+)\").endsWith(\"karpenter.k8s.aws\")"
8787
}
8888
]
8989
},

schema/karpenter.sh/nodepool_v1.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@
142142
},
143143
{
144144
"message": "label domain \"karpenter.k8s.aws\" is restricted",
145-
"rule": "self.all(x, x in [\"karpenter.k8s.aws/ec2nodeclass\", \"karpenter.k8s.aws/instance-encryption-in-transit-supported\", \"karpenter.k8s.aws/instance-category\", \"karpenter.k8s.aws/instance-hypervisor\", \"karpenter.k8s.aws/instance-family\", \"karpenter.k8s.aws/instance-generation\", \"karpenter.k8s.aws/instance-local-nvme\", \"karpenter.k8s.aws/instance-size\", \"karpenter.k8s.aws/instance-cpu\", \"karpenter.k8s.aws/instance-cpu-manufacturer\", \"karpenter.k8s.aws/instance-cpu-sustained-clock-speed-mhz\", \"karpenter.k8s.aws/instance-memory\", \"karpenter.k8s.aws/instance-ebs-bandwidth\", \"karpenter.k8s.aws/instance-network-bandwidth\", \"karpenter.k8s.aws/instance-gpu-name\", \"karpenter.k8s.aws/instance-gpu-manufacturer\", \"karpenter.k8s.aws/instance-gpu-count\", \"karpenter.k8s.aws/instance-gpu-memory\", \"karpenter.k8s.aws/instance-accelerator-name\", \"karpenter.k8s.aws/instance-accelerator-manufacturer\", \"karpenter.k8s.aws/instance-accelerator-count\"] || !x.find(\"^([^/]+)\").endsWith(\"karpenter.k8s.aws\"))"
145+
"rule": "self.all(x, x in [\"karpenter.k8s.aws/capacity-reservation-id\", \"karpenter.k8s.aws/ec2nodeclass\", \"karpenter.k8s.aws/instance-encryption-in-transit-supported\", \"karpenter.k8s.aws/instance-category\", \"karpenter.k8s.aws/instance-hypervisor\", \"karpenter.k8s.aws/instance-family\", \"karpenter.k8s.aws/instance-generation\", \"karpenter.k8s.aws/instance-local-nvme\", \"karpenter.k8s.aws/instance-size\", \"karpenter.k8s.aws/instance-cpu\", \"karpenter.k8s.aws/instance-cpu-manufacturer\", \"karpenter.k8s.aws/instance-cpu-sustained-clock-speed-mhz\", \"karpenter.k8s.aws/instance-memory\", \"karpenter.k8s.aws/instance-ebs-bandwidth\", \"karpenter.k8s.aws/instance-network-bandwidth\", \"karpenter.k8s.aws/instance-gpu-name\", \"karpenter.k8s.aws/instance-gpu-manufacturer\", \"karpenter.k8s.aws/instance-gpu-count\", \"karpenter.k8s.aws/instance-gpu-memory\", \"karpenter.k8s.aws/instance-accelerator-name\", \"karpenter.k8s.aws/instance-accelerator-manufacturer\", \"karpenter.k8s.aws/instance-accelerator-count\"] || !x.find(\"^([^/]+)\").endsWith(\"karpenter.k8s.aws\"))"
146146
}
147147
]
148148
}
@@ -237,7 +237,7 @@
237237
},
238238
{
239239
"message": "label domain \"karpenter.k8s.aws\" is restricted",
240-
"rule": "self in [\"karpenter.k8s.aws/ec2nodeclass\", \"karpenter.k8s.aws/instance-encryption-in-transit-supported\", \"karpenter.k8s.aws/instance-category\", \"karpenter.k8s.aws/instance-hypervisor\", \"karpenter.k8s.aws/instance-family\", \"karpenter.k8s.aws/instance-generation\", \"karpenter.k8s.aws/instance-local-nvme\", \"karpenter.k8s.aws/instance-size\", \"karpenter.k8s.aws/instance-cpu\", \"karpenter.k8s.aws/instance-cpu-manufacturer\", \"karpenter.k8s.aws/instance-cpu-sustained-clock-speed-mhz\", \"karpenter.k8s.aws/instance-memory\", \"karpenter.k8s.aws/instance-ebs-bandwidth\", \"karpenter.k8s.aws/instance-network-bandwidth\", \"karpenter.k8s.aws/instance-gpu-name\", \"karpenter.k8s.aws/instance-gpu-manufacturer\", \"karpenter.k8s.aws/instance-gpu-count\", \"karpenter.k8s.aws/instance-gpu-memory\", \"karpenter.k8s.aws/instance-accelerator-name\", \"karpenter.k8s.aws/instance-accelerator-manufacturer\", \"karpenter.k8s.aws/instance-accelerator-count\"] || !self.find(\"^([^/]+)\").endsWith(\"karpenter.k8s.aws\")"
240+
"rule": "self in [\"karpenter.k8s.aws/capacity-reservation-id\", \"karpenter.k8s.aws/ec2nodeclass\", \"karpenter.k8s.aws/instance-encryption-in-transit-supported\", \"karpenter.k8s.aws/instance-category\", \"karpenter.k8s.aws/instance-hypervisor\", \"karpenter.k8s.aws/instance-family\", \"karpenter.k8s.aws/instance-generation\", \"karpenter.k8s.aws/instance-local-nvme\", \"karpenter.k8s.aws/instance-size\", \"karpenter.k8s.aws/instance-cpu\", \"karpenter.k8s.aws/instance-cpu-manufacturer\", \"karpenter.k8s.aws/instance-cpu-sustained-clock-speed-mhz\", \"karpenter.k8s.aws/instance-memory\", \"karpenter.k8s.aws/instance-ebs-bandwidth\", \"karpenter.k8s.aws/instance-network-bandwidth\", \"karpenter.k8s.aws/instance-gpu-name\", \"karpenter.k8s.aws/instance-gpu-manufacturer\", \"karpenter.k8s.aws/instance-gpu-count\", \"karpenter.k8s.aws/instance-gpu-memory\", \"karpenter.k8s.aws/instance-accelerator-name\", \"karpenter.k8s.aws/instance-accelerator-manufacturer\", \"karpenter.k8s.aws/instance-accelerator-count\"] || !self.find(\"^([^/]+)\").endsWith(\"karpenter.k8s.aws\")"
241241
}
242242
]
243243
},

0 commit comments

Comments
 (0)