Skip to content

Commit c1a816b

Browse files
author
Yann Hamon
committed
Adding new schemas
1 parent 0595fd6 commit c1a816b

File tree

364 files changed

+37322
-5444
lines changed

Some content is hidden

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

364 files changed

+37322
-5444
lines changed

master-local/_definitions.json

Lines changed: 1263 additions & 179 deletions
Large diffs are not rendered by default.

master-local/all.json

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1734,6 +1734,123 @@
17341734
{
17351735
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1beta1.ResourceSliceSpec"
17361736
},
1737+
{
1738+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1beta2.AllocatedDeviceStatus"
1739+
},
1740+
{
1741+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1beta2.AllocationResult"
1742+
},
1743+
{
1744+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1beta2.CELDeviceSelector"
1745+
},
1746+
{
1747+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1beta2.Counter"
1748+
},
1749+
{
1750+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1beta2.CounterSet"
1751+
},
1752+
{
1753+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1beta2.Device"
1754+
},
1755+
{
1756+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1beta2.DeviceAllocationConfiguration"
1757+
},
1758+
{
1759+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1beta2.DeviceAllocationResult"
1760+
},
1761+
{
1762+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1beta2.DeviceAttribute"
1763+
},
1764+
{
1765+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1beta2.DeviceCapacity"
1766+
},
1767+
{
1768+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1beta2.DeviceClaim"
1769+
},
1770+
{
1771+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1beta2.DeviceClaimConfiguration"
1772+
},
1773+
{
1774+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1beta2.DeviceClass"
1775+
},
1776+
{
1777+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1beta2.DeviceClassConfiguration"
1778+
},
1779+
{
1780+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1beta2.DeviceClassList"
1781+
},
1782+
{
1783+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1beta2.DeviceClassSpec"
1784+
},
1785+
{
1786+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1beta2.DeviceConstraint"
1787+
},
1788+
{
1789+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1beta2.DeviceCounterConsumption"
1790+
},
1791+
{
1792+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1beta2.DeviceRequest"
1793+
},
1794+
{
1795+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1beta2.DeviceRequestAllocationResult"
1796+
},
1797+
{
1798+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1beta2.DeviceSelector"
1799+
},
1800+
{
1801+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1beta2.DeviceSubRequest"
1802+
},
1803+
{
1804+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1beta2.DeviceTaint"
1805+
},
1806+
{
1807+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1beta2.DeviceToleration"
1808+
},
1809+
{
1810+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1beta2.ExactDeviceRequest"
1811+
},
1812+
{
1813+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1beta2.NetworkDeviceData"
1814+
},
1815+
{
1816+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1beta2.OpaqueDeviceConfiguration"
1817+
},
1818+
{
1819+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1beta2.ResourceClaim"
1820+
},
1821+
{
1822+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1beta2.ResourceClaimConsumerReference"
1823+
},
1824+
{
1825+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1beta2.ResourceClaimList"
1826+
},
1827+
{
1828+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1beta2.ResourceClaimSpec"
1829+
},
1830+
{
1831+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1beta2.ResourceClaimStatus"
1832+
},
1833+
{
1834+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1beta2.ResourceClaimTemplate"
1835+
},
1836+
{
1837+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1beta2.ResourceClaimTemplateList"
1838+
},
1839+
{
1840+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1beta2.ResourceClaimTemplateSpec"
1841+
},
1842+
{
1843+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1beta2.ResourcePool"
1844+
},
1845+
{
1846+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1beta2.ResourceSlice"
1847+
},
1848+
{
1849+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1beta2.ResourceSliceList"
1850+
},
1851+
{
1852+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1beta2.ResourceSliceSpec"
1853+
},
17371854
{
17381855
"$ref": "_definitions.json#/definitions/io.k8s.api.scheduling.v1.PriorityClass"
17391856
},
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
{
2+
"description": "AllocatedDeviceStatus contains the status of an allocated device, if the driver chooses to report it. This may include driver-specific information.",
3+
"properties": {
4+
"conditions": {
5+
"description": "Conditions contains the latest observation of the device's state. If the device has been configured according to the class and claim config references, the `Ready` condition should be True.\n\nMust not contain more than 8 entries.",
6+
"items": {
7+
"$ref": "_definitions.json#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Condition"
8+
},
9+
"type": [
10+
"array",
11+
"null"
12+
],
13+
"x-kubernetes-list-map-keys": [
14+
"type"
15+
],
16+
"x-kubernetes-list-type": "map"
17+
},
18+
"data": {
19+
"$ref": "_definitions.json#/definitions/io.k8s.apimachinery.pkg.runtime.RawExtension",
20+
"description": "Data contains arbitrary driver-specific data.\n\nThe length of the raw data must be smaller or equal to 10 Ki."
21+
},
22+
"device": {
23+
"description": "Device references one device instance via its name in the driver's resource pool. It must be a DNS label.",
24+
"type": [
25+
"string",
26+
"null"
27+
]
28+
},
29+
"driver": {
30+
"description": "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.",
31+
"type": [
32+
"string",
33+
"null"
34+
]
35+
},
36+
"networkData": {
37+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1beta2.NetworkDeviceData",
38+
"description": "NetworkData contains network-related information specific to the device."
39+
},
40+
"pool": {
41+
"description": "This name together with the driver name and the device name field identify which device was allocated (`<driver name>/<pool name>/<device name>`).\n\nMust not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes.",
42+
"type": [
43+
"string",
44+
"null"
45+
]
46+
}
47+
},
48+
"required": [
49+
"driver",
50+
"pool",
51+
"device"
52+
],
53+
"type": "object",
54+
"$schema": "http://json-schema.org/schema#"
55+
}

master-local/allocateddevicestatus.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
]
3535
},
3636
"networkData": {
37-
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1beta1.NetworkDeviceData",
37+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1beta2.NetworkDeviceData",
3838
"description": "NetworkData contains network-related information specific to the device."
3939
},
4040
"pool": {
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"description": "AllocationResult contains attributes of an allocated resource.",
3+
"properties": {
4+
"devices": {
5+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1beta2.DeviceAllocationResult",
6+
"description": "Devices is the result of allocating devices."
7+
},
8+
"nodeSelector": {
9+
"$ref": "_definitions.json#/definitions/io.k8s.api.core.v1.NodeSelector",
10+
"description": "NodeSelector defines where the allocated resources are available. If unset, they are available everywhere."
11+
}
12+
},
13+
"type": "object",
14+
"$schema": "http://json-schema.org/schema#"
15+
}

master-local/allocationresult.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"description": "AllocationResult contains attributes of an allocated resource.",
33
"properties": {
44
"devices": {
5-
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1beta1.DeviceAllocationResult",
5+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1beta2.DeviceAllocationResult",
66
"description": "Devices is the result of allocating devices."
77
},
88
"nodeSelector": {

master-local/basicdevice-resource-v1alpha3.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
"null"
2929
]
3030
},
31-
"consumesCounter": {
32-
"description": "ConsumesCounter defines a list of references to sharedCounters and the set of counters that the device will consume from those counter sets.\n\nThere can only be a single entry per counterSet.\n\nThe maximum number of device counter consumption entries is 32. This is the same as the maximum number of shared counters allowed in a ResourceSlice.",
31+
"consumesCounters": {
32+
"description": "ConsumesCounters defines a list of references to sharedCounters and the set of counters that the device will consume from those counter sets.\n\nThere can only be a single entry per counterSet.\n\nThe total number of device counter consumption entries must be <= 32. In addition, the total number in the entire ResourceSlice must be <= 1024 (for example, 64 devices with 16 counters each).",
3333
"items": {
3434
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha3.DeviceCounterConsumption"
3535
},
@@ -51,7 +51,7 @@
5151
"description": "NodeSelector defines the nodes where the device is available.\n\nMust only be set if Spec.PerDeviceNodeSelection is set to true. At most one of NodeName, NodeSelector and AllNodes can be set."
5252
},
5353
"taints": {
54-
"description": "If specified, these are the driver-defined taints.\n\nThe maximum number of taints is 8.\n\nThis is an alpha field and requires enabling the DRADeviceTaints feature gate.",
54+
"description": "If specified, these are the driver-defined taints.\n\nThe maximum number of taints is 4.\n\nThis is an alpha field and requires enabling the DRADeviceTaints feature gate.",
5555
"items": {
5656
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha3.DeviceTaint"
5757
},

master-local/basicdevice-resource-v1beta1.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
"null"
2929
]
3030
},
31-
"consumesCounter": {
32-
"description": "ConsumesCounter defines a list of references to sharedCounters and the set of counters that the device will consume from those counter sets.\n\nThere can only be a single entry per counterSet.\n\nThe maximum number of device counter consumption entries is 32. This is the same as the maximum number of shared counters allowed in a ResourceSlice.",
31+
"consumesCounters": {
32+
"description": "ConsumesCounters defines a list of references to sharedCounters and the set of counters that the device will consume from those counter sets.\n\nThere can only be a single entry per counterSet.\n\nThe total number of device counter consumption entries must be <= 32. In addition, the total number in the entire ResourceSlice must be <= 1024 (for example, 64 devices with 16 counters each).",
3333
"items": {
3434
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1beta1.DeviceCounterConsumption"
3535
},
@@ -48,10 +48,10 @@
4848
},
4949
"nodeSelector": {
5050
"$ref": "_definitions.json#/definitions/io.k8s.api.core.v1.NodeSelector",
51-
"description": "NodeSelector defines the nodes where the device is available.\n\nMust only be set if Spec.PerDeviceNodeSelection is set to true. At most one of NodeName, NodeSelector and AllNodes can be set."
51+
"description": "NodeSelector defines the nodes where the device is available.\n\nMust use exactly one term.\n\nMust only be set if Spec.PerDeviceNodeSelection is set to true. At most one of NodeName, NodeSelector and AllNodes can be set."
5252
},
5353
"taints": {
54-
"description": "If specified, these are the driver-defined taints.\n\nThe maximum number of taints is 8.\n\nThis is an alpha field and requires enabling the DRADeviceTaints feature gate.",
54+
"description": "If specified, these are the driver-defined taints.\n\nThe maximum number of taints is 4.\n\nThis is an alpha field and requires enabling the DRADeviceTaints feature gate.",
5555
"items": {
5656
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1beta1.DeviceTaint"
5757
},

master-local/basicdevice.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
"null"
2929
]
3030
},
31-
"consumesCounter": {
32-
"description": "ConsumesCounter defines a list of references to sharedCounters and the set of counters that the device will consume from those counter sets.\n\nThere can only be a single entry per counterSet.\n\nThe maximum number of device counter consumption entries is 32. This is the same as the maximum number of shared counters allowed in a ResourceSlice.",
31+
"consumesCounters": {
32+
"description": "ConsumesCounters defines a list of references to sharedCounters and the set of counters that the device will consume from those counter sets.\n\nThere can only be a single entry per counterSet.\n\nThe total number of device counter consumption entries must be <= 32. In addition, the total number in the entire ResourceSlice must be <= 1024 (for example, 64 devices with 16 counters each).",
3333
"items": {
3434
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1beta1.DeviceCounterConsumption"
3535
},
@@ -48,10 +48,10 @@
4848
},
4949
"nodeSelector": {
5050
"$ref": "_definitions.json#/definitions/io.k8s.api.core.v1.NodeSelector",
51-
"description": "NodeSelector defines the nodes where the device is available.\n\nMust only be set if Spec.PerDeviceNodeSelection is set to true. At most one of NodeName, NodeSelector and AllNodes can be set."
51+
"description": "NodeSelector defines the nodes where the device is available.\n\nMust use exactly one term.\n\nMust only be set if Spec.PerDeviceNodeSelection is set to true. At most one of NodeName, NodeSelector and AllNodes can be set."
5252
},
5353
"taints": {
54-
"description": "If specified, these are the driver-defined taints.\n\nThe maximum number of taints is 8.\n\nThis is an alpha field and requires enabling the DRADeviceTaints feature gate.",
54+
"description": "If specified, these are the driver-defined taints.\n\nThe maximum number of taints is 4.\n\nThis is an alpha field and requires enabling the DRADeviceTaints feature gate.",
5555
"items": {
5656
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1beta1.DeviceTaint"
5757
},
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)\n\nThe length of the expression must be smaller or equal to 10 Ki. The cost of evaluating it is also limited based on the estimated number of logical steps.",
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+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"description": "Counter describes a quantity associated with a device.",
3+
"properties": {
4+
"value": {
5+
"$ref": "_definitions.json#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity",
6+
"description": "Value defines how much of a certain device counter is available."
7+
}
8+
},
9+
"required": [
10+
"value"
11+
],
12+
"type": "object",
13+
"$schema": "http://json-schema.org/schema#"
14+
}

master-local/counterset-resource-v1alpha3.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
"additionalProperties": {
66
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1alpha3.Counter"
77
},
8-
"description": "Counters defines the set of counters for this CounterSet The name of each counter must be unique in that set and must be a DNS label.\n\nTo ensure this uniqueness, capacities defined by the vendor must be listed without the driver name as domain prefix in their name. All others must be listed with their domain prefix.\n\nThe maximum number of counters is 32.",
8+
"description": "Counters defines the counters that will be consumed by the device. The name of each counter must be unique in that set and must be a DNS label.\n\nTo ensure this uniqueness, capacities defined by the vendor must be listed without the driver name as domain prefix in their name. All others must be listed with their domain prefix.\n\nThe maximum number of counters is 32.",
99
"type": [
1010
"object",
1111
"null"
1212
]
1313
},
1414
"name": {
15-
"description": "Name defines the name of the counter set. It must be a DNS label.",
15+
"description": "CounterSet is the name of the set from which the counters defined will be consumed.",
1616
"type": [
1717
"string",
1818
"null"
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"description": "CounterSet defines a named set of counters that are available to be used by devices defined in the ResourceSlice.\n\nThe counters are not allocatable by themselves, but can be referenced by devices. When a device is allocated, the portion of counters it uses will no longer be available for use by other devices.",
3+
"properties": {
4+
"counters": {
5+
"additionalProperties": {
6+
"$ref": "_definitions.json#/definitions/io.k8s.api.resource.v1beta2.Counter"
7+
},
8+
"description": "Counters defines the set of counters for this CounterSet The name of each counter must be unique in that set and must be a DNS label.\n\nThe maximum number of counters in all sets is 32.",
9+
"type": [
10+
"object",
11+
"null"
12+
]
13+
},
14+
"name": {
15+
"description": "Name defines the name of the counter set. It must be a DNS label.",
16+
"type": [
17+
"string",
18+
"null"
19+
]
20+
}
21+
},
22+
"required": [
23+
"name",
24+
"counters"
25+
],
26+
"type": "object",
27+
"$schema": "http://json-schema.org/schema#"
28+
}

0 commit comments

Comments
 (0)