Started the implementation of new routes for admiralty

This commit is contained in:
pb 2025-02-19 12:28:48 +01:00
parent a53dbccc23
commit 198c1e1a28
2 changed files with 33 additions and 1 deletions

View File

@ -12,4 +12,18 @@ If default Swagger page is displayed instead of tyour api, change url in swagger
url: "swagger.json"
Note on particular process :
- set a bookin delete all related workflow booking before creating new ones. (no update of existing ones)
- set a bookin delete all related workflow booking before creating new ones. (no update of existing ones)
## Admiralty
The routes in /admiralty will trigger actions on the DC's Kubernetes API to retrieve information on Admiralty resources.
### Targets
Remote clusters that can be used by Admiralty to delegate pods.
To set up a target Admiralty needs to associate a `secret` which contains an edited version of the target's `kubeconfig`.
Once the Target is set the remote cluster appears in the output of `kubectl get nodes` under the name `admiralty-<namespace>-<target name>-*`
**TODO** : We might need a way to test if an IP is associated to an admiralty target

18
controllers/admiralty.go Normal file
View File

@ -0,0 +1,18 @@
package controllers
import (
beego "github.com/beego/beego/v2/server/web"
)
// Operations about the admiralty objects of the datacenter
type AdmiraltyController struct {
beego.Controller
}
// @Title GetAllTargets
// @Description find all Admiralty Target
// @Success 200 {booking} models.booking
// @router /admiralty/targets [get]
func (c *AdmiraltyController) GetAllTargets() {
}