mirror of
https://github.com/kairos-io/kairos-agent.git
synced 2025-09-19 00:52:36 +00:00
🐛 Read upgrade/install values from config (#55)
We were ignoring the values in the /etc/elemental/config.yaml file that we loaded into viper by not reading those values and their keys into the final spec. This meant that for example the defautl entry name was being lost as we generated a new install spec from scratch and ignored those values that we read on the config Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
This commit is contained in:
@@ -3,6 +3,7 @@ package agent
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"github.com/sanity-io/litter"
|
||||
"github.com/sirupsen/logrus"
|
||||
"os"
|
||||
"sync"
|
||||
@@ -89,6 +90,7 @@ func Reset(debug bool, dir ...string) error {
|
||||
if debug {
|
||||
resetConfig.Logger.SetLevel(logrus.DebugLevel)
|
||||
}
|
||||
resetConfig.Logger.Debugf("Full config: %s\n", litter.Sdump(resetConfig))
|
||||
resetSpec, err := elementalConfig.ReadResetSpec(resetConfig)
|
||||
if err != nil {
|
||||
return err
|
||||
|
Reference in New Issue
Block a user