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.",
|
"description": "SchedulePriority defines how Karmada should resolve the priority and preemption policy for workload scheduling.",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": [
|
"required": [
|
||||||
|
"priorityClassSource",
|
||||||
"priorityClassName"
|
"priorityClassName"
|
||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
|
@ -19305,7 +19306,7 @@
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"priorityClassSource": {
|
"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"
|
"type": "string"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -902,11 +902,10 @@ spec:
|
||||||
- Not yet implemented.
|
- Not yet implemented.
|
||||||
type: string
|
type: string
|
||||||
priorityClassSource:
|
priorityClassSource:
|
||||||
default: KubePriorityClass
|
|
||||||
description: |-
|
description: |-
|
||||||
PriorityClassSource specifies where Karmada should look for the PriorityClass definition.
|
PriorityClassSource specifies where Karmada should look for the PriorityClass definition.
|
||||||
Available options:
|
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)
|
- PodPriorityClass: Uses PriorityClassName from PodTemplate: PodSpec.PriorityClassName (not yet implemented)
|
||||||
- FederatedPriorityClass: Uses Karmada FederatedPriorityClass (not yet implemented)
|
- FederatedPriorityClass: Uses Karmada FederatedPriorityClass (not yet implemented)
|
||||||
enum:
|
enum:
|
||||||
|
@ -914,6 +913,7 @@ spec:
|
||||||
type: string
|
type: string
|
||||||
required:
|
required:
|
||||||
- priorityClassName
|
- priorityClassName
|
||||||
|
- priorityClassSource
|
||||||
type: object
|
type: object
|
||||||
schedulerName:
|
schedulerName:
|
||||||
default: default-scheduler
|
default: default-scheduler
|
||||||
|
|
|
@ -899,11 +899,10 @@ spec:
|
||||||
- Not yet implemented.
|
- Not yet implemented.
|
||||||
type: string
|
type: string
|
||||||
priorityClassSource:
|
priorityClassSource:
|
||||||
default: KubePriorityClass
|
|
||||||
description: |-
|
description: |-
|
||||||
PriorityClassSource specifies where Karmada should look for the PriorityClass definition.
|
PriorityClassSource specifies where Karmada should look for the PriorityClass definition.
|
||||||
Available options:
|
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)
|
- PodPriorityClass: Uses PriorityClassName from PodTemplate: PodSpec.PriorityClassName (not yet implemented)
|
||||||
- FederatedPriorityClass: Uses Karmada FederatedPriorityClass (not yet implemented)
|
- FederatedPriorityClass: Uses Karmada FederatedPriorityClass (not yet implemented)
|
||||||
enum:
|
enum:
|
||||||
|
@ -911,6 +910,7 @@ spec:
|
||||||
type: string
|
type: string
|
||||||
required:
|
required:
|
||||||
- priorityClassName
|
- priorityClassName
|
||||||
|
- priorityClassSource
|
||||||
type: object
|
type: object
|
||||||
schedulerName:
|
schedulerName:
|
||||||
default: default-scheduler
|
default: default-scheduler
|
||||||
|
|
|
@ -682,13 +682,12 @@ const (
|
||||||
type SchedulePriority struct {
|
type SchedulePriority struct {
|
||||||
// PriorityClassSource specifies where Karmada should look for the PriorityClass definition.
|
// PriorityClassSource specifies where Karmada should look for the PriorityClass definition.
|
||||||
// Available options:
|
// 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)
|
// - PodPriorityClass: Uses PriorityClassName from PodTemplate: PodSpec.PriorityClassName (not yet implemented)
|
||||||
// - FederatedPriorityClass: Uses Karmada FederatedPriorityClass (not yet implemented)
|
// - FederatedPriorityClass: Uses Karmada FederatedPriorityClass (not yet implemented)
|
||||||
//
|
//
|
||||||
// +kubebuilder:default="KubePriorityClass"
|
|
||||||
// +kubebuilder:validation:Enum=KubePriorityClass
|
// +kubebuilder:validation:Enum=KubePriorityClass
|
||||||
// +optional
|
// +required
|
||||||
PriorityClassSource PriorityClassSource `json:"priorityClassSource,omitempty"`
|
PriorityClassSource PriorityClassSource `json:"priorityClassSource,omitempty"`
|
||||||
|
|
||||||
// PriorityClassName specifies which PriorityClass to use. Its behavior depends on PriorityClassSource:
|
// 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{
|
Properties: map[string]spec.Schema{
|
||||||
"priorityClassSource": {
|
"priorityClassSource": {
|
||||||
SchemaProps: spec.SchemaProps{
|
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"},
|
Type: []string{"string"},
|
||||||
Format: "",
|
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