API Reference
Packages
readiness.node.x-k8s.io/v1alpha1
Package v1alpha1 contains API Schema definitions for the v1alpha1 API group.
Resource Types
ConditionEvaluationResult
ConditionEvaluationResult provides a detailed report of the comparison between the Node’s observed condition and the rule’s requirement.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
type string | type corresponds to the Node condition type being evaluated. | MaxLength: 316 MinLength: 1 Required: {} | |
currentStatus ConditionStatus | currentStatus is the actual status value observed on the Node, one of True, False, Unknown. | Enum: [True False Unknown] Required: {} | |
requiredStatus ConditionStatus | requiredStatus is the status value defined in the rule that must be matched, one of True, False, Unknown. | Enum: [True False Unknown] Required: {} | |
defaultStatus ConditionStatus | defaultStatus is the status a condition is evaluated to if the condition is not found in a node. Reflects the defaultStatus configured in the rule spec. | Enum: [True False Unknown] Optional: {} |
ConditionPolicy
Underlying type: string
ConditionPolicy defines how the list of conditions is aggregated when evaluating a rule.
Validation:
- Enum: [allOf anyOf]
Appears in:
| Field | Description |
|---|---|
allOf | ConditionPolicyAllOf requires ALL conditions to match their requiredStatus (default). |
anyOf | ConditionPolicyAnyOf requires at least ONE condition to match its requiredStatus. |
ConditionRequirement
ConditionRequirement defines a specific Node condition and the status value required to trigger the controller’s action. It also contains an optional default status value.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
type string | type of Node condition Following kubebuilder validation is referred from https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Condition | MaxLength: 316 MinLength: 1 Required: {} | |
requiredStatus ConditionStatus | requiredStatus is status of the condition, one of True, False, Unknown. | Enum: [True False Unknown] Required: {} | |
defaultStatus ConditionStatus | defaultStatus is the status a condition is evaluated to if the condition is not found in a node. Accepted values are True, False, Unknown. It is optional. When omitted, the effective default is Unknown, applied transparently by the controller at evaluation time. Note: This field must not be set when enforcementMode is bootstrap-only. | Enum: [True False Unknown] Optional: {} |
DryRunResults
DryRunResults provides a summary of the actions the controller would perform if DryRun mode is enabled.
Validation:
- MinProperties: 1
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
affectedNodes integer | affectedNodes is the total count of Nodes that match the rule’s criteria. | Minimum: 0 Optional: {} | |
taintsToAdd integer | taintsToAdd is the number of Nodes that currently lack the specified taint and would have it applied. | Minimum: 0 Optional: {} | |
taintsToRemove integer | taintsToRemove is the number of Nodes that currently possess the taint but no longer meet the criteria, leading to its removal. | Minimum: 0 Optional: {} | |
riskyOperations integer | riskyOperations represents the count of Nodes where required conditions are missing entirely, potentially indicating an ambiguous node state. | Minimum: 0 Optional: {} | |
summary string | summary provides a human-readable overview of the dry run evaluation, highlighting key findings or warnings. | MaxLength: 4096 MinLength: 1 Required: {} |
EnforcementMode
Underlying type: string
EnforcementMode specifies how the controller maintains the desired state.
Validation:
- Enum: [bootstrap-only continuous]
Appears in:
| Field | Description |
|---|---|
bootstrap-only | EnforcementModeBootstrapOnly applies configuration only during the first reconcile. |
continuous | EnforcementModeContinuous continuously monitors and enforces the configuration. |
NodeEvaluation
NodeEvaluation provides a detailed audit of a single Node’s compliance with the rule.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
nodeName string | nodeName is the name of the evaluated Node. | MaxLength: 253 MinLength: 1 Pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ Required: {} | |
conditionResults ConditionEvaluationResult array | conditionResults provides a detailed breakdown of each condition evaluation for this Node. This allows for granular auditing of which specific criteria passed or failed during the rule assessment. | MaxItems: 5000 Required: {} | |
taintStatus TaintStatus | taintStatus represents the taint status on the Node, one of Present, Absent. | Enum: [Present Absent] Required: {} | |
lastEvaluationTime Time | lastEvaluationTime is the timestamp when the controller last assessed this Node. | Required: {} |
NodeEvaluationState
Underlying type: string
NodeEvaluationState indicates the overall readiness/availability state of the node based on all rules.
Validation:
- Enum: [Available NotAvailable]
Appears in:
| Field | Description |
|---|---|
Available | NodeEvaluationStateAvailable indicates the node has satisfied all applicable rules and is available for scheduling. |
NotAvailable | NodeEvaluationStateNotAvailable indicates one or more applicable rules are currently not satisfied. |
NodeFailure
NodeFailure provides diagnostic details for Nodes that could not be successfully evaluated by the rule.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
nodeName string | nodeName is the name of the failed Node. Following kubebuilder validation is referred from https://github.com/kubernetes/apimachinery/blob/84d740c9e27f3ccc94c8bc4d13f1b17f60f7080b/pkg/util/validation/validation.go#L198 | MaxLength: 253 MinLength: 1 Pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ Required: {} | |
reason string | reason provides a brief explanation of the evaluation result. | MaxLength: 256 MinLength: 1 Optional: {} | |
message string | message is a human-readable message indicating details about the evaluation. | MaxLength: 10240 MinLength: 1 Optional: {} | |
lastEvaluationTime Time | lastEvaluationTime is the timestamp of the last rule check failed for this Node. | Required: {} |
NodeReadinessEvaluation
NodeReadinessEvaluation is the Schema for the NodeReadinessEvaluations API. Each instance maps 1:1 to a Node and folds the outcomes of all applicable NodeReadinessRules for that node into a single object. An ownerReference to the corresponding Node is set for automatic garbage collection when the node is deleted.
| Field | Description | Default | Validation |
|---|---|---|---|
apiVersion string | readiness.node.x-k8s.io/v1alpha1 | ||
kind string | NodeReadinessEvaluation | ||
metadata ObjectMeta | Refer to Kubernetes API documentation for fields of metadata. | Optional: {} | |
spec NodeReadinessEvaluationSpec | spec defines the desired state of NodeReadinessEvaluation. | Required: {} | |
status NodeReadinessEvaluationStatus | status defines the observed state of NodeReadinessEvaluation. | MinProperties: 1 Optional: {} |
NodeReadinessEvaluationSpec
NodeReadinessEvaluationSpec defines the desired state of NodeReadinessEvaluation.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
nodeName string | nodeName specifies the exact name of the target Kubernetes Node. This object establishes a strict 1:1 relationship with the specified node, acting as the single source of truth for all rules and statuses applied to it. Because it binds this resource to a specific physical or virtual machine, it cannot be changed once set. The validation constraints enforce standard Kubernetes resource naming (RFC 1123 DNS Subdomain format), as defined in upstream apimachinery: https://github.com/kubernetes/apimachinery/blob/master/pkg/util/validation/validation.go#L198 | MaxLength: 253 MinLength: 1 Pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ Required: {} |
NodeReadinessEvaluationStatus
NodeReadinessEvaluationStatus defines the observed state of NodeReadinessEvaluation.
Validation:
- MinProperties: 1
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
conditions Condition array | conditions represent the latest available observations of the node’s readiness evaluation state. Known condition types are: - “Evaluated”: indicates whether the controller successfully evaluated all rules without errors. - “Available”: indicates whether the node has satisfied all rules, has zero taints applied, and is available for scheduling. | MaxItems: 8 Optional: {} | |
state NodeEvaluationState | state indicates the overall readiness state of the node based on all applicable rules. It acts as a top-level health indicator for this node’s readiness evaluation. | Enum: [Available NotAvailable] Optional: {} | |
rules RuleEvaluation array | rules contains the evaluation outcomes for all rules applicable to this node. Each entry is keyed by ruleName, allowing independent per-rule updates by parallel rule-workers without last-write-wins conflicts (listType=map). | MaxItems: 100 Optional: {} |
NodeReadinessRule
NodeReadinessRule is the Schema for the NodeReadinessRules API.
| Field | Description | Default | Validation |
|---|---|---|---|
apiVersion string | readiness.node.x-k8s.io/v1alpha1 | ||
kind string | NodeReadinessRule | ||
metadata ObjectMeta | Refer to Kubernetes API documentation for fields of metadata. | Optional: {} | |
spec NodeReadinessRuleSpec | spec defines the desired state of NodeReadinessRule | Required: {} | |
status NodeReadinessRuleStatus | status defines the observed state of NodeReadinessRule | MinProperties: 1 Optional: {} |
NodeReadinessRuleSpec
NodeReadinessRuleSpec defines the desired state of NodeReadinessRule.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
conditions ConditionRequirement array | conditions contains a list of the Node conditions that defines the specific criteria that must be met for taints to be managed on the target Node. The presence or status of these conditions directly triggers the application or removal of Node taints. | MaxItems: 32 MinItems: 1 Required: {} | |
enforcementMode EnforcementMode | enforcementMode specifies how the controller maintains the desired state. enforcementMode is one of bootstrap-only, continuous. “bootstrap-only” applies the configuration once during initial setup. “continuous” ensures the state is monitored and corrected throughout the resource lifecycle. | Enum: [bootstrap-only continuous] Required: {} | |
taint Taint | taint defines the specific Taint (Key, Value, and Effect) to be managed on Nodes that meet the defined condition criteria. The taint key must follow Kubernetes qualified name format: prefix/name where prefix is ‘readiness.k8s.io’ (DNS subdomain) and name is a qualified name (max 63 chars, alphanumeric, ‘-’, ‘_’, ‘.’, must start and end with alphanumeric). ref: git.k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/api/validate/content/kube.go#L24-L72 Supported effects: NoSchedule, PreferNoSchedule, NoExecute. Caution: NoExecute evicts existing pods and can cause significant disruption when combined with continuous enforcement mode. Prefer NoSchedule for most use cases. | Required: {} | |
nodeSelector LabelSelector | nodeSelector limits the scope of this rule to a specific subset of Nodes. An empty selector matches every Node in the cluster, so it is rejected. At least one of matchLabels or matchExpressions must be set. | Required: {} | |
conditionPolicy ConditionPolicy | conditionPolicy controls how the conditions list is evaluated. “allOf” (default) requires every condition to match its requiredStatus before the taint is removed. “anyOf” requires at least one condition to match its requiredStatus. anyOf cannot be used with enforcementMode: bootstrap-only. | Enum: [allOf anyOf] Optional: {} | |
dryRun boolean | dryRun when set to true, The controller will evaluate Node conditions and log intended taint modifications without persisting changes to the cluster. Proposed actions are reflected in the resource status. | Optional: {} |
NodeReadinessRuleStatus
NodeReadinessRuleStatus defines the observed state of NodeReadinessRule.
Validation:
- MinProperties: 1
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
observedGeneration integer | observedGeneration reflects the generation of the most recently observed NodeReadinessRule by the controller. | Minimum: 1 Optional: {} | |
appliedNodes string array | appliedNodes lists the names of Nodes where the taint has been successfully managed. This provides a quick reference to the scope of impact for this rule. | MaxItems: 5000 items:MaxLength: 253 Optional: {} | |
failedNodes NodeFailure array | failedNodes lists the Nodes where the rule evaluation encountered an error. This is used for troubleshooting configuration issues, such as invalid selectors during node lookup. | MaxItems: 5000 Optional: {} | |
nodeEvaluations NodeEvaluation array | nodeEvaluations provides detailed insight into the rule’s assessment for individual Nodes. This is primarily used for auditing and debugging why specific Nodes were or were not targeted by the rule. | MaxItems: 5000 Optional: {} | |
dryRunResults DryRunResults | dryRunResults captures the outcome of the rule evaluation when DryRun is enabled. This field provides visibility into the actions the controller would have taken, allowing users to preview taint changes before they are committed. | MinProperties: 1 Optional: {} |
RuleEvaluation
RuleEvaluation defines the outcome of evaluating a single NodeReadinessRule against this Node.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
ruleName string | ruleName is the name of the NodeReadinessRule. This field is the map key for status.rules (listType=map) and must always be present. | MaxLength: 253 MinLength: 1 Required: {} | |
ruleUID UID | ruleUID is the UID of the NodeReadinessRule. If the rule is deleted and recreated with the same name, the UID will differ, allowing the controller to detect and replace stale evaluation entries. | Required: {} | |
ruleStatus RuleStatus | ruleStatus indicates the overall outcome of the rule’s criteria against the Node. | Enum: [Satisfied Unsatisfied] Required: {} | |
taintStatus TaintStatus | taintStatus reflects the observed state of the rule’s specified taint on the Node (Present/Absent). | Enum: [Present Absent] Required: {} | |
taintKey string | taintKey is the key of the taint managed by this rule, stamped at evaluation time so this entry is self-contained without requiring a lookup of the rule. Matches rule.spec.taint.key. | MaxLength: 253 MinLength: 1 Required: {} | |
taintEffect TaintEffect | taintEffect is the effect of the taint managed by this rule, stamped at evaluation time so this entry is self-contained without requiring a lookup of the rule. Matches rule.spec.taint.effect. | Enum: [NoSchedule PreferNoSchedule NoExecute] Required: {} | |
conditionPolicy ConditionPolicy | conditionPolicy is the aggregation policy used when evaluating the conditions list, stamped at evaluation time so this entry is self-contained without requiring a lookup of the rule. Matches rule.spec.conditionPolicy. | Enum: [allOf anyOf] Required: {} | |
reason string | reason contains a concise, machine-readable string detailing the primary outcome. | MaxLength: 256 MinLength: 1 Optional: {} | |
message string | message is a comprehensive, human-readable explanation providing further context. | MaxLength: 10240 MinLength: 1 Optional: {} | |
readinessConditions ConditionEvaluationResult array | readinessConditions provides a detailed breakdown of each condition evaluation for this Node. This allows for granular debugging of which specific criteria passed/failed. | MaxItems: 32 Optional: {} | |
lastEvaluatedAt Time | lastEvaluatedAt records the exact moment the controller most recently assessed this rule. | Required: {} | |
firstEvaluatedAt Time | firstEvaluatedAt is the time the rule was first assessed against this node. | Optional: {} | |
taintObservedAt Time | taintObservedAt is the time NRC first observed the taint present on the node, regardless of whether NRC applied it or it was pre-existing (e.g. via –register-with-taints). This marks the beginning of the node being blocked by this rule and is the correct start time for computing time-to-unblock SLIs. | Optional: {} | |
taintAddedAt Time | taintAddedAt is the time NRC itself first applied the taint to the node in the current taint lifecycle (i.e., since the last removal). This field is nil when the taint was pre-existing and NRC adopted it rather than creating it. The value is set once on the Absent→Present transition and carried forward on subsequent reconciles; it is not the timestamp of the most recent reconcile. Use taintObservedAt for “how long has the node been blocked”; use this field to measure NRC’s own apply latency (taintAddedAt - firstEvaluatedAt). | Optional: {} | |
taintRemovedAt Time | taintRemovedAt is the time the controller successfully removed the taint after the node satisfied all conditions. | Optional: {} |
RuleStatus
Underlying type: string
RuleStatus defines the result of evaluating a NodeReadinessRule’s criteria against a Node. Rule-configuration faults (e.g. an invalid NodeSelector) are reported on the NodeReadinessRule’s own status conditions, not here.
Validation:
- Enum: [Satisfied Unsatisfied]
Appears in:
| Field | Description |
|---|---|
Satisfied | RuleStatusSatisfied indicates that the Node successfully met all conditions defined in the NodeReadinessRule. The controller will ensure the corresponding taint is removed so the node is unblocked. |
Unsatisfied | RuleStatusUnsatisfied indicates that one or more conditions defined in the NodeReadinessRule were not met. The controller will ensure the corresponding taint remains present to block scheduling. |
TaintStatus
Underlying type: string
TaintStatus specifies status of the Taint on Node.
Validation:
- Enum: [Present Absent]
Appears in:
| Field | Description |
|---|---|
Present | TaintStatusPresent represent the taint present on the Node. |
Absent | TaintStatusAbsent represent the taint absent on the Node. |