Skip to content

Commit 2682ef5

Browse files
LionelJouink8s-publishing-bot
authored andcommitted
[KEP-4817] Add limits on conditions and IPs + fix documentation
Signed-off-by: Lionel Jouin <[email protected]> Kubernetes-commit: 118356175d234d65efe28368cc896cef4f23d238
1 parent b77ba70 commit 2682ef5

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

Diff for: resource/v1alpha3/types.go

+9-2
Original file line numberDiff line numberDiff line change
@@ -1032,11 +1032,14 @@ type AllocatedDeviceStatus struct {
10321032
// config references, the `Ready` condition should be True.
10331033
//
10341034
// +optional
1035-
// +listType=atomic
1035+
// +listType=map
1036+
// +listMapKey=type
10361037
Conditions []metav1.Condition `json:"conditions" protobuf:"bytes,4,opt,name=conditions"`
10371038

10381039
// Data contains arbitrary driver-specific data.
10391040
//
1041+
// The length of the raw data must be smaller or equal to 10 Ki.
1042+
//
10401043
// +optional
10411044
Data runtime.RawExtension `json:"data,omitempty" protobuf:"bytes,5,opt,name=data"`
10421045

@@ -1052,7 +1055,9 @@ type AllocatedDeviceStatus struct {
10521055
type NetworkDeviceData struct {
10531056
// InterfaceName specifies the name of the network interface associated with
10541057
// the allocated device. This might be the name of a physical or virtual
1055-
// network interface.
1058+
// network interface being configured in the pod.
1059+
//
1060+
// Must not be longer than 256 characters.
10561061
//
10571062
// +optional
10581063
InterfaceName string `json:"interfaceName,omitempty" protobuf:"bytes,1,opt,name=interfaceName"`
@@ -1069,6 +1074,8 @@ type NetworkDeviceData struct {
10691074

10701075
// HardwareAddress represents the hardware address (e.g. MAC Address) of the device's network interface.
10711076
//
1077+
// Must not be longer than 128 characters.
1078+
//
10721079
// +optional
10731080
HardwareAddress string `json:"hardwareAddress,omitempty" protobuf:"bytes,3,opt,name=hardwareAddress"`
10741081
}

Diff for: resource/v1beta1/types.go

+9-2
Original file line numberDiff line numberDiff line change
@@ -1035,11 +1035,14 @@ type AllocatedDeviceStatus struct {
10351035
// config references, the `Ready` condition should be True.
10361036
//
10371037
// +optional
1038-
// +listType=atomic
1038+
// +listType=map
1039+
// +listMapKey=type
10391040
Conditions []metav1.Condition `json:"conditions" protobuf:"bytes,4,opt,name=conditions"`
10401041

10411042
// Data contains arbitrary driver-specific data.
10421043
//
1044+
// The length of the raw data must be smaller or equal to 10 Ki.
1045+
//
10431046
// +optional
10441047
Data runtime.RawExtension `json:"data,omitempty" protobuf:"bytes,5,opt,name=data"`
10451048

@@ -1055,7 +1058,9 @@ type AllocatedDeviceStatus struct {
10551058
type NetworkDeviceData struct {
10561059
// InterfaceName specifies the name of the network interface associated with
10571060
// the allocated device. This might be the name of a physical or virtual
1058-
// network interface.
1061+
// network interface being configured in the pod.
1062+
//
1063+
// Must not be longer than 256 characters.
10591064
//
10601065
// +optional
10611066
InterfaceName string `json:"interfaceName,omitempty" protobuf:"bytes,1,opt,name=interfaceName"`
@@ -1072,6 +1077,8 @@ type NetworkDeviceData struct {
10721077

10731078
// HardwareAddress represents the hardware address (e.g. MAC Address) of the device's network interface.
10741079
//
1080+
// Must not be longer than 128 characters.
1081+
//
10751082
// +optional
10761083
HardwareAddress string `json:"hardwareAddress,omitempty" protobuf:"bytes,3,opt,name=hardwareAddress"`
10771084
}

0 commit comments

Comments
 (0)