Conversation
$HOME/.beast/beast_authorized_keys
Outdated
| @@ -0,0 +1,5 @@ | |||
|
|
|||
There was a problem hiding this comment.
probably during setup and build. Will remove
api/router.go
Outdated
| statusGroup.GET("/challenge/:name", challengeStatusHandler) | ||
| statusGroup.GET("/all", statusHandler) | ||
| statusGroup.GET("/all/:filter", statusHandler) | ||
| statusGroup.GET("/health/:name", ChallengeHealthHandler) |
There was a problem hiding this comment.
the authorise middleware is there in the whole api group on line 53. Do i need to create a separate auth for status group?
|
Please remove all the irrelevant changes i.e version upgrades from the mod files. Also, did you manage to test this and get accurate usage statistics for the containers? |
|
memory part is accurate and working fine, however the CPU still returns 0 even if I print the absolute amount instead of difference. |
|
@DarkPhoenix42 reverted go.mod and go.sum files |
|
|
||
| // API routes group | ||
| apiGroup := router.Group("/api", authorize) | ||
| apiGroup := router.Group("/api", |
There was a problem hiding this comment.
The "authorize" middleware has been removed from this entire group. Please fix it. Also, we only want admins to be able to access the healthcheck route, so move this endpoint to an appropriate group.
Signed-off-by: kartikgoyal137 <kartikcodes137@gmail.com>
|
Done. Put it as a separate route with adminauthorize middleware |
/status/health/:name displays cpu_percentage, memory_percentage and memory_usage in bytes.
Does simple challenge use any cpu? It came 0 percent.
Added three functions in package cr containers.go, GetContainerStats, GetContainerLimits and RestartContainer
beast health-probe also logs the memory usage.