@@ -1575,9 +1575,30 @@ type ComponentLifecycleActions struct {
15751575 // Without this, services that rely on roleSelectors might improperly direct traffic to wrong replicas.
15761576 //
15771577 // Expected output of this action:
1578- // - On Success: The determined role of the replica, which must align with one of the roles specified
1579- // in the component definition.
1580- // - On Failure: An error message, if applicable, indicating why the action failed.
1578+ // - On Success: The determined role of the replica, which must align with one of the roles
1579+ // specified in the component definition. Stdout MUST be one of the two forms below:
1580+ //
1581+ // <role> // single-token form
1582+ // <role> <roleVersion> // versioned form
1583+ //
1584+ // The two tokens are separated by whitespace (spaces, tabs, or newlines).
1585+ // <roleVersion> is an optional unsigned 64-bit decimal integer that
1586+ // carries the component's authoritative role version for stale-role
1587+ // handling, especially stale exclusive-role claims. A versioned
1588+ // result is accepted only when its <roleVersion> is newer than the
1589+ // versioned result the controller has already accepted for this Pod.
1590+ // The version should represent the complete role fact. For an
1591+ // exclusive primary role, identical versions reported by different
1592+ // replicas must not describe contradictory primary ownership.
1593+ // <role> remains a valid single-token form. Stdout that looks
1594+ // versioned but whose second token is not an unsigned 64-bit decimal
1595+ // integer, or stdout with three or more whitespace-separated tokens,
1596+ // is rejected as malformed and the Pod's role label is not updated.
1597+ // A component may migrate a Pod from the single-token form to the
1598+ // versioned form. After a Pod has reported the versioned form,
1599+ // later single-token results from that Pod are ignored to avoid
1600+ // downgrading from authoritative role-version ordering.
1601+ // - On Failure: An error message, if applicable, indicating why the action failed.
15811602 //
15821603 // Note: This field is immutable once it has been set.
15831604 //
0 commit comments