Merge pull request #6163 from seanlaii/update-pp-sp
Make priorityClassSource in the SchedulePriority of PropagationPolicy a required field
This commit is contained in:
commit
ce5be5efb4
|
@ -19297,6 +19297,7 @@
|
|||
"description": "SchedulePriority defines how Karmada should resolve the priority and preemption policy for workload scheduling.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"priorityClassSource",
|
||||
"priorityClassName"
|
||||
],
|
||||
"properties": {
|
||||
|
@ -19305,7 +19306,7 @@
|
|||
"type": "string"
|
||||
},
|
||||
"priorityClassSource": {
|
||||
"description": "PriorityClassSource specifies where Karmada should look for the PriorityClass definition. Available options: - KubePriorityClass (default): 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"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -902,11 +902,10 @@ spec:
|
|||
- Not yet implemented.
|
||||
type: string
|
||||
priorityClassSource:
|
||||
default: KubePriorityClass
|
||||
description: |-
|
||||
PriorityClassSource specifies where Karmada should look for the PriorityClass definition.
|
||||
Available options:
|
||||
- KubePriorityClass (default): Uses Kubernetes PriorityClass (scheduling.k8s.io/v1)
|
||||
- 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)
|
||||
enum:
|
||||
|
@ -914,6 +913,7 @@ spec:
|
|||
type: string
|
||||
required:
|
||||
- priorityClassName
|
||||
- priorityClassSource
|
||||
type: object
|
||||
schedulerName:
|
||||
default: default-scheduler
|
||||
|
|
|
@ -899,11 +899,10 @@ spec:
|
|||
- Not yet implemented.
|
||||
type: string
|
||||
priorityClassSource:
|
||||
default: KubePriorityClass
|
||||
description: |-
|
||||
PriorityClassSource specifies where Karmada should look for the PriorityClass definition.
|
||||
Available options:
|
||||
- KubePriorityClass (default): Uses Kubernetes PriorityClass (scheduling.k8s.io/v1)
|
||||
- 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)
|
||||
enum:
|
||||
|
@ -911,6 +910,7 @@ spec:
|
|||
type: string
|
||||
required:
|
||||
- priorityClassName
|
||||
- priorityClassSource
|
||||
type: object
|
||||
schedulerName:
|
||||
default: default-scheduler
|
||||
|
|
|
@ -682,13 +682,12 @@ const (
|
|||
type SchedulePriority struct {
|
||||
// PriorityClassSource specifies where Karmada should look for the PriorityClass definition.
|
||||
// Available options:
|
||||
// - KubePriorityClass (default): Uses Kubernetes PriorityClass (scheduling.k8s.io/v1)
|
||||
// - 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)
|
||||
//
|
||||
// +kubebuilder:default="KubePriorityClass"
|
||||
// +kubebuilder:validation:Enum=KubePriorityClass
|
||||
// +optional
|
||||
// +required
|
||||
PriorityClassSource PriorityClassSource `json:"priorityClassSource,omitempty"`
|
||||
|
||||
// PriorityClassName specifies which PriorityClass to use. Its behavior depends on PriorityClassSource:
|
||||
|
|
|
@ -5150,7 +5150,7 @@ func schema_pkg_apis_policy_v1alpha1_SchedulePriority(ref common.ReferenceCallba
|
|||
Properties: map[string]spec.Schema{
|
||||
"priorityClassSource": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "PriorityClassSource specifies where Karmada should look for the PriorityClass definition. Available options: - KubePriorityClass (default): 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{"string"},
|
||||
Format: "",
|
||||
},
|
||||
|
@ -5163,7 +5163,7 @@ func schema_pkg_apis_policy_v1alpha1_SchedulePriority(ref common.ReferenceCallba
|
|||
},
|
||||
},
|
||||
},
|
||||
Required: []string{"priorityClassName"},
|
||||
Required: []string{"priorityClassSource", "priorityClassName"},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue