mirror of https://github.com/kubernetes/kops.git
Remove unused FSRoot from NodeUp
This commit is contained in:
parent
ec8bb515c9
commit
d70fb506e5
|
@ -101,7 +101,6 @@ func main() {
|
|||
i := bootstrap.Installation{
|
||||
CacheDir: flagCacheDir,
|
||||
Command: command,
|
||||
FSRoot: flagRootFS,
|
||||
}
|
||||
i.RunTasksOptions.InitDefaults()
|
||||
i.RunTasksOptions.MaxTaskDuration = 5 * time.Minute
|
||||
|
@ -115,7 +114,6 @@ func main() {
|
|||
ConfigLocation: flagConf,
|
||||
Target: target,
|
||||
CacheDir: flagCacheDir,
|
||||
FSRoot: flagRootFS,
|
||||
}
|
||||
err = cmd.Run(os.Stdout)
|
||||
if err == nil {
|
||||
|
|
|
@ -32,14 +32,13 @@ import (
|
|||
)
|
||||
|
||||
type Installation struct {
|
||||
FSRoot string
|
||||
CacheDir string
|
||||
RunTasksOptions fi.RunTasksOptions
|
||||
Command []string
|
||||
}
|
||||
|
||||
func (i *Installation) Run() error {
|
||||
_, err := distros.FindDistribution(i.FSRoot)
|
||||
_, err := distros.FindDistribution("/")
|
||||
if err != nil {
|
||||
return fmt.Errorf("error determining OS distribution: %v", err)
|
||||
}
|
||||
|
|
|
@ -56,7 +56,6 @@ const MaxTaskDuration = 365 * 24 * time.Hour
|
|||
type NodeUpCommand struct {
|
||||
CacheDir string
|
||||
ConfigLocation string
|
||||
FSRoot string
|
||||
Target string
|
||||
cluster *api.Cluster
|
||||
config *nodeup.Config
|
||||
|
@ -65,10 +64,6 @@ type NodeUpCommand struct {
|
|||
|
||||
// Run is responsible for perform the nodeup process
|
||||
func (c *NodeUpCommand) Run(out io.Writer) error {
|
||||
if c.FSRoot == "" {
|
||||
return fmt.Errorf("FSRoot is required")
|
||||
}
|
||||
|
||||
if c.ConfigLocation != "" {
|
||||
config, err := vfs.Context.ReadFile(c.ConfigLocation)
|
||||
if err != nil {
|
||||
|
@ -162,7 +157,7 @@ func (c *NodeUpCommand) Run(out io.Writer) error {
|
|||
return fmt.Errorf("error determining OS architecture: %v", err)
|
||||
}
|
||||
|
||||
distribution, err := distros.FindDistribution(c.FSRoot)
|
||||
distribution, err := distros.FindDistribution("/")
|
||||
if err != nil {
|
||||
return fmt.Errorf("error determining OS distribution: %v", err)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue