Skip to content

feat(satellite): enable headless standalone mode - #620

Open
SuryaPratapIIIT wants to merge 1 commit into
container-registry:mainfrom
SuryaPratapIIIT:feat/headless-standalone-mode
Open

feat(satellite): enable headless standalone mode#620
SuryaPratapIIIT wants to merge 1 commit into
container-registry:mainfrom
SuryaPratapIIIT:feat/headless-standalone-mode

Conversation

@SuryaPratapIIIT

@SuryaPratapIIIT SuryaPratapIIIT commented Aug 12, 2026

Copy link
Copy Markdown

Allows the satellite to operate without connection to Ground Control. Skips registration, heartbeats, and state replication schedulers, relying exclusively on local configuration.

  • Fixes: #
  • CLI & Environment Options: Added the --headless CLI flag and HEADLESS environment variable support.
  • Bypassed GC Requirements: Skipped required arguments validation (--token, --ground-control-url, --harbor-registry-url) on startup if running in headless mode.
  • Lifecycle Overhaul: Disabled registration (ztrScheduler), status reporting/heartbeats (statusScheduler), and remote state replication (stateScheduler) from launching during startup when headless mode is active.
  • Config Initialization: Extended the ConfigManager to track headless mode and bypass GC URL validation.

Verification

  • Ran local test suite: go test ./...
  • Verified standalone execution using --headless flag.

Review in cubic

Summary by CodeRabbit

  • New Features
    • Added a headless startup mode configurable through the --headless CLI flag or HEADLESS environment setting.
    • Headless mode allows startup without token, Ground Control, or Harbor registry URL validation.
    • Background scheduling and status reporting are disabled in headless mode.
  • Bug Fixes
    • Standard mode validation and startup behavior remain unchanged.

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 3ee152ef-74c6-48b8-b49e-217d11b8c81c

📥 Commits

Reviewing files that changed from the base of the PR and between 341cb42 and 1f54aa9.

📒 Files selected for processing (5)
  • cmd/satellite/main.go
  • internal/env/harbor-satellite.go
  • internal/satellite/satellite.go
  • pkg/config/manager.go
  • pkg/config/validate.go

📝 Walkthrough

Walkthrough

The satellite now supports headless mode through the HEADLESS environment setting or --headless CLI flag. Headless mode bypasses selected validation and skips ZTR, state replication, and status-report scheduler startup.

Changes

Headless satellite mode

Layer / File(s) Summary
Headless input and wiring
internal/env/harbor-satellite.go, cmd/satellite/main.go
Adds the Headless configuration field, loads it from HEADLESS or --headless, prints a startup message, and passes the value to configuration initialization.
Headless configuration validation
pkg/config/manager.go, pkg/config/validate.go
Stores headless state in ConfigManager and skips Ground Control URL validation during initialization, reload, and default enforcement when headless mode is enabled.
Headless scheduler startup
internal/satellite/satellite.go
Skips ZTR, state replication, and status-report scheduler creation and startup for headless satellites. Non-headless behavior remains unchanged.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related issues

  • container-registry/harbor-satellite issue 227: Covers the headless Satellite mode, including flags, environment settings, validation bypasses, and scheduler disabling.

Possibly related PRs

Suggested labels: enhancement

Suggested reviewers: vg006

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: enabling headless standalone mode for the satellite.
Description check ✅ Passed The description explains the headless mode, lists the main changes, and documents verification with tests and standalone execution.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@gitar-bot

gitar-bot Bot commented Aug 12, 2026

Copy link
Copy Markdown

Gitar is working

Gitar

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 5 files

Re-trigger cubic

Allows the satellite to operate without connection to Ground Control. Skips registration, heartbeats, and state replication schedulers, relying exclusively on local configuration.

Signed-off-by: SuryaPratap <suryapratap592006@gmail.com>
@SuryaPratapIIIT
SuryaPratapIIIT force-pushed the feat/headless-standalone-mode branch from 1f54aa9 to 4b63c55 Compare August 12, 2026 15:56
@vg006

vg006 commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

@SuryaPratapIIIT

Thank you for your interest in Harbor Satellite, but I encourage you to look into the project and discuss with the maintainers and commuinty, before proceeding with the PRs directly.

Architecturally, Harbor Satellite is dependent on Ground Control(GC) and it must. There has never been an discussion/proposal to decouples Satellite from GC and making it completely independent. Satellite may bootstrap with the local configs, but that doesn't mean it neither require GC nor to report GC.

Hence this PR may get closed anytime. Thank you.

@SuryaPratapIIIT

Copy link
Copy Markdown
Author

@vg006 Hyy Vijay , that's my fault I haven't discussed about the context to the maintainers and jumped directly to PR.
Next time i will definately discuss about it to the maintainers of the project.

Thank You .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants