Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

Mock /rancherversion #32

Merged
merged 2 commits into from
Jun 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/jetstream/plugins/epinio/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,9 @@ func (epinio *Epinio) AddRootGroupRoutes(echoGroup *echo.Group) {

rancherProxyGroup := epinioGroup.Group("/rancher")

// Mock /rancherversion
rancherProxyGroup.GET("/rancherversion", steveProxy.GetRancherVersion)

// Rancher Steve API
steveGroup := rancherProxyGroup.Group("/v1")
steveGroup.Use(p.SetSecureCacheContentMiddleware)
Expand Down
12 changes: 12 additions & 0 deletions src/jetstream/plugins/epinio/rancherproxy/steve/rancherversion.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package steve

import (
_ "embed"
"net/http"

"github.com/labstack/echo/v4"
)

func GetRancherVersion(c echo.Context) error {
return c.JSON(http.StatusOK, "")
}