Skip to content

feat: expose interLink server version via API - #552

Open
w3lld1 wants to merge 3 commits into
interlink-hq:mainfrom
w3lld1:544-version-endpoint
Open

feat: expose interLink server version via API#552
w3lld1 wants to merge 3 commits into
interlink-hq:mainfrom
w3lld1:544-version-endpoint

Conversation

@w3lld1

@w3lld1 w3lld1 commented Jul 30, 2026

Copy link
Copy Markdown

Summary

I added a GET /version endpoint so operators can query the version of the running interLink server without shell access. The response uses the same build-time version value already shown by the CLI and startup logs:

{"version":"0.6.2"}

I also return 405 Method Not Allowed with Allow: GET for other methods.

Validation

  • go test -p 1 ./pkg/interlink/api ./cmd/interlink -count=1
  • go vet ./pkg/interlink/api ./cmd/interlink
  • git diff --check origin/main...HEAD

I did not run the K3s end-to-end suite locally because it requires a full cluster environment; the focused handler and server-package checks cover this change.

Fixes #544

Signed-off-by: w3lld1 <42353747+w3lld1@users.noreply.github.com>
@netlify

netlify Bot commented Jul 30, 2026

Copy link
Copy Markdown

Deploy Preview for interlink-dev canceled.

Name Link
🔨 Latest commit 64cff91
🔍 Latest deploy log https://app.netlify.com/projects/interlink-dev/deploys/6a8ab908c87af700070ab7f8

Signed-off-by: w3lld1 <42353747+w3lld1@users.noreply.github.com>

@dciangot dciangot left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you @w3lld1 ! I have just a comment about what is more useful to have as an information returned from this endpoint

Comment thread cmd/interlink/main.go Outdated
mutex.HandleFunc("/pinglink", interLinkAPIs.Ping)
mutex.HandleFunc("/getLogs", interLinkAPIs.GetLogsHandler)
mutex.HandleFunc("/updateCache", interLinkAPIs.UpdateCacheHandler)
mutex.HandleFunc("/version", api.VersionHandler(virtualkubelet.KubeletVersion))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'd rather put the running interLink software version, in place of the kubelet.

Signed-off-by: w3lld1 <42353747+w3lld1@users.noreply.github.com>
@w3lld1

w3lld1 commented Aug 23, 2026

Copy link
Copy Markdown
Author

Thanks — updated the endpoint in 64cff911 to return the running interLink server version instead of the virtual kubelet version. The e2e and other project checks pass. The remaining lint failure is a toolchain issue: CI selects Go 1.27, while golangci-lint v2.11.2 was built with Go 1.26 and panics before reporting any source finding.

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.

interlink server api call to get the running version

2 participants