GhiduriGuides
Aprobare prin amprentăDigest approval
Mecanismul central al Keryn: o schimbare se execută doar dacă primește amprenta planului pe care l-ați citit.
Keryn’s core mechanism: a change runs only if it receives the digest of the plan you read.
Cum funcționeazăHow it works
- Keryn construiește planul complet: comenzile pe gazde sau manifestul Kubernetes.
- Calculează amprenta SHA-256 a planului și o afișează.
- La rularea cu
--approve, reconstruiește planul și recalculează amprenta. - Dacă cele două amprente diferă, comanda se oprește înainte de orice schimbare.
- Keryn builds the full plan: the host commands or the Kubernetes manifest.
- It computes the plan’s SHA-256 digest and prints it.
- When run with
--approve, it rebuilds the plan and recomputes the digest. - If the two digests differ, the command stops before any change.
Ce acoperă amprentaWhat the digest covers
bootstrap: gazdele, versiunile fixate (k3s, cert-manager, pluginul NVIDIA, registrul) și pașii de instalare.apply: fiecare obiect Kubernetes generat, octet cu octet.rollback: aplicația și revizia la care se revine.
bootstrap: hosts, pinned versions (k3s, cert-manager, NVIDIA plugin, registry) and install steps.apply: every generated Kubernetes object, byte for byte.rollback: the app and the revision to return to.
Exemplu de refuzRefusal example
$ keryn apply --approve 5a7903b5…
refusing to execute: approved digest 5a7903b5… does not match plan 8c21…De ce SHA-256Why SHA-256
Este practic imposibil să construiești două planuri diferite cu aceeași amprentă. Aprobarea unei amprente înseamnă aprobarea exactă a unui singur plan.
It is practically impossible to build two different plans with the same digest. Approving a digest means approving exactly one plan.