feat: the Let's Encrypt screen is driven by the instance description #22
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Keel-Linux/confconsole!22
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/lets-encrypt-from-the-spec"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What. The domain boxes of Advanced > Let's Encrypt > Get certificate are prefilled from
/etc/keel/instance.yaml:tls.acme.domainswhen it declares any, elseinstance.fqdn(the name the first boot now records, Keel-Linux/inithooks#36), else from/etc/dehydrated/confconsole.domains.txtas before,example.comon a fresh machine. When the operator confirms the domains and the request succeeds, the description getstls.acme.domains(as confirmed, without blanks or aliases) andtls.acme.enabled: true;challengeandagree_tosare left as they were. When the request fails nothing is written to it. The domains file is still written and backed up as before, since dehydrated reads it; HTTP-01 and DNS-01 are unchanged.Why. The maintainer wants confconsole driven by the spec: the screen offered example.com whatever the machine was named, and a certificate it obtained was unknown to
keel spec apply --systemandkeel diff.How the spec is written. With confconsole's own writer,
keelcli(stage_spec→keel spec validate --no-secret-files→commit_spec), the same path the Database mode and Keel Cloud screens use; keel has no writer of its own, so there is no keel version to depend on. A description keel refuses, or a machine without keel, is shown on the screen ("the certificate was issued, but ... was NOT changed") and the file is left as it was.Decisions to note. The screen's description text was eleven rows, which with the five boxes does not fit a 24 row console; it is shorter now, says where the boxes come from, and a test holds it to
keelbanner.available(24, 80). A success still returns to the menu silently, as before.Tested.
tests/test_lets_encrypt.py(31) loads the plugin the way confconsole does, with the fake console; requests, dehydrated-wrapper and keel are replaced.keelcli.pystays at 100 percent in the gate (860 passed);get_certificate.pymeasured alone is 61 percent, every line added here covered, the rest the DNS-01 flow (COVERAGE.md).