Skip to content

bootstrap: optional Harbor registry mirror for new devices - #37

Merged
tekn0ir merged 3 commits into
mainfrom
registry-mirror
Oct 22, 2026
Merged

tekn0ir merged 3 commits into
mainfrom
registry-mirror

Conversation

@tekn0ir

@tekn0ir tekn0ir commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Anders, 2026-10-22: "Set up harbor to serve all images, use proxy?" Plan: plans/harbor-proxy-staging.md.

  • tnctl bootstrap has optional registry-mirror flags. The template writes registries.yaml with Harbor mirrors and an upstream fallback.
  • Without the flags nothing changes; the goldens prove it.
  • The bootstrap scripts are now written with mode 0600, because they can hold the teamspace's Harbor robot password.

Tests: go test ./cmd/... ./pkg/api/... and (cd pkg/templates && go test ./...) pass.

🤖 Generated with Claude Code

tekn0ir and others added 3 commits October 22, 2026 16:10
…robots

TemplateData gets RegistryMirror, RegistryUsername and RegistryPassword. The
new partial registries.sh.tmpl, included in server.sh.tmpl and agent.sh.tmpl
before the k3s installer, writes /etc/rancher/k3s/registries.yaml (0600,
marker '# managed by tnctl bootstrap') with the six mirrors and the auth. It
does nothing without a mirror, keeps a foreign file with a warning, and
removes a managed one for 'none'. The credential is validated for the
single-quoted shell context and never printed.

tnctl bootstrap: --registry-mirror HOST|none and --registry-credential-file
FILE. The default comes from an optional registry field of the device
credentials response (phase 1b, ignored when absent). Golden files
regenerated; docs/commands/bootstrap.md.

Design: plans/harbor-proxy-staging.md

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…tries.yaml

A device configured by playbooks/registry-mirror.yml (# managed by teknoir) and later
re-bootstrapped with --registry-mirror kept the old file with a possibly stale credential
and only got a warning; --registry-mirror none did not remove it. Either marker is ours now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… the Harbor robot password

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tekn0ir
tekn0ir merged commit b528655 into main Oct 22, 2026
3 checks passed
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.

1 participant