github.com/youminxue/odin@v0.0.0-20230216022911-c2c8b05d3a41/cmd/shutdown.go (about)

     1  package cmd
     2  
     3  import (
     4  	"github.com/spf13/cobra"
     5  	"github.com/youminxue/odin/cmd/internal/svc"
     6  )
     7  
     8  // shutdownCmd shutdowns k8s service
     9  var shutdownCmd = &cobra.Command{
    10  	Use:   "shutdown",
    11  	Short: "wrap kubectl delete command to shutdown service",
    12  	Long:  ``,
    13  	Run: func(cmd *cobra.Command, args []string) {
    14  		s := svc.NewSvc("")
    15  		s.Shutdown(k8sfile)
    16  	},
    17  }
    18  
    19  func init() {
    20  	svcCmd.AddCommand(shutdownCmd)
    21  }