Skip to content
This repository was archived by the owner on Dec 15, 2021. It is now read-only.

Commit cab7c64

Browse files
authored
Display function list command with namespace argument after deploy/update. (#1161)
1 parent 900832a commit cab7c64

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

cmd/kubeless/function/deploy.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,11 @@ var deployCmd = &cobra.Command{
100100
if err != nil {
101101
logrus.Fatal(err)
102102
}
103+
var nsArg string
103104
if ns == "" {
104105
ns = kubelessutil.GetDefaultNamespace()
106+
} else {
107+
nsArg = fmt.Sprintf(" -n %s", ns)
105108
}
106109

107110
deps, err := cmd.Flags().GetString("dependencies")
@@ -243,7 +246,7 @@ var deployCmd = &cobra.Command{
243246
logrus.Fatalf("Failed to deploy %s. Received:\n%s", funcName, err)
244247
}
245248
logrus.Infof("Function %s submitted for deployment", funcName)
246-
logrus.Infof("Check the deployment status executing 'kubeless function ls %s'", funcName)
249+
logrus.Infof("Check the deployment status executing 'kubeless function ls %s%s'", funcName, nsArg)
247250

248251
if schedule != "" {
249252
cronJobTrigger := cronjobApi.CronJobTrigger{}

cmd/kubeless/function/update.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,11 @@ var updateCmd = &cobra.Command{
5252
if err != nil {
5353
logrus.Fatal(err)
5454
}
55+
var nsArg string
5556
if ns == "" {
5657
ns = utils.GetDefaultNamespace()
58+
} else {
59+
nsArg = fmt.Sprintf(" -n %s", ns)
5760
}
5861

5962
handler, err := cmd.Flags().GetString("handler")
@@ -210,7 +213,7 @@ var updateCmd = &cobra.Command{
210213
logrus.Fatal(err)
211214
}
212215
logrus.Infof("Function %s submitted for deployment", funcName)
213-
logrus.Infof("Check the deployment status executing 'kubeless function ls %s'", funcName)
216+
logrus.Infof("Check the deployment status executing 'kubeless function ls %s%s'", funcName, nsArg)
214217
},
215218
}
216219

0 commit comments

Comments
 (0)