Skip to content

Commit e248451

Browse files
committed
made changes to space-cli
1 parent 2593878 commit e248451

File tree

2 files changed

+12
-19
lines changed

2 files changed

+12
-19
lines changed

space-cli/cmd/modules/operations/commands.go

+8-14
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,7 @@ func Commands() []*cobra.Command {
8989
_ = utils.LogError("Unable to bind the flag ('cluster-name')", nil)
9090
}
9191
},
92-
RunE: actionSetup,
93-
SilenceErrors: true,
92+
RunE: actionSetup,
9493
}
9594

9695
setup.Flags().StringP("username", "", "", "The username used for login")
@@ -162,8 +161,7 @@ func Commands() []*cobra.Command {
162161
_ = utils.LogError("Unable to bind the flag ('version')", nil)
163162
}
164163
},
165-
SilenceErrors: true,
166-
RunE: actionUpgrade,
164+
RunE: actionUpgrade,
167165
}
168166
upgrade.Flags().StringP("cluster-name", "", "default", "The name of space-cloud cluster")
169167
upgrade.Flags().StringP("version", "", "default", "version to use for upgrade")
@@ -184,8 +182,7 @@ func Commands() []*cobra.Command {
184182
_ = utils.LogError("Unable to bind the flag ('cluster-name')", nil)
185183
}
186184
},
187-
SilenceErrors: true,
188-
RunE: actionDestroy,
185+
RunE: actionDestroy,
189186
}
190187
destroy.Flags().StringP("cluster-name", "", "default", "The name of space-cloud cluster")
191188
if err = viper.BindEnv("cluster-name", "CLUSTER_NAME"); err != nil {
@@ -197,10 +194,9 @@ func Commands() []*cobra.Command {
197194
}
198195

199196
var apply = &cobra.Command{
200-
Use: "apply",
201-
Short: "deploys service",
202-
RunE: actionApply,
203-
SilenceErrors: true,
197+
Use: "apply",
198+
Short: "Applies a config file or directory",
199+
RunE: actionApply,
204200
}
205201

206202
var start = &cobra.Command{
@@ -211,8 +207,7 @@ func Commands() []*cobra.Command {
211207
_ = utils.LogError("Unable to bind the flag ('cluster-name')", nil)
212208
}
213209
},
214-
SilenceErrors: true,
215-
RunE: actionStart,
210+
RunE: actionStart,
216211
}
217212
start.Flags().StringP("cluster-name", "", "default", "The name of space-cloud cluster")
218213
if err = viper.BindEnv("cluster-name", "CLUSTER_NAME"); err != nil {
@@ -231,8 +226,7 @@ func Commands() []*cobra.Command {
231226
_ = utils.LogError("Unable to bind the flag ('cluster-name')", nil)
232227
}
233228
},
234-
SilenceErrors: true,
235-
RunE: actionStop,
229+
RunE: actionStop,
236230
}
237231
stop.Flags().StringP("cluster-name", "", "default", "The name of space-cloud cluster")
238232
if err = viper.BindEnv("cluster-name", "CLUSTER_NAME"); err != nil {

space-cli/cmd/modules/operations/setup.go

+4-5
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@ func Setup(username, key, config, version, secret, clusterName string, dev bool,
133133
"DEV=" + devMode,
134134
"GOOGLE_APPLICATION_CREDENTIALS=/root/.gcp/credentials.json",
135135
"CLUSTER_ID=" + clusterID,
136-
"PORT=" + portHTTPValue,
137136
}
138137
var runnerEnvs = []string{
139138
"DEV=" + devMode,
@@ -193,12 +192,12 @@ func Setup(username, key, config, version, secret, clusterName string, dev bool,
193192
dnsName: "gateway.space-cloud.svc.cluster.local",
194193
envs: envs,
195194
exposedPorts: nat.PortSet{
196-
nat.Port(portHTTPValue): struct{}{},
197-
nat.Port(portHTTPSValue): struct{}{},
195+
"4122": struct{}{},
196+
"4126": struct{}{},
198197
},
199198
portMapping: nat.PortMap{
200-
nat.Port(portHTTPValue): []nat.PortBinding{{HostIP: "0.0.0.0", HostPort: portHTTPValue}},
201-
nat.Port(portHTTPSValue): []nat.PortBinding{{HostIP: "0.0.0.0", HostPort: portHTTPSValue}},
199+
"4122": []nat.PortBinding{{HostIP: "0.0.0.0", HostPort: portHTTPValue}},
200+
"4126": []nat.PortBinding{{HostIP: "0.0.0.0", HostPort: portHTTPSValue}},
202201
},
203202
mount: mounts,
204203
},

0 commit comments

Comments
 (0)