Merge branch 'main' of https://cloud.o-forge.io/core/oc-datacenter into feature/admiralty

This commit is contained in:
pb
2025-04-04 18:03:18 +02:00
11 changed files with 241 additions and 37 deletions

View File

@@ -486,7 +486,7 @@ func (c *AdmiraltyController) GetAdmiraltyKubeconfig() {
return
}
b, err := yaml.Marshal(kubeconfig)
b, err := json.Marshal(kubeconfig)
if err != nil {
fmt.Println("Error while marshalling kubeconfig")
c.Ctx.Output.SetStatus(500)
@@ -519,7 +519,7 @@ func NewHostKubeWithToken(token string) (*models.KubeConfigValue, error){
{
Name: "default",
Cluster: models.KubeconfigCluster{
Server: conf.GetConfig().KubeHost,
Server: "https://" + conf.GetConfig().KubeHost + ":6443",
CertificateAuthorityData: encodedCA,
},
},

View File

@@ -15,7 +15,10 @@ type VersionController struct {
// @Success 200
// @router / [get]
func (c *VersionController) GetAll() {
c.Data["json"] = map[string]string{"version": "1"}
c.Data["json"] = map[string]string{
"service": "oc-datacenter",
"version": "1",
}
c.ServeJSON()
}