Skip to content

Commit

Permalink
fix: merge (#311)
Browse files Browse the repository at this point in the history
  • Loading branch information
CristhianF7 authored Mar 12, 2024
1 parent 7a8d689 commit 157340c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 16 deletions.
1 change: 1 addition & 0 deletions internal/controller/kbot.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ package controller

import (
"github.com/kubefirst/kubefirst-api/internal/secrets"
pkg "github.com/kubefirst/kubefirst-api/pkg/utils"
"github.com/kubefirst/metrics-client/pkg/telemetry"
log "github.com/rs/zerolog/log"
)
Expand Down
20 changes: 5 additions & 15 deletions internal/controller/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,25 +227,15 @@ func (clctrl *ClusterController) StateStoreCreate() error {
return err
}

err = clctrl.MdbCl.UpdateCluster(clctrl.ClusterName, "state_store_details", pkgtypes.StateStoreDetails{
clctrl.Cluster.StateStoreDetails = pkgtypes.StateStoreDetails{
Name: bucketAndCreds.StateStoreDetails.Name,
Hostname: bucketAndCreds.StateStoreDetails.Hostname,
})
if err != nil {
return err
}

err = clctrl.MdbCl.UpdateCluster(clctrl.ClusterName, "state_store_create_check", true)
if err != nil {
return err
}

err = clctrl.MdbCl.UpdateCluster(clctrl.ClusterName, "state_store_credentials", bucketAndCreds.StateStoreCredentials)
if err != nil {
return err
}
clctrl.Cluster.StateStoreCreateCheck = true
clctrl.Cluster.StateStoreCredentials = bucketAndCreds.StateStoreCredentials
clctrl.Cluster.StateStoreCredsCheck = true

err = clctrl.MdbCl.UpdateCluster(clctrl.ClusterName, "state_store_creds_check", true)
err = secrets.UpdateCluster(clctrl.KubernetesClient, clctrl.Cluster)
if err != nil {
return err
}
Expand Down
1 change: 0 additions & 1 deletion internal/router/api/v1/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
"context"
"fmt"
"net/http"
"os"
"strings"

"github.com/gin-gonic/gin"
Expand Down

0 comments on commit 157340c

Please sign in to comment.