diff --git a/api/openapi-spec/swagger.json b/api/openapi-spec/swagger.json index 2460fc7237c8..611638b1465b 100644 --- a/api/openapi-spec/swagger.json +++ b/api/openapi-spec/swagger.json @@ -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" diff --git a/charts/karmada/_crds/bases/policy/policy.karmada.io_clusterpropagationpolicies.yaml b/charts/karmada/_crds/bases/policy/policy.karmada.io_clusterpropagationpolicies.yaml index 835dde895cb1..8a82ff73df39 100644 --- a/charts/karmada/_crds/bases/policy/policy.karmada.io_clusterpropagationpolicies.yaml +++ b/charts/karmada/_crds/bases/policy/policy.karmada.io_clusterpropagationpolicies.yaml @@ -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 diff --git a/charts/karmada/_crds/bases/policy/policy.karmada.io_propagationpolicies.yaml b/charts/karmada/_crds/bases/policy/policy.karmada.io_propagationpolicies.yaml index 7b488b40ea04..4d6148fa165f 100644 --- a/charts/karmada/_crds/bases/policy/policy.karmada.io_propagationpolicies.yaml +++ b/charts/karmada/_crds/bases/policy/policy.karmada.io_propagationpolicies.yaml @@ -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 diff --git a/charts/karmada/_crds/bases/work/work.karmada.io_clusterresourcebindings.yaml b/charts/karmada/_crds/bases/work/work.karmada.io_clusterresourcebindings.yaml index 7bfb5ed72887..5074e5818822 100644 --- a/charts/karmada/_crds/bases/work/work.karmada.io_clusterresourcebindings.yaml +++ b/charts/karmada/_crds/bases/work/work.karmada.io_clusterresourcebindings.yaml @@ -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 diff --git a/charts/karmada/_crds/bases/work/work.karmada.io_resourcebindings.yaml b/charts/karmada/_crds/bases/work/work.karmada.io_resourcebindings.yaml index f2ad93b827ae..682743afb17a 100644 --- a/charts/karmada/_crds/bases/work/work.karmada.io_resourcebindings.yaml +++ b/charts/karmada/_crds/bases/work/work.karmada.io_resourcebindings.yaml @@ -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 diff --git a/pkg/apis/policy/v1alpha1/propagation_types.go b/pkg/apis/policy/v1alpha1/propagation_types.go index fe9316f72ca3..a06743648c56 100644 --- a/pkg/apis/policy/v1alpha1/propagation_types.go +++ b/pkg/apis/policy/v1alpha1/propagation_types.go @@ -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 diff --git a/pkg/generated/openapi/zz_generated.openapi.go b/pkg/generated/openapi/zz_generated.openapi.go index 5d76f3b2facc..2c2b17c19dc3 100644 --- a/pkg/generated/openapi/zz_generated.openapi.go +++ b/pkg/generated/openapi/zz_generated.openapi.go @@ -4757,6 +4757,13 @@ func schema_pkg_apis_policy_v1alpha1_Placement(ref common.ReferenceCallback) com Ref: ref("github.com/karmada-io/karmada/pkg/apis/policy/v1alpha1.ReplicaSchedulingStrategy"), }, }, + "priorityClassName": { + SchemaProps: spec.SchemaProps{ + 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{"string"}, + Format: "", + }, + }, }, }, },