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

Commit

Permalink
Display function list command with namespace argument after deploy/up…
Browse files Browse the repository at this point in the history
…date. (#1161)
  • Loading branch information
varunbpatil authored Aug 24, 2020
1 parent 900832a commit cab7c64
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion cmd/kubeless/function/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,11 @@ var deployCmd = &cobra.Command{
if err != nil {
logrus.Fatal(err)
}
var nsArg string
if ns == "" {
ns = kubelessutil.GetDefaultNamespace()
} else {
nsArg = fmt.Sprintf(" -n %s", ns)
}

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

if schedule != "" {
cronJobTrigger := cronjobApi.CronJobTrigger{}
Expand Down
5 changes: 4 additions & 1 deletion cmd/kubeless/function/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,11 @@ var updateCmd = &cobra.Command{
if err != nil {
logrus.Fatal(err)
}
var nsArg string
if ns == "" {
ns = utils.GetDefaultNamespace()
} else {
nsArg = fmt.Sprintf(" -n %s", ns)
}

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

Expand Down

0 comments on commit cab7c64

Please sign in to comment.