Skip to content

Commit 6ec200e

Browse files
author
Yann Hamon
committed
Adding new schemas
1 parent afdc033 commit 6ec200e

File tree

629 files changed

+23178
-22316
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

629 files changed

+23178
-22316
lines changed

master-local/_definitions.json

Lines changed: 414 additions & 565 deletions
Large diffs are not rendered by default.

master-local/all.json

Lines changed: 35 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1516,121 +1516,109 @@
15161516
"$ref": "_definitions.json#/definitions/io.k8s.api.rbac.v1.Subject"
15171517
},
15181518
{
1519-
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha2.AllocationResult"
1519+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha3.AllocationResult"
15201520
},
15211521
{
1522-
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha2.DriverAllocationResult"
1522+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha3.BasicDevice"
15231523
},
15241524
{
1525-
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha2.DriverRequests"
1525+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha3.CELDeviceSelector"
15261526
},
15271527
{
1528-
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha2.NamedResourcesAllocationResult"
1528+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha3.Device"
15291529
},
15301530
{
1531-
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha2.NamedResourcesAttribute"
1531+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha3.DeviceAllocationConfiguration"
15321532
},
15331533
{
1534-
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha2.NamedResourcesFilter"
1534+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha3.DeviceAllocationResult"
15351535
},
15361536
{
1537-
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha2.NamedResourcesInstance"
1537+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha3.DeviceAttribute"
15381538
},
15391539
{
1540-
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha2.NamedResourcesIntSlice"
1540+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha3.DeviceClaim"
15411541
},
15421542
{
1543-
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha2.NamedResourcesRequest"
1543+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha3.DeviceClaimConfiguration"
15441544
},
15451545
{
1546-
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha2.NamedResourcesResources"
1546+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha3.DeviceClass"
15471547
},
15481548
{
1549-
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha2.NamedResourcesStringSlice"
1549+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha3.DeviceClassConfiguration"
15501550
},
15511551
{
1552-
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha2.PodSchedulingContext"
1552+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha3.DeviceClassList"
15531553
},
15541554
{
1555-
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha2.PodSchedulingContextList"
1555+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha3.DeviceClassSpec"
15561556
},
15571557
{
1558-
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha2.PodSchedulingContextSpec"
1558+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha3.DeviceConstraint"
15591559
},
15601560
{
1561-
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha2.PodSchedulingContextStatus"
1561+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha3.DeviceRequest"
15621562
},
15631563
{
1564-
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaim"
1564+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha3.DeviceRequestAllocationResult"
15651565
},
15661566
{
1567-
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimConsumerReference"
1567+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha3.DeviceSelector"
15681568
},
15691569
{
1570-
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimList"
1570+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha3.OpaqueDeviceConfiguration"
15711571
},
15721572
{
1573-
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimParameters"
1573+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext"
15741574
},
15751575
{
1576-
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimParametersList"
1576+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContextList"
15771577
},
15781578
{
1579-
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimParametersReference"
1579+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContextSpec"
15801580
},
15811581
{
1582-
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimSchedulingStatus"
1582+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContextStatus"
15831583
},
15841584
{
1585-
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimSpec"
1585+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaim"
15861586
},
15871587
{
1588-
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimStatus"
1588+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimConsumerReference"
15891589
},
15901590
{
1591-
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimTemplate"
1591+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimList"
15921592
},
15931593
{
1594-
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimTemplateList"
1594+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimSchedulingStatus"
15951595
},
15961596
{
1597-
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimTemplateSpec"
1597+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimSpec"
15981598
},
15991599
{
1600-
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha2.ResourceClass"
1600+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimStatus"
16011601
},
16021602
{
1603-
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha2.ResourceClassList"
1603+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate"
16041604
},
16051605
{
1606-
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha2.ResourceClassParameters"
1606+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimTemplateList"
16071607
},
16081608
{
1609-
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha2.ResourceClassParametersList"
1609+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimTemplateSpec"
16101610
},
16111611
{
1612-
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha2.ResourceClassParametersReference"
1612+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha3.ResourcePool"
16131613
},
16141614
{
1615-
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha2.ResourceFilter"
1615+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha3.ResourceSlice"
16161616
},
16171617
{
1618-
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha2.ResourceHandle"
1618+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha3.ResourceSliceList"
16191619
},
16201620
{
1621-
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha2.ResourceRequest"
1622-
},
1623-
{
1624-
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha2.ResourceSlice"
1625-
},
1626-
{
1627-
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha2.ResourceSliceList"
1628-
},
1629-
{
1630-
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha2.StructuredResourceHandle"
1631-
},
1632-
{
1633-
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha2.VendorParameters"
1621+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha3.ResourceSliceSpec"
16341622
},
16351623
{
16361624
"$ref": "_definitions.json#/definitions/io.k8s.api.scheduling.v1.PriorityClass"

master-local/allocationresult-resource-v1alpha2.json

Lines changed: 0 additions & 29 deletions
This file was deleted.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"description": "AllocationResult contains attributes of an allocated resource.",
3+
"properties": {
4+
"controller": {
5+
"description": "Controller is the name of the DRA driver which handled the allocation. That driver is also responsible for deallocating the claim. It is empty when the claim can be deallocated without involving a driver.\n\nA driver may allocate devices provided by other drivers, so this driver name here can be different from the driver names listed for the results.\n\nThis is an alpha field and requires enabling the DRAControlPlaneController feature gate.",
6+
"type": [
7+
"string",
8+
"null"
9+
]
10+
},
11+
"devices": {
12+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha3.DeviceAllocationResult",
13+
"description": "Devices is the result of allocating devices."
14+
},
15+
"nodeSelector": {
16+
"$ref": "_definitions.json#/definitions/io.k8s.api.core.v1.NodeSelector",
17+
"description": "NodeSelector defines where the allocated resources are available. If unset, they are available everywhere."
18+
}
19+
},
20+
"type": "object",
21+
"$schema": "http://json-schema.org/schema#"
22+
}

master-local/allocationresult.json

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,20 @@
11
{
22
"description": "AllocationResult contains attributes of an allocated resource.",
33
"properties": {
4-
"availableOnNodes": {
5-
"$ref": "_definitions.json#/definitions/io.k8s.api.core.v1.NodeSelector",
6-
"description": "This field will get set by the resource driver after it has allocated the resource to inform the scheduler where it can schedule Pods using the ResourceClaim.\n\nSetting this field is optional. If null, the resource is available everywhere."
7-
},
8-
"resourceHandles": {
9-
"description": "ResourceHandles contain the state associated with an allocation that should be maintained throughout the lifetime of a claim. Each ResourceHandle contains data that should be passed to a specific kubelet plugin once it lands on a node. This data is returned by the driver after a successful allocation and is opaque to Kubernetes. Driver documentation may explain to users how to interpret this data if needed.\n\nSetting this field is optional. It has a maximum size of 32 entries. If null (or empty), it is assumed this allocation will be processed by a single kubelet plugin with no ResourceHandle data attached. The name of the kubelet plugin invoked will match the DriverName set in the ResourceClaimStatus this AllocationResult is embedded in.",
10-
"items": {
11-
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha2.ResourceHandle"
12-
},
13-
"type": [
14-
"array",
15-
"null"
16-
],
17-
"x-kubernetes-list-type": "atomic"
18-
},
19-
"shareable": {
20-
"description": "Shareable determines whether the resource supports more than one consumer at a time.",
4+
"controller": {
5+
"description": "Controller is the name of the DRA driver which handled the allocation. That driver is also responsible for deallocating the claim. It is empty when the claim can be deallocated without involving a driver.\n\nA driver may allocate devices provided by other drivers, so this driver name here can be different from the driver names listed for the results.\n\nThis is an alpha field and requires enabling the DRAControlPlaneController feature gate.",
216
"type": [
22-
"boolean",
7+
"string",
238
"null"
249
]
10+
},
11+
"devices": {
12+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha3.DeviceAllocationResult",
13+
"description": "Devices is the result of allocating devices."
14+
},
15+
"nodeSelector": {
16+
"$ref": "_definitions.json#/definitions/io.k8s.api.core.v1.NodeSelector",
17+
"description": "NodeSelector defines where the allocated resources are available. If unset, they are available everywhere."
2518
}
2619
},
2720
"type": "object",
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"description": "BasicDevice defines one device instance.",
3+
"properties": {
4+
"attributes": {
5+
"additionalProperties": {
6+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha3.DeviceAttribute"
7+
},
8+
"description": "Attributes defines the set of attributes for this device. The name of each attribute must be unique in that set.\n\nThe maximum number of attributes and capacities combined is 32.",
9+
"type": [
10+
"object",
11+
"null"
12+
]
13+
},
14+
"capacity": {
15+
"additionalProperties": {
16+
"$ref": "_definitions.json#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity"
17+
},
18+
"description": "Capacity defines the set of capacities for this device. The name of each capacity must be unique in that set.\n\nThe maximum number of attributes and capacities combined is 32.",
19+
"type": [
20+
"object",
21+
"null"
22+
]
23+
}
24+
},
25+
"type": "object",
26+
"$schema": "http://json-schema.org/schema#"
27+
}

master-local/basicdevice.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"description": "BasicDevice defines one device instance.",
3+
"properties": {
4+
"attributes": {
5+
"additionalProperties": {
6+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha3.DeviceAttribute"
7+
},
8+
"description": "Attributes defines the set of attributes for this device. The name of each attribute must be unique in that set.\n\nThe maximum number of attributes and capacities combined is 32.",
9+
"type": [
10+
"object",
11+
"null"
12+
]
13+
},
14+
"capacity": {
15+
"additionalProperties": {
16+
"$ref": "_definitions.json#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity"
17+
},
18+
"description": "Capacity defines the set of capacities for this device. The name of each capacity must be unique in that set.\n\nThe maximum number of attributes and capacities combined is 32.",
19+
"type": [
20+
"object",
21+
"null"
22+
]
23+
}
24+
},
25+
"type": "object",
26+
"$schema": "http://json-schema.org/schema#"
27+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"description": "CELDeviceSelector contains a CEL expression for selecting a device.",
3+
"properties": {
4+
"expression": {
5+
"description": "Expression is a CEL expression which evaluates a single device. It must evaluate to true when the device under consideration satisfies the desired criteria, and false when it does not. Any other result is an error and causes allocation of devices to abort.\n\nThe expression's input is an object named \"device\", which carries the following properties:\n - driver (string): the name of the driver which defines this device.\n - attributes (map[string]object): the device's attributes, grouped by prefix\n (e.g. device.attributes[\"dra.example.com\"] evaluates to an object with all\n of the attributes which were prefixed by \"dra.example.com\".\n - capacity (map[string]object): the device's capacities, grouped by prefix.\n\nExample: Consider a device with driver=\"dra.example.com\", which exposes two attributes named \"model\" and \"ext.example.com/family\" and which exposes one capacity named \"modules\". This input to this expression would have the following fields:\n\n device.driver\n device.attributes[\"dra.example.com\"].model\n device.attributes[\"ext.example.com\"].family\n device.capacity[\"dra.example.com\"].modules\n\nThe device.driver field can be used to check for a specific driver, either as a high-level precondition (i.e. you only want to consider devices from this driver) or as part of a multi-clause expression that is meant to consider devices from different drivers.\n\nThe value type of each attribute is defined by the device definition, and users who write these expressions must consult the documentation for their specific drivers. The value type of each capacity is Quantity.\n\nIf an unknown prefix is used as a lookup in either device.attributes or device.capacity, an empty map will be returned. Any reference to an unknown field will cause an evaluation error and allocation to abort.\n\nA robust expression should check for the existence of attributes before referencing them.\n\nFor ease of use, the cel.bind() function is enabled, and can be used to simplify expressions that access multiple attributes with the same domain. For example:\n\n cel.bind(dra, device.attributes[\"dra.example.com\"], dra.someBool && dra.anotherBool)",
6+
"type": [
7+
"string",
8+
"null"
9+
]
10+
}
11+
},
12+
"required": [
13+
"expression"
14+
],
15+
"type": "object",
16+
"$schema": "http://json-schema.org/schema#"
17+
}

0 commit comments

Comments
 (0)