add node management

This commit is contained in:
Anish Mukherjee
2022-11-22 18:57:17 +05:30
parent 6a403d1974
commit d9c9d29d33
15 changed files with 469 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
package node
import (
"github.com/gravitl/netmaker/cli/functions"
"github.com/spf13/cobra"
)
var failover bool
var nodeCreateIngressCmd = &cobra.Command{
Use: "create_ingress [NETWORK NAME] [NODE ID]",
Args: cobra.ExactArgs(2),
Short: "Turn a Node into a Ingress",
Long: `Turn a Node into a Ingress`,
Run: func(cmd *cobra.Command, args []string) {
functions.PrettyPrint(functions.CreateIngress(args[0], args[1], failover))
},
}
func init() {
nodeCreateIngressCmd.Flags().BoolVar(&failover, "failover", false, "Enable FailOver ?")
rootCmd.AddCommand(nodeCreateIngressCmd)
}