Skip to content

Commit 2feb8ff

Browse files
committed
feat: add mission control about endpoint
Expose mission-control version metadata from /about for the UI version display. Return the binary app version and the Helm chart version when FLANKSOURCE_CHART_VERSION is available.
1 parent 073c52a commit 2feb8ff

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

echo/serve.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010
"net"
1111
"net/http"
1212
"net/url"
13+
"os"
1314
"strings"
1415
"time"
1516

@@ -150,6 +151,13 @@ func New(ctx context.Context) *echov4.Echo {
150151
return c.String(http.StatusOK, "OK")
151152
})
152153

154+
e.GET("/about", func(c echov4.Context) error {
155+
return c.JSON(http.StatusOK, map[string]string{
156+
"appVersion": api.BuildVersion,
157+
"chartVersion": os.Getenv("FLANKSOURCE_CHART_VERSION"),
158+
})
159+
})
160+
153161
personController := PersonController{kratos: auth.NewAPIClient(auth.KratosAPI)}
154162
e.POST("/people/update", personController.UpdatePerson, rbac.Authorization(policy.ObjectPeople, policy.ActionUpdate))
155163
e.DELETE("/people/:id", personController.DeletePerson, rbac.Authorization(policy.ObjectPeople, policy.ActionDelete))

0 commit comments

Comments
 (0)