github.com/unionj-cloud/go-doudou@v1.3.8-0.20221011095552-0088008e5b31/cmd/svc.go (about)

     1  package cmd
     2  
     3  import (
     4  	"github.com/spf13/cobra"
     5  )
     6  
     7  var k8sfile string
     8  var imageRepo string
     9  
    10  // svcCmd is the base command for generation or update
    11  var svcCmd = &cobra.Command{
    12  	Use:   "svc",
    13  	Short: "generate or update service",
    14  	Long:  ``,
    15  	Run: func(cmd *cobra.Command, args []string) {
    16  	},
    17  }
    18  
    19  func init() {
    20  	rootCmd.AddCommand(svcCmd)
    21  	
    22  	deployCmd.Flags().StringVarP(&k8sfile, "k8sfile", "k", "", `k8s yaml file for deploying service`)
    23  	shutdownCmd.Flags().StringVarP(&k8sfile, "k8sfile", "k", "", `k8s yaml file for deploying service`)
    24  	pushCmd.Flags().StringVarP(&imageRepo, "repo", "r", "", `your private docker image repository`)
    25  }