mirror of
https://github.com/kairos-io/kairos-agent.git
synced 2025-09-16 22:50:47 +00:00
art: Refactor out config sections
Now there is a `install` section in the config that has the fields that previously where in `c3os` but were actually only used during install phase. Also the k3s and c3os config were moved to the provider instead that in the global config.
This commit is contained in:
committed by
Itxaka
parent
5bb5ff9253
commit
1a03c96235
@@ -12,6 +12,7 @@ import (
|
||||
"github.com/c3os-io/c3os/internal/bus"
|
||||
cmd "github.com/c3os-io/c3os/internal/cmd"
|
||||
machine "github.com/c3os-io/c3os/internal/machine"
|
||||
providerConfig "github.com/c3os-io/c3os/internal/provider/config"
|
||||
|
||||
"github.com/c3os-io/c3os/internal/github"
|
||||
config "github.com/c3os-io/c3os/pkg/config"
|
||||
@@ -198,7 +199,14 @@ $ c3os rotate --network-token XXX
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
fmt.Print(cc.C3OS.NetworkToken)
|
||||
|
||||
providerCfg := &providerConfig.Config{}
|
||||
err = cc.Unmarshal(providerCfg)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
fmt.Print(providerCfg.C3OS.NetworkToken)
|
||||
return nil
|
||||
},
|
||||
},
|
||||
|
Reference in New Issue
Block a user