mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-07-17 20:00:07 +00:00
api: fix scheduling API optional/required markers
- Change PriorityClass.Value from +required to +optional since there is no validation requiring it and no defaulting (0 is valid) - Remove +required from *List.Items fields as List types should not need optional/required markers on their Items field
This commit is contained in:
@@ -39,7 +39,7 @@ message PriorityClass {
|
||||
|
||||
// value represents the integer value of this priority class. This is the actual priority that pods
|
||||
// receive when they have the name of this class in their pod spec.
|
||||
// +required
|
||||
// +optional
|
||||
optional int32 value = 2;
|
||||
|
||||
// globalDefault specifies whether this PriorityClass should be considered as
|
||||
@@ -70,7 +70,6 @@ message PriorityClassList {
|
||||
optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
|
||||
|
||||
// items is the list of PriorityClasses
|
||||
// +required
|
||||
repeated PriorityClass items = 2;
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ type PriorityClass struct {
|
||||
|
||||
// value represents the integer value of this priority class. This is the actual priority that pods
|
||||
// receive when they have the name of this class in their pod spec.
|
||||
// +required
|
||||
// +optional
|
||||
Value int32 `json:"value" protobuf:"bytes,2,opt,name=value"`
|
||||
|
||||
// globalDefault specifies whether this PriorityClass should be considered as
|
||||
@@ -72,6 +72,5 @@ type PriorityClassList struct {
|
||||
metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// items is the list of PriorityClasses
|
||||
// +required
|
||||
Items []PriorityClass `json:"items" protobuf:"bytes,2,rep,name=items"`
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ message PriorityClass {
|
||||
|
||||
// value represents the integer value of this priority class. This is the actual priority that pods
|
||||
// receive when they have the name of this class in their pod spec.
|
||||
// +required
|
||||
// +optional
|
||||
optional int32 value = 2;
|
||||
|
||||
// globalDefault specifies whether this PriorityClass should be considered as
|
||||
@@ -117,7 +117,6 @@ message PriorityClassList {
|
||||
optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
|
||||
|
||||
// items is the list of PriorityClasses
|
||||
// +required
|
||||
repeated PriorityClass items = 2;
|
||||
}
|
||||
|
||||
@@ -168,7 +167,6 @@ message WorkloadList {
|
||||
optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
|
||||
|
||||
// Items is the list of Workloads.
|
||||
// +required
|
||||
repeated Workload items = 2;
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ type PriorityClass struct {
|
||||
|
||||
// value represents the integer value of this priority class. This is the actual priority that pods
|
||||
// receive when they have the name of this class in their pod spec.
|
||||
// +required
|
||||
// +optional
|
||||
Value int32 `json:"value" protobuf:"bytes,2,opt,name=value"`
|
||||
|
||||
// globalDefault specifies whether this PriorityClass should be considered as
|
||||
@@ -71,7 +71,6 @@ type PriorityClassList struct {
|
||||
metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// items is the list of PriorityClasses
|
||||
// +required
|
||||
Items []PriorityClass `json:"items" protobuf:"bytes,2,rep,name=items"`
|
||||
}
|
||||
|
||||
@@ -106,7 +105,6 @@ type WorkloadList struct {
|
||||
metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// Items is the list of Workloads.
|
||||
// +required
|
||||
Items []Workload `json:"items" protobuf:"bytes,2,rep,name=items"`
|
||||
}
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ message PriorityClass {
|
||||
|
||||
// value represents the integer value of this priority class. This is the actual priority that pods
|
||||
// receive when they have the name of this class in their pod spec.
|
||||
// +required
|
||||
// +optional
|
||||
optional int32 value = 2;
|
||||
|
||||
// globalDefault specifies whether this PriorityClass should be considered as
|
||||
@@ -71,7 +71,6 @@ message PriorityClassList {
|
||||
optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
|
||||
|
||||
// items is the list of PriorityClasses
|
||||
// +required
|
||||
repeated PriorityClass items = 2;
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ type PriorityClass struct {
|
||||
|
||||
// value represents the integer value of this priority class. This is the actual priority that pods
|
||||
// receive when they have the name of this class in their pod spec.
|
||||
// +required
|
||||
// +optional
|
||||
Value int32 `json:"value" protobuf:"bytes,2,opt,name=value"`
|
||||
|
||||
// globalDefault specifies whether this PriorityClass should be considered as
|
||||
@@ -79,6 +79,5 @@ type PriorityClassList struct {
|
||||
metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// items is the list of PriorityClasses
|
||||
// +required
|
||||
Items []PriorityClass `json:"items" protobuf:"bytes,2,rep,name=items"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user