Skip to content

Commit

Permalink
Add priorityClassName in PropagationPolicy & ClusterPropagationPolicy
Browse files Browse the repository at this point in the history
Signed-off-by: wei-chenglai <qazwsx0939059006@gmail.com>
  • Loading branch information
seanlaii committed Dec 19, 2024
1 parent 8d89d77 commit 2d81d50
Show file tree
Hide file tree
Showing 7 changed files with 67 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api/openapi-spec/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -19040,6 +19040,10 @@
"$ref": "#/definitions/io.k8s.api.core.v1.Toleration"
}
},
"priorityClassName": {
"description": "PriorityClassName specifies which PriorityClass object should be used to determine the binding's priority and preemption policy.\n\nA custom PriorityClassName must reference an existing PriorityClass object. If not specified, the binding will use the global default PriorityClass. If no global default PriorityClass exists, the binding will have: - priority: 0 - preemptionPolicy: \"Never\"",
"type": "string"
},
"replicaScheduling": {
"description": "ReplicaScheduling represents the scheduling policy on dealing with the number of replicas when propagating resources that have replicas in spec (e.g. deployments, statefulsets) to member clusters.",
"$ref": "#/definitions/com.github.karmada-io.karmada.pkg.apis.policy.v1alpha1.ReplicaSchedulingStrategy"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,17 @@ spec:
type: string
type: object
type: array
priorityClassName:
description: |-
PriorityClassName specifies which PriorityClass object should be used to determine
the binding's priority and preemption policy.
A custom PriorityClassName must reference an existing PriorityClass object.
If not specified, the binding will use the global default PriorityClass.
If no global default PriorityClass exists, the binding will have:
- priority: 0
- preemptionPolicy: "Never"
type: string
replicaScheduling:
description: |-
ReplicaScheduling represents the scheduling policy on dealing with the number of replicas
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,17 @@ spec:
type: string
type: object
type: array
priorityClassName:
description: |-
PriorityClassName specifies which PriorityClass object should be used to determine
the binding's priority and preemption policy.
A custom PriorityClassName must reference an existing PriorityClass object.
If not specified, the binding will use the global default PriorityClass.
If no global default PriorityClass exists, the binding will have:
- priority: 0
- preemptionPolicy: "Never"
type: string
replicaScheduling:
description: |-
ReplicaScheduling represents the scheduling policy on dealing with the number of replicas
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -783,6 +783,17 @@ spec:
type: string
type: object
type: array
priorityClassName:
description: |-
PriorityClassName specifies which PriorityClass object should be used to determine
the binding's priority and preemption policy.
A custom PriorityClassName must reference an existing PriorityClass object.
If not specified, the binding will use the global default PriorityClass.
If no global default PriorityClass exists, the binding will have:
- priority: 0
- preemptionPolicy: "Never"
type: string
replicaScheduling:
description: |-
ReplicaScheduling represents the scheduling policy on dealing with the number of replicas
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -783,6 +783,17 @@ spec:
type: string
type: object
type: array
priorityClassName:
description: |-
PriorityClassName specifies which PriorityClass object should be used to determine
the binding's priority and preemption policy.
A custom PriorityClassName must reference an existing PriorityClass object.
If not specified, the binding will use the global default PriorityClass.
If no global default PriorityClass exists, the binding will have:
- priority: 0
- preemptionPolicy: "Never"
type: string
replicaScheduling:
description: |-
ReplicaScheduling represents the scheduling policy on dealing with the number of replicas
Expand Down
12 changes: 12 additions & 0 deletions pkg/apis/policy/v1alpha1/propagation_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,18 @@ type Placement struct {
// when propagating resources that have replicas in spec (e.g. deployments, statefulsets) to member clusters.
// +optional
ReplicaScheduling *ReplicaSchedulingStrategy `json:"replicaScheduling,omitempty"`

// PriorityClassName specifies which PriorityClass object should be used to determine
// the binding's priority and preemption policy.
//
// A custom PriorityClassName must reference an existing PriorityClass object.
// If not specified, the binding will use the global default PriorityClass.
// If no global default PriorityClass exists, the binding will have:
// - priority: 0
// - preemptionPolicy: "Never"
//
// +optional
PriorityClassName string `json:"priorityClassName,omitempty"`
}

// SpreadFieldValue is the type to define valid values for SpreadConstraint.SpreadByField
Expand Down
7 changes: 7 additions & 0 deletions pkg/generated/openapi/zz_generated.openapi.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2d81d50

Please sign in to comment.