monitord is able to create an admiralty Source on remote peer
This commit is contained in:
parent
0a15357445
commit
3c692d2026
@ -95,7 +95,7 @@ func (c *AdmiraltyController) GetAllTargets() {
|
||||
// @Success 200
|
||||
// @router /targets/:execution [get]
|
||||
func (c *AdmiraltyController) GetOneTarget() {
|
||||
id := c.Ctx.Input.Param(":id")
|
||||
id := c.Ctx.Input.Param(":execution")
|
||||
serv, err := infrastructure.NewService()
|
||||
if err != nil {
|
||||
// change code to 500
|
||||
@ -125,6 +125,8 @@ func (c *AdmiraltyController) GetOneTarget() {
|
||||
func (c *AdmiraltyController) CreateSource() {
|
||||
|
||||
execution := c.Ctx.Input.Param(":execution")
|
||||
fmt.Println("execution :: ", execution)
|
||||
fmt.Println("input :: ", c.Ctx.Input)
|
||||
serv, err := infrastructure.NewKubernetesService()
|
||||
if err != nil {
|
||||
// change code to 500
|
||||
|
@ -450,6 +450,9 @@ func postCDRapiKube(client kubernetes.Clientset, ctx context.Context, path strin
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
// Returns the Kubernetes' Node object corresponding to the executionID if it exists on this host
|
||||
//
|
||||
// The node is created when an admiralty Target (on host) can connect to an admiralty Source (on remote)
|
||||
func (k *KubernetesService) GetOneNode(context context.Context,executionID string) (*v1.Node, error) {
|
||||
res, err := k.Set.CoreV1().
|
||||
Nodes().
|
||||
|
Loading…
Reference in New Issue
Block a user