-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathhelmtrans_cmd.go
60 lines (45 loc) · 1.39 KB
/
helmtrans_cmd.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
package cmd
import (
"github.com/spf13/cobra"
helmtrans "helmtrans/src"
)
var filePath, outPutPath string
//init
func init() {
//migration data
helmtransYamltoHelmCmd.Flags().StringVarP(&filePath, "path", "p", "", "file path")
helmtransYamltoHelmCmd.Flags().StringVarP(&outPutPath, "outpath", "o", "output", "output file path")
rootCmd.AddCommand(helmtransYamltoHelmCmd)
helmtransHelmtoYamlCmd.Flags().StringVarP(&filePath, "path", "p", "", "file path")
// rootCmd.AddCommand(helmtransHelmtoYamlCmd)
helmtransCheckCmd.Flags().StringVarP(&filePath, "path", "p", "", "file path")
// rootCmd.AddCommand(helmtransCheckCmd)
}
//register deploy command
var helmtransYamltoHelmCmd = &cobra.Command{
Use: "yamltohelm",
Short: "Transform yaml to helm",
Long: `Transform yaml to helm`,
Run: func(cmd *cobra.Command, args []string) {
//TO-DO
helmtrans.YamltoHelm(filePath, outPutPath)
},
}
//register reset command
var helmtransHelmtoYamlCmd = &cobra.Command{
Use: "helmtoyaml",
Short: "Transform helm to yaml",
Long: `Transform helm to yaml`,
Run: func(cmd *cobra.Command, args []string) {
//TO-DO
},
}
//register analyse command
var helmtransCheckCmd = &cobra.Command{
Use: "check",
Short: "Check helm",
Long: `Check helm`,
Run: func(cmd *cobra.Command, args []string) {
//TO-DO
},
}