VILLASframework / web-backend

A go implementation of the backend for VILLASweb
https://fein-aachen.org/en/projects/villas-web/
GNU General Public License v3.0
1 stars 2 forks source link

Settings k8s-cluster and rancher-url should be taken from Kubernetes manager status update #77

Closed stv0g closed 1 year ago

stv0g commented 3 years ago

It does not make sense to provide this as backend settings.

In principle the Kubernetes manger has this information first hand and we might have multiple Kubernetes managers in different clusters.

/cc @skolen /cc @iripiri

stv0g commented 3 years ago

mentioned in commit web@f9ed2af4ca00f56f950290b59cbbe0d9a82adbdd

stv0g commented 3 years ago

mentioned in merge request web!96

stv0g commented 3 years ago

@iripiri @skolen Can you have a look at https://git.rwth-aachen.de/acs/public/villas/web/-/merge_requests/96 ?

I dont exactly know how I can access the statusupdateraw field of the manager IC from the state of the simulator IC which is managed by it.

The idea would be that we take the fields rancher-url and cluster-name from the manager's statusupdateraw in order to generate the links. If those fields are not available in the status update, we can fall back to those provided via the /api/v2/config endpoint.

stv0g commented 3 years ago

In GitLab by @iripiri on Oct 20, 2021, 10:53

Hi @stvogel, the KubernetesICPage gets all ICs as props, so the (not tested) code would be something like:

let managerIC = this.props.ics.find(ic => ic.uuid === this.props.ic.manager)
let update = JSON.parse(managerIC.statusupdateraw)
let rancherurl = update["status"]["rancher-url"]
stv0g commented 3 years ago

Thanks @iripiri,

I will try this :)

Just wondering: should we send the statusupdateraw and JSON from the API?

stv0g commented 3 years ago

This issue is now resolved in the backend. I will move it to the frontend

stv0g commented 3 years ago

moved to web#343

stv0g commented 3 years ago

mentioned in commit web@f0b21d777404ef2c75eddc768b37898b983e257c