Skip to content

Commit 446dbe9

Browse files
authored
Merge pull request #6010 from jabellard/component-priority-class-name
Proposal: Add Support for Component Priority Class Configuration in Karmada Operator
2 parents 43f2953 + b743a3b commit 446dbe9

File tree

1 file changed

+82
-0
lines changed
  • docs/proposals/karmada-operator/component-priority-class-name

1 file changed

+82
-0
lines changed
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
---
2+
title: Support Priority Class Configuration for Karmada Control Plane Components
3+
authors:
4+
- "@jabellard"
5+
reviewers:
6+
- "@RainbowMango"
7+
approvers:
8+
- "@RainbowMango"
9+
10+
creation-date: 2025-01-01
11+
12+
---
13+
14+
# Support Priority Class Configuration for Karmada Control Plane Components
15+
16+
## Summary
17+
18+
This proposal aims to extend the Karmada operator by introducing support for configuring the priority class name for Karmada control plane components.
19+
By enabling users to configure a custom priority class name, this feature ensures critical components are scheduled with appropriate priority, enhancing overall system reliability and stability.
20+
21+
## Motivation
22+
23+
Currently, the priority class name for Karmada components is hardcoded to `system-node-critical` for some components, while others do not specify a priority class at all. This limitation can compromise
24+
the reliability and stability of the system in environments where scheduling of critical components is essential.
25+
26+
By allowing users to configure the priority class name, this feature ensures:
27+
28+
- Greater control over scheduling of critical Karmada control plane components, enhancing system reliability and stability.
29+
- Alignment with organizational policies for resource prioritization and workload management.
30+
- Flexibility to adapt priority classes for specific operational environments and use cases.
31+
32+
### Goals
33+
- Provide a mechanism for configuring the scheduling priority of all in-cluster Karmada control plane components.
34+
- Ensure the feature integrates seamlessly with existing deployments while maintaining backward compatibility.
35+
36+
### Non-Goals
37+
38+
- Address scheduling priorities for components outside the Karmada control plane.
39+
40+
## Proposal
41+
42+
Introduce a new optional `priorityClassName` field in the `CommonSettings` struct, which is used across all Karmada components.
43+
44+
### API Changes
45+
46+
```go
47+
// CommonSettings describes the common settings of all Karmada Components.
48+
type CommonSettings struct {
49+
50+
// PriorityClassName specifies the priority class name for the component.
51+
// If not specified, it defaults to "system-node-critical".
52+
// +kubebuilder:default="system-node-critical"
53+
// +optional
54+
PriorityClassName string `json:"priorityClassName,omitempty"`
55+
56+
// Other, existing fields omitted for brevity...
57+
}
58+
59+
```
60+
### User Stories
61+
62+
#### Story 1
63+
As an infrastructure engineer, I need to configure the priority class for Karmada control plane components to ensure critical components are reliably scheduled to ensure system stability and reliability.
64+
65+
#### Story 2
66+
As an infrastructure engineer managing a multi-tenant cluster, I want the ability to override the default priority class for Karmada control plane components with a custom priority class that aligns with my organization’s policies, ensuring reliable resource allocation and system stability across workloads.
67+
68+
### Risks and Mitigations
69+
70+
1. *Backward Compatibility*: Existing deployments might rely on the current hardcoded `system-node-critical` priority class for some components.
71+
72+
- *Mitigation*: The `priorityClassName` field defaults to `system-node-critical` when not explicitly specified, preserving the current behavior.
73+
74+
## Design Details
75+
76+
During the reconciliation process, the Karmada operator will:
77+
78+
- Check if `priorityClassName` is specified in the component’s `CommonSettings`.
79+
- If specified:
80+
- Apply the specified priority class to the component’s Pod spec.
81+
- If not specified:
82+
- Default to `system-node-critical` to maintain backward compatibility.

0 commit comments

Comments
 (0)