Expand description
Finalizer steps.
Finalizer for a KanidmRadiusServer.
Order:
- Delete our Deployment in the foreground.
- Wait until no ReplicaSet or pod uses our config Secrets or tokens.
- Remove our
idm_radius_serversmembership edge and delete the account (which removes every token on it). - Remove the finalizer; owner-reference GC removes the config Secrets and the Service.
Skips: when the referenced Kanidm CR no longer exists, or the account exists without our ownership marker, the Kanidm cleanup is skipped with a Warning event and the finalizer is removed: deletion never blocks forever on something the CR does not own or cannot reach by design. A Kanidm CR that exists but is unreachable is a transient error and retries with backoff.
next_step and identity_cleanup are pure; the reconciler performs
one step per pass and requeues while waiting.
Structs§
- Cleanup
View - What the finalizer sees in one pass.
- Drain
Warnings - The consumer set each deleting CR (by UID) was last warned about, and when. Kept in memory: the finalizer requeues every few seconds and an event per pass would flood the namespace, while an operator restart only repeats one warning.
Enums§
- Cleanup
Step - The next thing the finalizer does.
- Deployment
Phase - Finish
- How the finalizer ends after the identity step.
- Skip
Reason - Why the Kanidm cleanup was skipped.
Constants§
- DRAIN_
WARNING_ INTERVAL - An unchanged set of consumers is warned about at most this often.
- DRAIN_
WARNING_ REASON - Event reason while deletion waits for consumers to stop.
Functions§
- drain_
note - Event note naming the consumers deletion waits for. Bounded: at most
[
DRAIN_NOTE_MAX_CONSUMERS] names, the rest counted. - identity_
cleanup - Map the result of
delete_identityto how the finalizer ends. Transient errors keep their source and retry with backoff. - next_
step - Decide the next finalizer step. Pure.