Merge pull request #6171 from RainbowMango/pr_update_scheule_priority_api
Update the API of schedule priroity feature as per the MVP version
This commit is contained in:
commit
5a53162ac7
|
@ -19302,12 +19302,14 @@
|
||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"priorityClassName": {
|
"priorityClassName": {
|
||||||
"description": "PriorityClassName specifies which PriorityClass to use. Its behavior depends on PriorityClassSource:\n\nBehavior of PriorityClassName:\n\nFor KubePriorityClass: - When specified: Uses the named Kubernetes PriorityClass. - When empty: Uses the cluster's default PriorityClass (i.e., the PriorityClass marked as the global default in the cluster). - If neither exists: Sets priority=0 and preemptionPolicy=Never.\n\nFor PodPriorityClass: - Uses PriorityClassName from the PodTemplate. - If the specified PriorityClass is not found, falls back to the cluster's default PriorityClass\n (i.e., the PriorityClass marked as the global default in the cluster).\n- If no valid PriorityClass is found: Sets priority=0 and preemptionPolicy=Never. - Not yet implemented.\n\nFor FederatedPriorityClass: - Not yet implemented.",
|
"description": "PriorityClassName specifies which PriorityClass to use. Its behavior depends on PriorityClassSource:\n\nBehavior of PriorityClassName:\n\nFor KubePriorityClass: - When specified: Uses the named Kubernetes PriorityClass.\n\nFor PodPriorityClass: - Uses PriorityClassName from the PodTemplate. - Not yet implemented.\n\nFor FederatedPriorityClass: - Not yet implemented.",
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"default": ""
|
||||||
},
|
},
|
||||||
"priorityClassSource": {
|
"priorityClassSource": {
|
||||||
"description": "PriorityClassSource specifies where Karmada should look for the PriorityClass definition. Available options: - KubePriorityClass: Uses Kubernetes PriorityClass (scheduling.k8s.io/v1) - PodPriorityClass: Uses PriorityClassName from PodTemplate: PodSpec.PriorityClassName (not yet implemented) - FederatedPriorityClass: Uses Karmada FederatedPriorityClass (not yet implemented)",
|
"description": "PriorityClassSource specifies where Karmada should look for the PriorityClass definition. Available options: - KubePriorityClass: Uses Kubernetes PriorityClass (scheduling.k8s.io/v1) - PodPriorityClass: Uses PriorityClassName from PodTemplate: PodSpec.PriorityClassName (not yet implemented) - FederatedPriorityClass: Uses Karmada FederatedPriorityClass (not yet implemented)",
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"default": ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -888,14 +888,9 @@ spec:
|
||||||
|
|
||||||
For KubePriorityClass:
|
For KubePriorityClass:
|
||||||
- When specified: Uses the named Kubernetes PriorityClass.
|
- When specified: Uses the named Kubernetes PriorityClass.
|
||||||
- When empty: Uses the cluster's default PriorityClass (i.e., the PriorityClass marked as the global default in the cluster).
|
|
||||||
- If neither exists: Sets priority=0 and preemptionPolicy=Never.
|
|
||||||
|
|
||||||
For PodPriorityClass:
|
For PodPriorityClass:
|
||||||
- Uses PriorityClassName from the PodTemplate.
|
- Uses PriorityClassName from the PodTemplate.
|
||||||
- If the specified PriorityClass is not found, falls back to the cluster's default PriorityClass
|
|
||||||
(i.e., the PriorityClass marked as the global default in the cluster).
|
|
||||||
- If no valid PriorityClass is found: Sets priority=0 and preemptionPolicy=Never.
|
|
||||||
- Not yet implemented.
|
- Not yet implemented.
|
||||||
|
|
||||||
For FederatedPriorityClass:
|
For FederatedPriorityClass:
|
||||||
|
|
|
@ -885,14 +885,9 @@ spec:
|
||||||
|
|
||||||
For KubePriorityClass:
|
For KubePriorityClass:
|
||||||
- When specified: Uses the named Kubernetes PriorityClass.
|
- When specified: Uses the named Kubernetes PriorityClass.
|
||||||
- When empty: Uses the cluster's default PriorityClass (i.e., the PriorityClass marked as the global default in the cluster).
|
|
||||||
- If neither exists: Sets priority=0 and preemptionPolicy=Never.
|
|
||||||
|
|
||||||
For PodPriorityClass:
|
For PodPriorityClass:
|
||||||
- Uses PriorityClassName from the PodTemplate.
|
- Uses PriorityClassName from the PodTemplate.
|
||||||
- If the specified PriorityClass is not found, falls back to the cluster's default PriorityClass
|
|
||||||
(i.e., the PriorityClass marked as the global default in the cluster).
|
|
||||||
- If no valid PriorityClass is found: Sets priority=0 and preemptionPolicy=Never.
|
|
||||||
- Not yet implemented.
|
- Not yet implemented.
|
||||||
|
|
||||||
For FederatedPriorityClass:
|
For FederatedPriorityClass:
|
||||||
|
|
|
@ -688,7 +688,7 @@ type SchedulePriority struct {
|
||||||
//
|
//
|
||||||
// +kubebuilder:validation:Enum=KubePriorityClass
|
// +kubebuilder:validation:Enum=KubePriorityClass
|
||||||
// +required
|
// +required
|
||||||
PriorityClassSource PriorityClassSource `json:"priorityClassSource,omitempty"`
|
PriorityClassSource PriorityClassSource `json:"priorityClassSource"`
|
||||||
|
|
||||||
// PriorityClassName specifies which PriorityClass to use. Its behavior depends on PriorityClassSource:
|
// PriorityClassName specifies which PriorityClass to use. Its behavior depends on PriorityClassSource:
|
||||||
//
|
//
|
||||||
|
@ -696,21 +696,16 @@ type SchedulePriority struct {
|
||||||
//
|
//
|
||||||
// For KubePriorityClass:
|
// For KubePriorityClass:
|
||||||
// - When specified: Uses the named Kubernetes PriorityClass.
|
// - When specified: Uses the named Kubernetes PriorityClass.
|
||||||
// - When empty: Uses the cluster's default PriorityClass (i.e., the PriorityClass marked as the global default in the cluster).
|
|
||||||
// - If neither exists: Sets priority=0 and preemptionPolicy=Never.
|
|
||||||
//
|
//
|
||||||
// For PodPriorityClass:
|
// For PodPriorityClass:
|
||||||
// - Uses PriorityClassName from the PodTemplate.
|
// - Uses PriorityClassName from the PodTemplate.
|
||||||
// - If the specified PriorityClass is not found, falls back to the cluster's default PriorityClass
|
|
||||||
// (i.e., the PriorityClass marked as the global default in the cluster).
|
|
||||||
// - If no valid PriorityClass is found: Sets priority=0 and preemptionPolicy=Never.
|
|
||||||
// - Not yet implemented.
|
// - Not yet implemented.
|
||||||
//
|
//
|
||||||
// For FederatedPriorityClass:
|
// For FederatedPriorityClass:
|
||||||
// - Not yet implemented.
|
// - Not yet implemented.
|
||||||
//
|
//
|
||||||
// +required
|
// +required
|
||||||
PriorityClassName string `json:"priorityClassName,omitempty"`
|
PriorityClassName string `json:"priorityClassName"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// PriorityClassSource defines the type for PriorityClassSource field.
|
// PriorityClassSource defines the type for PriorityClassSource field.
|
||||||
|
|
|
@ -5151,13 +5151,15 @@ func schema_pkg_apis_policy_v1alpha1_SchedulePriority(ref common.ReferenceCallba
|
||||||
"priorityClassSource": {
|
"priorityClassSource": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "PriorityClassSource specifies where Karmada should look for the PriorityClass definition. Available options: - KubePriorityClass: Uses Kubernetes PriorityClass (scheduling.k8s.io/v1) - PodPriorityClass: Uses PriorityClassName from PodTemplate: PodSpec.PriorityClassName (not yet implemented) - FederatedPriorityClass: Uses Karmada FederatedPriorityClass (not yet implemented)",
|
Description: "PriorityClassSource specifies where Karmada should look for the PriorityClass definition. Available options: - KubePriorityClass: Uses Kubernetes PriorityClass (scheduling.k8s.io/v1) - PodPriorityClass: Uses PriorityClassName from PodTemplate: PodSpec.PriorityClassName (not yet implemented) - FederatedPriorityClass: Uses Karmada FederatedPriorityClass (not yet implemented)",
|
||||||
|
Default: "",
|
||||||
Type: []string{"string"},
|
Type: []string{"string"},
|
||||||
Format: "",
|
Format: "",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"priorityClassName": {
|
"priorityClassName": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "PriorityClassName specifies which PriorityClass to use. Its behavior depends on PriorityClassSource:\n\nBehavior of PriorityClassName:\n\nFor KubePriorityClass: - When specified: Uses the named Kubernetes PriorityClass. - When empty: Uses the cluster's default PriorityClass (i.e., the PriorityClass marked as the global default in the cluster). - If neither exists: Sets priority=0 and preemptionPolicy=Never.\n\nFor PodPriorityClass: - Uses PriorityClassName from the PodTemplate. - If the specified PriorityClass is not found, falls back to the cluster's default PriorityClass\n (i.e., the PriorityClass marked as the global default in the cluster).\n- If no valid PriorityClass is found: Sets priority=0 and preemptionPolicy=Never. - Not yet implemented.\n\nFor FederatedPriorityClass: - Not yet implemented.",
|
Description: "PriorityClassName specifies which PriorityClass to use. Its behavior depends on PriorityClassSource:\n\nBehavior of PriorityClassName:\n\nFor KubePriorityClass: - When specified: Uses the named Kubernetes PriorityClass.\n\nFor PodPriorityClass: - Uses PriorityClassName from the PodTemplate. - Not yet implemented.\n\nFor FederatedPriorityClass: - Not yet implemented.",
|
||||||
|
Default: "",
|
||||||
Type: []string{"string"},
|
Type: []string{"string"},
|
||||||
Format: "",
|
Format: "",
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue