Skip to content

OCI containers get their env as environment.*; a route can be left to the hand-maintained Caddyfile - #92

Merged
wmantly merged 2 commits into
mainfrom
feat/oci-environment-and-external-routes
Nov 5, 2026
Merged

wmantly merged 2 commits into
mainfrom
feat/oci-environment-and-external-routes

Conversation

@wmantly

@wmantly wmantly commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Closes #9. Closes #8.

This work was written on 2026-10-30 and left uncommitted on a local main checkout. It is moved here as-is and rebased onto current main (which now includes #88). The patch applied cleanly.

#9: OCI containers get their env as environment.*

  • A systemd service still reads /etc/default/<service>.
  • An OCI container (a docker: or quay: image, or one that already has environment.* config) reads environment.* instance config, because that is what its entrypoint reads at start. Until now its env and env_from never reached it.
  • Apply writes only the declared keys that differ, over stdin so a value is never on a command line, then restarts the instance.
  • Undeclared keys are kept.
  • Values never appear in a plan, a log, or an error.
  • Plan and apply share the env decision (diffEnv), and the idempotency tests run both against the same states.

#8: routing.external: true

  • A service can say its domain is already served by the hand-maintained edge Caddyfile (for example a wildcard block). No site file is published for it, so it no longer clashes with the hand-written route.

AGENTS.md (principles 3 and 6) and the README describe both.

Checks:

  • gofmt -l .: empty.
  • go mod tidy: no diff.
  • go vet ./...: ok.
  • go test -race ./...: all pass.
  • node --check: ok.

No self-merge.

🤖 Generated with Claude Code

… the hand-maintained Caddyfile

An OCI container (a docker: or quay: image, or one that already has
environment.* config) reads environment.* instance config, not
/etc/default/<service>, so its env and env_from values never reached it.
Apply now writes the declared keys that differ into environment.* over
stdin, keeps undeclared keys, never shows a value in a plan, log or
error, and restarts the instance. A systemd service still reads
/etc/default/<service>.

routing.external: true says a service's domain is already served by the
hand-maintained edge Caddyfile (for example a wildcard block), so no
site file is published for it.

Closes #9. Closes #8.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gitguardian

gitguardian Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

️✅ There are no secrets present in this pull request anymore.

If these secrets were true positive and are still valid, we highly recommend you to revoke them.
While these secrets were previously flagged, we no longer have a reference to the
specific commits where they were detected. Once a secret has been leaked into a git
repository, you should consider it compromised, even if it was deleted immediately.
Find here more information about risks.


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@wmantly
wmantly merged commit 8b62472 into main Nov 5, 2026
2 checks passed
@wmantly
wmantly deleted the feat/oci-environment-and-external-routes branch November 5, 2026 03:30
wmantly added a commit that referenced this pull request Nov 5, 2026
…ackups

Resolves the conflicts with #90, #91 and #92:
- serve: start the backup scheduler (#91) and log the host name (#89).
- config: DefaultHost (#89) beside Backup and Snapshots (#91).
- The daemon had two HostName fields: #91's for backup object keys and
  #89's --host-name. They are one now: --host-name (env
  NATIVE_OPS_HOST_NAME, as #91 already read) names the host's plans and
  its backup keys; empty still falls back to the OS host name for backups.
- One writeFleet test helper in pkg/config (both PRs added it).
- The single-host golden plan is regenerated from main without #89: the
  only difference is #92's environment.* line for an OCI image, so #89
  still changes nothing for a single host.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OCI containers: converge environment.* config, not /etc/default Routes served by a hand-maintained Caddyfile: let a service say its route is external

1 participant