You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 36fdd67
Browse filesBrowse the repository at this point in the historyBrowse files
fix(status): stop a leftover ACME resolver from reporting divergence (#236)
* fix(status): judge certificates only from resolvers Onebox configures
A resolver key left in acme.json by an older proxy configuration keeps a
certificate that nothing renews. ob status judged it like any other and
reported a healthy host as diverged once it entered the renewal floor.
Certificates now carry the resolver key and store file they came from.
Only certificates from letsencrypt and onebox-wildcard can be overdue.
Others are listed as orphaned, with the key to remove, and never set
Diverged. Both status views share one judging helper and one sort order.
Fixes#235
* chore(deps): upgrade Go and site dependencies
Go: xo/terminfo v1.3.1, go.yaml.in/yaml/v4 v4.0.0.
Site: astro 7.4.7, @astrojs/starlight 0.42.10, @astrojs/markdown-remark 7.3.6.
spf13/pflag stays at v1.0.10: v1.1.0 prints every boolean flag as
--flag[=true|false] in help output. TypeScript stays on 6.x.
* fix(status): judge certificates by the resolvers the static config defines
Hardcoding letsencrypt and onebox-wildcard as managed left the #235
symptom in place for a host that dropped its wildcard routes, and for a
resolver key sitting in a store file it does not write.
Status now reads certificatesResolvers.*.acme.storage from the static
configuration it already stages, and renews-or-orphans each certificate
by its (resolver, store file) pair. Custom resolvers in a project-owned
traefik.yml are judged too. When the configuration cannot be read, no
certificate is judged overdue or orphaned. The orphan hint names the
store's full host path.
* fix(status): judge certificates by the host's applied static config
Judging by the locally staged config was wrong whenever the host ran an
older one: a resolver removed locally but still renewing on the host was
called orphaned, and the hint told the operator to delete a certificate
the proxy still serves.
Status now reads traefik.yml or traefik.yaml from the host's proxy config
directory in the certificate read and reads every store file a resolver
there names, as well as acme.json and acme-wildcard.json. When that file
is refused or does not parse, the issue is recorded, nothing is called
orphaned and certificates are judged by expiry alone, so a real overdue
renewal is never hidden. The local config read is back to its original
job. The /letsencrypt mount target is one constant shared by the compose
template, the static config and the parser.
* fix(status): never orphan a certificate whose resolver store is unclear
A resolver with a relative storage path, mixed-case keys, or a storage
value status cannot place was treated as unconfigured, so its renewing
certificate was called orphaned with a hint to delete it.
CertificateStores now matches keys without regard to case, resolves a
relative storage path from /, and lists every defined resolver, mapping
an unplaceable store to "". Certificates of such a resolver are judged
by expiry and never orphaned. Any failed read of the applied config is
recorded, not raised, so the store reads in the same step still run.
The parse issue no longer quotes YAML errors, which can repeat values
from the file, and the overdue issue names the resolver and store.
* fix(status): drop deletion advice and match Traefik's config lookup
Traefik reads its static configuration only at startup, so a proxy not
restarted after an apply can still renew under a key the file no longer
names. The orphaned hint now says the certificate is not renewed by the
applied configuration and names the resolver and store, without telling
the operator to delete it.
Resolver names match without regard to case. traefik.yaml is read before
traefik.yml, the order Traefik searches. The text view prints a config
issue before an unreadable store returns, as the JSON snapshot does, and
every config issue says certificates are judged by expiry alone.
px.certConfigIssue=issue+"; certificates are judged by expiry alone"
215
+
returnnil
216
+
}
217
+
// Any other failure, such as cat losing a race with ob proxy apply
218
+
// swapping the directory, is recorded too: the stores this step reads
219
+
// next matter more than the configuration that refines them.
220
+
ifres.ExitCode!=0 {
221
+
px.certConfigIssue=fmt.Sprintf("the applied static configuration at %s could not be read (exit %d); certificates are judged by expiry alone", path, res.ExitCode)
222
+
returnnil
223
+
}
224
+
ifstrings.TrimSpace(res.Stdout) =="" {
225
+
continue
226
+
}
227
+
// The parse error is not quoted: it can repeat values from the file,
228
+
// and the message reaches the terminal and the JSON snapshot.
0 commit comments