Skip to content

Commit

Permalink
Merge installation disk and data disk page & change disk limit.
Browse files Browse the repository at this point in the history
Signed-off-by: masteryyh <yanhong.yang@suse.com>
(cherry picked from commit 60ad159)
  • Loading branch information
masteryyh authored and mergify[bot] committed Jul 17, 2023
1 parent 07ccc6e commit 9f96a51
Show file tree
Hide file tree
Showing 7 changed files with 263 additions and 343 deletions.
3 changes: 2 additions & 1 deletion pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ const (
)

const (
HardMinDiskSizeGiB = 250
SingleDiskMinSizeGiB = 250
MultipleDiskMinSizeGiB = 180
HardMinDataDiskSizeGiB = 50
MaxPods = 200
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/console/constant.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ const (
dnsServersNote = "Note: You can use comma to add more DNS servers. Leave blank to use default DNS."
bondNote = "Note: Select one or more NICs for the Management NIC.\nUse the default value for the Bond Mode if only one NIC is selected."
forceMBRNote = "Note: GPT is used by default. You can use MBR if you encountered compatibility issues."
persistentSizeNote = "Note: persistent partition stores data like system package and container images, not the VM data. \nYou can specify a size like 200Gi or 15360Mi. \nLeave it blank to use the default value."
persistentSizeNote = "Note: persistent partition stores data like system package and container images, not the VM data. \nYou can specify a size like 200Gi or 153600Mi. \nLeave it blank to use the default value."

authorizedFile = "/home/rancher/.ssh/authorized_keys"
)
16 changes: 2 additions & 14 deletions pkg/console/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,7 @@ func (p *passwordWrapper) passwordVEscapeKeyBinding(g *gocui.Gui, v *gocui.View)
p.passwordV.Close()
p.passwordConfirmV.Close()
if installModeOnly {
if canChoose, err := canChooseDataDisk(); err != nil {
return err
} else if canChoose {
return showDataDiskPage(p.c)
} else {
return showDiskPage(p.c)
}
return showDiskPage(p.c)
}
if err := p.c.setContentByName(notePanel, ""); err != nil {
return err
Expand Down Expand Up @@ -85,13 +79,7 @@ func (p *passwordWrapper) passwordConfirmVKeyEscape(g *gocui.Gui, v *gocui.View)
return err
}
if installModeOnly {
if canChoose, err := canChooseDataDisk(); err != nil {
return err
} else if canChoose {
return showDataDiskPage(p.c)
} else {
return showDiskPage(p.c)
}
return showDiskPage(p.c)
}
return showNext(p.c, tokenPanel)
}
Loading

0 comments on commit 9f96a51

Please sign in to comment.