Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

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:

FieldDescriptionDefaultValidation
type stringtype corresponds to the Node condition type being evaluated.MaxLength: 316
MinLength: 1
Required: {}
currentStatus ConditionStatuscurrentStatus is the actual status value observed on the Node, one of True, False, Unknown.Enum: [True False Unknown]
Required: {}
requiredStatus ConditionStatusrequiredStatus is the status value defined in the rule that must be matched, one of True, False, Unknown.Enum: [True False Unknown]
Required: {}
defaultStatus ConditionStatusdefaultStatus 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:

FieldDescription
allOfConditionPolicyAllOf requires ALL conditions to match their requiredStatus (default).
anyOfConditionPolicyAnyOf 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:

FieldDescriptionDefaultValidation
type stringtype 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 ConditionStatusrequiredStatus is status of the condition, one of True, False, Unknown.Enum: [True False Unknown]
Required: {}
defaultStatus ConditionStatusdefaultStatus 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:

FieldDescriptionDefaultValidation
affectedNodes integeraffectedNodes is the total count of Nodes that match the rule’s criteria.Minimum: 0
Optional: {}
taintsToAdd integertaintsToAdd is the number of Nodes that currently lack the specified taint and would have it applied.Minimum: 0
Optional: {}
taintsToRemove integertaintsToRemove is the number of Nodes that currently possess the
taint but no longer meet the criteria, leading to its removal.
Minimum: 0
Optional: {}
riskyOperations integerriskyOperations represents the count of Nodes where required conditions
are missing entirely, potentially indicating an ambiguous node state.
Minimum: 0
Optional: {}
summary stringsummary 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:

FieldDescription
bootstrap-onlyEnforcementModeBootstrapOnly applies configuration only during the first reconcile.
continuousEnforcementModeContinuous continuously monitors and enforces the configuration.

NodeEvaluation

NodeEvaluation provides a detailed audit of a single Node’s compliance with the rule.

Appears in:

FieldDescriptionDefaultValidation
nodeName stringnodeName 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 arrayconditionResults 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 TaintStatustaintStatus represents the taint status on the Node, one of Present, Absent.Enum: [Present Absent]
Required: {}
lastEvaluationTime TimelastEvaluationTime 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:

FieldDescription
AvailableNodeEvaluationStateAvailable indicates the node has satisfied all applicable rules and is available for scheduling.
NotAvailableNodeEvaluationStateNotAvailable 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:

FieldDescriptionDefaultValidation
nodeName stringnodeName 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 stringreason provides a brief explanation of the evaluation result.MaxLength: 256
MinLength: 1
Optional: {}
message stringmessage is a human-readable message indicating details about the evaluation.MaxLength: 10240
MinLength: 1
Optional: {}
lastEvaluationTime TimelastEvaluationTime 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.

FieldDescriptionDefaultValidation
apiVersion stringreadiness.node.x-k8s.io/v1alpha1
kind stringNodeReadinessEvaluation
metadata ObjectMetaRefer to Kubernetes API documentation for fields of metadata.Optional: {}
spec NodeReadinessEvaluationSpecspec defines the desired state of NodeReadinessEvaluation.Required: {}
status NodeReadinessEvaluationStatusstatus defines the observed state of NodeReadinessEvaluation.MinProperties: 1
Optional: {}

NodeReadinessEvaluationSpec

NodeReadinessEvaluationSpec defines the desired state of NodeReadinessEvaluation.

Appears in:

FieldDescriptionDefaultValidation
nodeName stringnodeName 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:

FieldDescriptionDefaultValidation
conditions Condition arrayconditions 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 NodeEvaluationStatestate 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 arrayrules 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.

FieldDescriptionDefaultValidation
apiVersion stringreadiness.node.x-k8s.io/v1alpha1
kind stringNodeReadinessRule
metadata ObjectMetaRefer to Kubernetes API documentation for fields of metadata.Optional: {}
spec NodeReadinessRuleSpecspec defines the desired state of NodeReadinessRuleRequired: {}
status NodeReadinessRuleStatusstatus defines the observed state of NodeReadinessRuleMinProperties: 1
Optional: {}

NodeReadinessRuleSpec

NodeReadinessRuleSpec defines the desired state of NodeReadinessRule.

Appears in:

FieldDescriptionDefaultValidation
conditions ConditionRequirement arrayconditions 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 EnforcementModeenforcementMode 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 Tainttaint 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 LabelSelectornodeSelector 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 ConditionPolicyconditionPolicy 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 booleandryRun 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:

FieldDescriptionDefaultValidation
observedGeneration integerobservedGeneration reflects the generation of the most recently observed NodeReadinessRule by the controller.Minimum: 1
Optional: {}
appliedNodes string arrayappliedNodes 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 arrayfailedNodes 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 arraynodeEvaluations 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 DryRunResultsdryRunResults 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:

FieldDescriptionDefaultValidation
ruleName stringruleName 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 UIDruleUID 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 RuleStatusruleStatus indicates the overall outcome of the rule’s criteria against the Node.Enum: [Satisfied Unsatisfied]
Required: {}
taintStatus TaintStatustaintStatus reflects the observed state of the rule’s specified taint on the Node (Present/Absent).Enum: [Present Absent]
Required: {}
taintKey stringtaintKey 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 TaintEffecttaintEffect 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 ConditionPolicyconditionPolicy 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 stringreason contains a concise, machine-readable string detailing the primary outcome.MaxLength: 256
MinLength: 1
Optional: {}
message stringmessage is a comprehensive, human-readable explanation providing further context.MaxLength: 10240
MinLength: 1
Optional: {}
readinessConditions ConditionEvaluationResult arrayreadinessConditions 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 TimelastEvaluatedAt records the exact moment the controller most recently assessed this rule.Required: {}
firstEvaluatedAt TimefirstEvaluatedAt is the time the rule was first assessed against this node.Optional: {}
taintObservedAt TimetaintObservedAt 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 TimetaintAddedAt 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 TimetaintRemovedAt 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:

FieldDescription
SatisfiedRuleStatusSatisfied 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.
UnsatisfiedRuleStatusUnsatisfied 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:

FieldDescription
PresentTaintStatusPresent represent the taint present on the Node.
AbsentTaintStatusAbsent represent the taint absent on the Node.