Files
Milan a8e012b594 feat(cli): judge NicoIdentity freshness by its published next check time (#1930)
* feat(cli): judge NicoIdentity freshness by its published next check time

nvkectl get providers reports a NicoIdentity STALE once the current time
is more than five minutes past the status.nextCheckTime CAPNICo
publishes, when that time is later than lastCheckedTime. Without a
usable next check time it keeps the ten-minute rule, after the last
check or, for an Identity never checked, after its creation.

A nextCheckTime that is not a valid time reads UNKNOWN, and such an
Identity is never preferred over a well-formed one that names the same
Secret. The credentials object in -o json and -o yaml gains
nextCheckTime and drops staleAfterSeconds. A STALE detail says how
overdue the scheduled check is, and names a cause only when nvkectl can
observe one.

Signed-off-by: Milan Landaverde <mlandaverde@nvidia.com>

* docs: describe credential freshness by the provider's schedule

The CREDENTIALS table and the FAQ say a result is STALE when the
provider's scheduled check is overdue, or, without a schedule, when its
last check is too old, and that DETAIL names a cause only when nvkectl
can see one. The JSON paragraph lists nextCheckTime.

Signed-off-by: Milan Landaverde <mlandaverde@nvidia.com>

* test(cli): stop asserting the removed stale threshold field

Signed-off-by: Milan Landaverde <mlandaverde@nvidia.com>

* test(cli): check the exact stale detail for a check overdue by its schedule

Signed-off-by: Milan Landaverde <mlandaverde@nvidia.com>

* test(cli): check that get providers -o json shows the next check time

Signed-off-by: Milan Landaverde <mlandaverde@nvidia.com>

* fix(cli): say the age fallback applies without a usable schedule

A published next check time that is not later than the last check is
ignored, as when no schedule is published, so the get providers help
names that case too. The command reference is regenerated.

Signed-off-by: Milan Landaverde <mlandaverde@nvidia.com>

* docs: say the age fallback applies without a usable schedule

Signed-off-by: Milan Landaverde <mlandaverde@nvidia.com>

* fix(cli): name the never-checked case in the get providers help

An Identity that has never been checked falls back to its creation
time, not to a last check, so the help says so. The command reference
is regenerated.

Signed-off-by: Milan Landaverde <mlandaverde@nvidia.com>

* fix(cli): say nextCheckTime is reported even when freshness ignores it

Signed-off-by: Milan Landaverde <mlandaverde@nvidia.com>

* docs: say what to check when a STALE detail names no cause

Signed-off-by: Milan Landaverde <mlandaverde@nvidia.com>

* fix(cli): treat a malformed nextCheckTime as no schedule

A nextCheckTime that is not a valid time now reads exactly like an
absent one: freshness falls back to the age rule, the verdict comes from
the Ready condition, and the Identity ranks like one with no schedule.
Before, it read UNKNOWN, which hid a conclusive FAILING result.

Signed-off-by: Milan Landaverde <mlandaverde@nvidia.com>

* docs: drop the malformed next check time from the UNKNOWN row

Signed-off-by: Milan Landaverde <mlandaverde@nvidia.com>

* fix(cli): ignore a next check time further ahead than the age fallback

A published nextCheckTime more than StaleAfter after the last check no
longer counts as a usable schedule, so a far-future value cannot keep a
stopped manager HEALTHY. The result then reads by the age fallback, as
when no schedule is published; JSON still shows the published value.

Signed-off-by: Milan Landaverde <mlandaverde@nvidia.com>

---------

Signed-off-by: Milan Landaverde <mlandaverde@nvidia.com>
2026-10-27 09:28:50 -07:00
..