Skip to content

Make the IPAM CLI plugin installable via datumctl#65

Open
scotwells wants to merge 4 commits into
mainfrom
feat/publish-milo-ipam-plugin
Open

Make the IPAM CLI plugin installable via datumctl#65
scotwells wants to merge 4 commits into
mainfrom
feat/publish-milo-ipam-plugin

Conversation

@scotwells

@scotwells scotwells commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

What this delivers

Makes the IPAM command-line experience installable for every user, on any platform, in one command. Once this ships and a release is cut, anyone can do:

datumctl plugin install ipam
datumctl ipam pool list

IPAM lets teams manage their IP address space — provision pools and claim prefixes. This is the packaging that puts that experience one command away on Linux, macOS, and Windows (amd64 and arm64), instead of asking people to clone the repo and build a binary.

How it works

Cutting a version tag now builds the IPAM plugin for every supported platform, packages each build into an archive alongside a checksums file, and attaches them to the GitHub release. Each published binary reports the version it was released under, and the release is exactly what the datumctl plugin catalog downloads and verifies when someone installs IPAM — so the plugin is delivered straight from the project's own release. The existing container-image and kustomize-bundle publishing is unchanged, and the new packaging only runs on version tags.

Assets produced

milo-ipam_Linux_x86_64.tar.gz    milo-ipam_Linux_arm64.tar.gz
milo-ipam_Darwin_x86_64.tar.gz   milo-ipam_Darwin_arm64.tar.gz
milo-ipam_Windows_x86_64.zip     milo-ipam_Windows_arm64.zip
checksums.txt

Verified locally with a snapshot build: all six archive names match the catalog contract exactly, each archive contains a milo-ipam binary that reports the release version, and the checksums file covers every archive.

How it fits together

After merge

  1. Cut a v* tag → the release publishes the archives + checksums file.
  2. Replace the placeholder sha256 values in Register the IPAM CLI plugin cli-plugins#1 (plugins/ipam.yaml) with the real checksums from the release.

Tagged releases now build and publish the milo-ipam datumctl plugin as
per-platform archives plus a checksums.txt, attached as GitHub release
assets.

- .goreleaser.yaml builds milo-ipam from ./cmd/milo-ipam for
  linux/darwin/windows on amd64/arm64. The archive name_template renders
  OS title-cased and amd64 as x86_64, producing the exact asset names the
  datumctl plugin catalog expects:
    milo-ipam_Linux_x86_64.tar.gz   milo-ipam_Linux_arm64.tar.gz
    milo-ipam_Darwin_x86_64.tar.gz  milo-ipam_Darwin_arm64.tar.gz
    milo-ipam_Windows_x86_64.zip    milo-ipam_Windows_arm64.zip
  plus checksums.txt covering all archives. The binary inside each archive
  is milo-ipam (milo-ipam.exe on Windows).
- release.yml gains a publish-plugin job that runs goreleaser on version
  tags only, leaving the existing container-image and kustomize-bundle
  publishing jobs untouched.
- dist/ is gitignored.
Match the plugin's --plugin-manifest description to the catalog entry:
'Manage IP address space (pools and prefixes) across the platform'.
@scotwells scotwells changed the title Publish the milo-ipam plugin on tagged releases Make the IPAM CLI plugin installable via datumctl Jun 30, 2026
Make pluginVersion an ldflags-overridable var and have goreleaser inject the
release version (-X main.pluginVersion={{ .Version }}) at build time, so a
published milo-ipam reports the version it was released under instead of a
hardcoded constant. Local/dev builds keep the in-source default.
A plain 'go build' previously reported 0.1.0, making a local build
indistinguishable from the released 0.1.0. Default to 0.0.0 so an
unreleased build is unambiguous; release builds still get the real tag
injected via ldflags.
@scotwells scotwells marked this pull request as ready for review June 30, 2026 23:55
@scotwells scotwells enabled auto-merge June 30, 2026 23:55
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