Files
netmaker/cli/cmd/node/create_ingress.go
Vishal Dalwadi 9a7c13b8a6 NET-1962: add gateway subcommand. (#3339)
* feat(go): add deprecation warning.

* feat(go): add support for gateway commands.

* feat(go): mention the server version in which the commands were deprecated.
2025-02-24 08:50:10 +03:00

24 lines
784 B
Go

package node
import (
"github.com/gravitl/netmaker/cli/functions"
"github.com/spf13/cobra"
)
var nodeCreateIngressCmd = &cobra.Command{
Use: "create_remote_access_gateway [NETWORK NAME] [NODE ID]",
Args: cobra.ExactArgs(2),
Short: "Turn a Node into a Remote Access Gateway (Ingress)",
Long: `Turn a Node into a Remote Access Gateway (Ingress) for a Network.`,
Deprecated: "in favour of the `gateway` subcommand, in Netmaker v0.90.0.",
Aliases: []string{"create_rag"},
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)
}