@@ -112,34 +112,6 @@ type NodeReadinessRuleStatus struct {
112112 // +kubebuilder:validation:Minimum=1
113113 ObservedGeneration int64 `json:"observedGeneration,omitempty"`
114114
115- // appliedNodes lists the names of Nodes where the taint has been successfully managed.
116- // This provides a quick reference to the scope of impact for this rule.
117- //
118- // +optional
119- // +listType=set
120- // +kubebuilder:validation:MaxItems=5000
121- // +kubebuilder:validation:items:MaxLength=253
122- AppliedNodes []string `json:"appliedNodes,omitempty"`
123-
124- // failedNodes lists the Nodes where the rule evaluation encountered an error.
125- // This is used for troubleshooting configuration issues, such as invalid selectors during node lookup.
126- //
127- // +optional
128- // +listType=map
129- // +listMapKey=nodeName
130- // +kubebuilder:validation:MaxItems=5000
131- FailedNodes []NodeFailure `json:"failedNodes,omitempty"`
132-
133- // nodeEvaluations provides detailed insight into the rule's assessment for individual Nodes.
134- // This is primarily used for auditing and debugging why specific Nodes were or
135- // were not targeted by the rule.
136- //
137- // +optional
138- // +listType=map
139- // +listMapKey=nodeName
140- // +kubebuilder:validation:MaxItems=5000
141- NodeEvaluations []NodeEvaluation `json:"nodeEvaluations,omitempty"`
142-
143115 // dryRunResults captures the outcome of the rule evaluation when DryRun is enabled.
144116 // This field provides visibility into the actions the controller would have taken,
145117 // allowing users to preview taint changes before they are committed.
@@ -148,93 +120,6 @@ type NodeReadinessRuleStatus struct {
148120 DryRunResults DryRunResults `json:"dryRunResults,omitempty,omitzero"`
149121}
150122
151- // NodeFailure provides diagnostic details for Nodes that could not be successfully evaluated by the rule.
152- type NodeFailure struct {
153- // nodeName is the name of the failed Node.
154- //
155- // Following kubebuilder validation is referred from
156- // https://github.com/kubernetes/apimachinery/blob/84d740c9e27f3ccc94c8bc4d13f1b17f60f7080b/pkg/util/validation/validation.go#L198
157- //
158- // +required
159- // +kubebuilder:validation:MinLength=1
160- // +kubebuilder:validation:MaxLength=253
161- // +kubebuilder:validation:Pattern=`^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$`
162- NodeName string `json:"nodeName,omitempty"`
163-
164- // reason provides a brief explanation of the evaluation result.
165- //
166- // +optional
167- // +kubebuilder:validation:MinLength=1
168- // +kubebuilder:validation:MaxLength=256
169- Reason string `json:"reason,omitempty"`
170-
171- // message is a human-readable message indicating details about the evaluation.
172- //
173- // +optional
174- // +kubebuilder:validation:MinLength=1
175- // +kubebuilder:validation:MaxLength=10240
176- Message string `json:"message,omitempty"`
177-
178- // lastEvaluationTime is the timestamp of the last rule check failed for this Node.
179- //
180- // +required
181- LastEvaluationTime metav1.Time `json:"lastEvaluationTime,omitempty,omitzero"`
182- }
183-
184- // NodeEvaluation provides a detailed audit of a single Node's compliance with the rule.
185- type NodeEvaluation struct {
186- // nodeName is the name of the evaluated Node.
187- //
188- // +required
189- // +kubebuilder:validation:MinLength=1
190- // +kubebuilder:validation:MaxLength=253
191- // +kubebuilder:validation:Pattern=`^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$`
192- NodeName string `json:"nodeName,omitempty"`
193-
194- // conditionResults provides a detailed breakdown of each condition evaluation
195- // for this Node. This allows for granular auditing of which specific
196- // criteria passed or failed during the rule assessment.
197- //
198- // +required
199- // +listType=map
200- // +listMapKey=type
201- // +kubebuilder:validation:MaxItems=5000
202- ConditionResults []ConditionEvaluationResult `json:"conditionResults,omitempty"`
203-
204- // taintStatus represents the taint status on the Node, one of Present, Absent.
205- //
206- // +required
207- TaintStatus TaintStatus `json:"taintStatus,omitempty"`
208-
209- // lastEvaluationTime is the timestamp when the controller last assessed this Node.
210- //
211- // +required
212- LastEvaluationTime metav1.Time `json:"lastEvaluationTime,omitempty,omitzero"`
213- }
214-
215- // ConditionEvaluationResult provides a detailed report of the comparison between
216- // the Node's observed condition and the rule's requirement.
217- type ConditionEvaluationResult struct {
218- // type corresponds to the Node condition type being evaluated.
219- //
220- // +required
221- // +kubebuilder:validation:MinLength=1
222- // +kubebuilder:validation:MaxLength=316
223- Type string `json:"type,omitempty"`
224-
225- // currentStatus is the actual status value observed on the Node, one of True, False, Unknown.
226- //
227- // +required
228- // +kubebuilder:validation:Enum=True;False;Unknown
229- CurrentStatus corev1.ConditionStatus `json:"currentStatus,omitempty"`
230-
231- // requiredStatus is the status value defined in the rule that must be matched, one of True, False, Unknown.
232- //
233- // +required
234- // +kubebuilder:validation:Enum=True;False;Unknown
235- RequiredStatus corev1.ConditionStatus `json:"requiredStatus,omitempty"`
236- }
237-
238123// DryRunResults provides a summary of the actions the controller would perform if DryRun mode is enabled.
239124// +kubebuilder:validation:MinProperties=1
240125type DryRunResults struct {
0 commit comments