@@ -1558,9 +1558,30 @@ type ComponentLifecycleActions struct {
15581558 // Without this, services that rely on roleSelectors might improperly direct traffic to wrong replicas.
15591559 //
15601560 // Expected output of this action:
1561- // - On Success: The determined role of the replica, which must align with one of the roles specified
1562- // in the component definition.
1563- // - On Failure: An error message, if applicable, indicating why the action failed.
1561+ // - On Success: The determined role of the replica, which must align with one of the roles
1562+ // specified in the component definition. Stdout MUST be one of the two forms below:
1563+ //
1564+ // <role> // single-token form
1565+ // <role> <roleVersion> // versioned form
1566+ //
1567+ // The two tokens are separated by whitespace (spaces, tabs, or newlines).
1568+ // <roleVersion> is an optional unsigned 64-bit decimal integer that
1569+ // carries the component's authoritative role version for stale-role
1570+ // handling, especially stale exclusive-role claims. A versioned
1571+ // result is accepted only when its <roleVersion> is newer than the
1572+ // versioned result the controller has already accepted for this Pod.
1573+ // The version should represent the complete role fact. For an
1574+ // exclusive primary role, identical versions reported by different
1575+ // replicas must not describe contradictory primary ownership.
1576+ // <role> remains a valid single-token form. Stdout that looks
1577+ // versioned but whose second token is not an unsigned 64-bit decimal
1578+ // integer, or stdout with three or more whitespace-separated tokens,
1579+ // is rejected as malformed and the Pod's role label is not updated.
1580+ // A component may migrate a Pod from the single-token form to the
1581+ // versioned form. After a Pod has reported the versioned form,
1582+ // later single-token results from that Pod are ignored to avoid
1583+ // downgrading from authoritative role-version ordering.
1584+ // - On Failure: An error message, if applicable, indicating why the action failed.
15641585 //
15651586 // Note: This field is immutable once it has been set.
15661587 //
0 commit comments