Fișierul keryn.yamlThe keryn.yaml file
PrezentareOverview
Fișierul keryn.yaml este singura sursă de adevăr. Are șase secțiuni de nivel superior; doar version, project și hosts sunt obligatorii.
The keryn.yaml file is the single source of truth. It has six top-level sections; only version, project and hosts are required.
StructuraStructure
| Câmp | Tip | Descriere |
|---|---|---|
version | 1 | versiunea formatului; în prezent doar 1 |
project | nume | numele proiectului; devine spațiul de nume Kubernetes |
hosts | hartă | gazdele, după nume |
tls | obiect | email, staging; vedeți Domenii și TLS |
registry | obiect | enabled, size (implicit 20Gi): registru privat de imagini în grup |
network | obiect | vpn, vpn_cidr (implicit 10.77.0.0/24) |
apps | hartă | aplicațiile, după nume |
| Field | Type | Description |
|---|---|---|
version | 1 | format version; currently only 1 |
project | name | project name; becomes the Kubernetes namespace |
hosts | map | the hosts, by name |
tls | object | email, staging; see Domains and TLS |
registry | object | enabled, size (default 20Gi): private image registry in the cluster |
network | object | vpn, vpn_cidr (default 10.77.0.0/24) |
apps | map | the apps, by name |
Reguli de validareValidation rules
- Numele de proiect, gazde și aplicații folosesc litere mici, cifre și cratimă, ca în Kubernetes.
- Câmpurile necunoscute sunt respinse, ca o greșeală de scriere să nu treacă neobservată.
- Exact o gazdă are rolul
serverîntr-un grup cu mai multe gazde. - Variabilele de mediu cu nume de tip parolă, token sau cheie sunt respinse; folosiți secretele.
- Project, host and app names use lowercase letters, digits and hyphens, as in Kubernetes.
- Unknown fields are rejected, so a typo cannot pass unnoticed.
- Exactly one host has the
serverrole in a multi-host cluster. - Environment variables with password, token or key-like names are rejected; use secrets.
DeterminismDeterminism
Același fișier produce întotdeauna exact aceleași obiecte, în aceeași ordine, cu aceeași amprentă. Pe acest lucru se bazează aprobarea prin amprentă.
The same file always produces exactly the same objects, in the same order, with the same digest. Digest approval relies on this.