feat: install and invoke datumctl service extensions#198
Draft
scotwells wants to merge 14 commits into
Draft
Conversation
Closes #197 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
scotwells
added a commit
to datum-cloud/compute
that referenced
this pull request
May 22, 2026
Adds the datumctl-compute plugin binary with commands for deploying and managing containerized workloads on Datum Cloud via the developer CLI. Commands: - deploy — create or update a workload from flags or a manifest file - destroy — delete a workload and clean up its revision history - status — show health, placement summary, and recent revision info - instances — list and describe running instances across cities - scale — adjust minimum replica count across placements - rollout — watch live progress, view history, and roll back revisions - restart — trigger a rolling restart of a workload or specific city - quota — inspect per-city instance usage and quota headroom Closes #98. Depends on datum-cloud/datumctl#198. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Cobra rejects unknown flags before RunE fires, which caused plugin subcommand flags (e.g. --image, --city) to be dropped or rejected when invoking a plugin with subcommands. Adds ForwardPlugin, which mirrors the ForwardHelp/ForwardCompletion pattern: after the command tree is fully built, if os.Args[1] resolves to a managed plugin binary and is not a built-in command, the process is replaced via syscall.Exec before cobra.Execute() runs. This passes all original args — including plugin-owned flags — through unchanged. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Also fixes plugin list showing blank version for manually-placed binaries. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ForwardCompletion now accepts a *client.DatumCloudFactory and calls BuildEnv to overlay the six DATUM_* variables onto the child process environment. Without this, plugin completion handlers that call the Datum API (e.g. CompleteWorkloadNames) silently failed because DATUM_API_HOST and DATUM_CREDENTIALS_HELPER were absent. The factory is now created before ForwardCompletion in root.go so the credentials are available at completion time. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Also improves install error messages to be less technical. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
plugin list now shows "update" in the STATUS column when a newer version is available in the local index. plugin search saves its results to the index cache so subsequent list invocations reflect the latest discovery. A hint line is printed on TTY when any updates are found. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #197
What ships
datumctl plugin install/list/upgrade/remove— managed installs from GitHub Releases with SHA256 verification and a lock file for reproducible installsdatumctl dns ...automatically finds and execsdatumctl-dns, passing the operator's active org, project, and API host as environment variablesdatumctl auth get-tokenon demand; tokens are never injected into the environment--plugin-manifestfor compatibility checks at install and invocation timego.datum.net/datumctl/plugin) —Context(),Token(),ServeManifest(),NewRootCmd()for first-party plugin authorsexamples/plugin-dns/) showing a working end-to-end integrationTest plan
go build ./...passesgo test ./internal/pluginstore/... ./internal/plugindispatch/... ./internal/cmd/plugin/... ./plugin/...passes (43 tests)examples/plugin-dns/, rundatumctl dns zones listend-to-end🤖 Generated with Claude Code