diff --git a/controllers/admiralty.go b/controllers/admiralty.go index c3acb21..7a9c65c 100644 --- a/controllers/admiralty.go +++ b/controllers/admiralty.go @@ -345,6 +345,8 @@ func (c *AdmiraltyController) GetNodeReady(){ return } + + resp, err := serv.GetKubeconfigSecret(c.Ctx.Request.Context(),execution) if err != nil { // change code to 500 @@ -359,7 +361,6 @@ func (c *AdmiraltyController) GetNodeReady(){ c.ServeJSON() return } - // Extract JWT token RS265 encoded var editedKubeconfig map[string]interface{} @@ -393,14 +394,15 @@ func (c *AdmiraltyController) GetNodeReady(){ } if *isExpired { - c.Data["json"] = map[string]string{ + c.Data["json"] = map[string]interface{}{ "token" : "token in the secret is expired and must be regenerated", + "node": node, } c.Ctx.Output.SetStatus(410) c.ServeJSON() } - c.Data["json"] = map[string]bool{"ok": true} + c.Data["json"] = map[string]interface{}{"node": node,"token": true} c.ServeJSON() }