* fix issue #831

* fix typo

Co-authored-by: anqiansong <anqiansong@xiaoheiban.cn>
This commit is contained in:
anqiansong
2021-07-28 16:32:15 +08:00
committed by GitHub
parent cb7b7cb72e
commit 9f4a882a1b
9 changed files with 152 additions and 6 deletions

View File

@@ -40,6 +40,12 @@ type Deployment struct {
// DeploymentCommand is used to generate the kubernetes deployment yaml files.
func DeploymentCommand(c *cli.Context) error {
nodePort := c.Int("nodePort")
home := c.String("home")
if len(home) > 0 {
util.RegisterGoctlHome(home)
}
// 0 to disable the nodePort type
if nodePort != 0 && (nodePort < basePort || nodePort > portLimit) {
return errors.New("nodePort should be between 30000 and 32767")