Skip to content

Commit 1d209c4

Browse files
authored
Update Karpenter CRDs (#582)
1 parent e44d259 commit 1d209c4

File tree

3 files changed

+81
-16
lines changed

3 files changed

+81
-16
lines changed

karpenter.k8s.aws/ec2nodeclass_v1.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,13 @@
149149
"format": "int64",
150150
"type": "integer"
151151
},
152+
"volumeInitializationRate": {
153+
"description": "VolumeInitializationRate specifies the Amazon EBS Provisioned Rate for Volume Initialization,\nin MiB/s, at which to download the snapshot blocks from Amazon S3 to the volume. This is also known as volume\ninitialization. Specifying a volume initialization rate ensures that the volume is initialized at a\npredictable and consistent rate after creation. Only allowed if SnapshotID is set.\nValid Range: Minimum value of 100. Maximum value of 300.",
154+
"format": "int32",
155+
"maximum": 300,
156+
"minimum": 100,
157+
"type": "integer"
158+
},
152159
"volumeSize": {
153160
"description": "VolumeSize in `Gi`, `G`, `Ti`, or `T`. You must specify either a snapshot ID or\na volume size. The following are the supported volumes sizes for each volume\ntype:\n\n * gp2 and gp3: 1-16,384\n\n * io1 and io2: 4-16,384\n\n * st1 and sc1: 125-16,384\n\n * standard: 1-1,024",
154161
"pattern": "^((?:[1-9][0-9]{0,3}|[1-4][0-9]{4}|[5][0-8][0-9]{3}|59000)Gi|(?:[1-9][0-9]{0,3}|[1-5][0-9]{4}|[6][0-3][0-9]{3}|64000)G|([1-9]||[1-5][0-7]|58)Ti|([1-9]||[1-5][0-9]|6[0-3]|64)T)$",
@@ -173,6 +180,10 @@
173180
{
174181
"message": "snapshotID or volumeSize must be defined",
175182
"rule": "has(self.snapshotID) || has(self.volumeSize)"
183+
},
184+
{
185+
"message": "snapshotID must be set when volumeInitializationRate is set",
186+
"rule": "!has(self.volumeInitializationRate) || (has(self.snapshotID) && self.snapshotID != '')"
176187
}
177188
],
178189
"additionalProperties": false

karpenter.sh/nodeclaim_v1.json

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"expireAfter": {
1919
"default": "720h",
2020
"description": "ExpireAfter is the duration the controller will wait\nbefore terminating a node, measured from when the node is created. This\nis useful to implement features like eventually consistent node upgrade,\nmemory leak protection, and disruption testing.",
21-
"pattern": "^(([0-9]+(s|m|h))+)|(Never)$",
21+
"pattern": "^(([0-9]+(s|m|h))+|Never)$",
2222
"type": "string"
2323
},
2424
"nodeClassRef": {
@@ -27,15 +27,33 @@
2727
"group": {
2828
"description": "API version of the referent",
2929
"pattern": "^[^/]*$",
30-
"type": "string"
30+
"type": "string",
31+
"x-kubernetes-validations": [
32+
{
33+
"message": "group may not be empty",
34+
"rule": "self != ''"
35+
}
36+
]
3137
},
3238
"kind": {
3339
"description": "Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\"",
34-
"type": "string"
40+
"type": "string",
41+
"x-kubernetes-validations": [
42+
{
43+
"message": "kind may not be empty",
44+
"rule": "self != ''"
45+
}
46+
]
3547
},
3648
"name": {
3749
"description": "Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names",
38-
"type": "string"
50+
"type": "string",
51+
"x-kubernetes-validations": [
52+
{
53+
"message": "name may not be empty",
54+
"rule": "self != ''"
55+
}
56+
]
3957
}
4058
},
4159
"required": [
@@ -75,7 +93,7 @@
7593
},
7694
{
7795
"message": "label domain \"karpenter.k8s.aws\" is restricted",
78-
"rule": "self in [\"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-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\")"
96+
"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\")"
7997
}
8098
]
8199
},
@@ -236,7 +254,7 @@
236254
"type": "array"
237255
},
238256
"terminationGracePeriod": {
239-
"description": "TerminationGracePeriod is the maximum duration the controller will wait before forcefully deleting the pods on a node, measured from when deletion is first initiated.\n\n\nWarning: this feature takes precedence over a Pod's terminationGracePeriodSeconds value, and bypasses any blocked PDBs or the karpenter.sh/do-not-disrupt annotation.\n\n\nThis field is intended to be used by cluster administrators to enforce that nodes can be cycled within a given time period.\nWhen set, drifted nodes will begin draining even if there are pods blocking eviction. Draining will respect PDBs and the do-not-disrupt annotation until the TGP is reached.\n\n\nKarpenter will preemptively delete pods so their terminationGracePeriodSeconds align with the node's terminationGracePeriod.\nIf a pod would be terminated without being granted its full terminationGracePeriodSeconds prior to the node timeout,\nthat pod will be deleted at T = node timeout - pod terminationGracePeriodSeconds.\n\n\nThe feature can also be used to allow maximum time limits for long-running jobs which can delay node termination with preStop hooks.\nIf left undefined, the controller will wait indefinitely for pods to be drained.",
257+
"description": "TerminationGracePeriod is the maximum duration the controller will wait before forcefully deleting the pods on a node, measured from when deletion is first initiated.\n\nWarning: this feature takes precedence over a Pod's terminationGracePeriodSeconds value, and bypasses any blocked PDBs or the karpenter.sh/do-not-disrupt annotation.\n\nThis field is intended to be used by cluster administrators to enforce that nodes can be cycled within a given time period.\nWhen set, drifted nodes will begin draining even if there are pods blocking eviction. Draining will respect PDBs and the do-not-disrupt annotation until the TGP is reached.\n\nKarpenter will preemptively delete pods so their terminationGracePeriodSeconds align with the node's terminationGracePeriod.\nIf a pod would be terminated without being granted its full terminationGracePeriodSeconds prior to the node timeout,\nthat pod will be deleted at T = node timeout - pod terminationGracePeriodSeconds.\n\nThe feature can also be used to allow maximum time limits for long-running jobs which can delay node termination with preStop hooks.\nIf left undefined, the controller will wait indefinitely for pods to be drained.",
240258
"pattern": "^([0-9]+(s|m|h))+$",
241259
"type": "string"
242260
}
@@ -326,7 +344,7 @@
326344
"type": "string"
327345
},
328346
"type": {
329-
"description": "type of condition in CamelCase or in foo.example.com/CamelCase.\n---\nMany .condition.type values are consistent across resources like Available, but because arbitrary conditions can be\nuseful (see .node.status.conditions), the ability to deconflict is important.\nThe regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)",
347+
"description": "type of condition in CamelCase or in foo.example.com/CamelCase.",
330348
"maxLength": 316,
331349
"pattern": "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$",
332350
"type": "string"

0 commit comments

Comments
 (0)