Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var InitCmd = &cobra.Command{ Use: "init", Short: "Install Keel platform on dapr.", PreRun: func(cmd *cobra.Command, args []string) { }, Example: ` # Initialize Keel in Kubernetes tkeel init # Initialize Keel in Kubernetes and wait for the installation to complete (default timeout is 300s/5m) tkeel init --wait --timeout 600 `, Run: func(cmd *cobra.Command, args []string) { print.PendingStatusEvent(os.Stdout, "Making the jump to hyperspace...") if kubernetesMode { config := kubernetes.InitConfiguration{ Namespace: initNamespace, Version: runtimeVersion, EnableMTLS: enableMTLS, EnableHA: enableHA, Args: values, Wait: wait, Timeout: timeout, DebugMode: debugMode, } err := kubernetes.Init(config) if err != nil { print.FailureStatusEvent(os.Stdout, err.Error()) os.Exit(1) } print.SuccessStatusEvent(os.Stdout, fmt.Sprintf("Success! TKeel Platform has been installed to namespace %s. To verify, run `tkeel status -k' in your terminal. To get started, go here: https://tkeel.io/keel-getting-started", config.Namespace)) } else { print.FailureStatusEvent(os.Stdout, fmt.Sprintf("Error! TKeel Platform should be in Kubernetes mode")) } }, }
View Source
var PluginCmd = &cobra.Command{ Use: "plugin", Short: "Manager plugins. Supported platforms: Kubernetes", Example: ` # Manager plugins. in Kubernetes mode tkeel plugin list -k tkeel plugin delete -k tkeel plugin register -k `, Run: func(cmd *cobra.Command, args []string) { if len(args) == 0 { cmd.Help() return } }, }
View Source
var PluginDeleteCmd = &cobra.Command{ Use: "delete", Short: "Register plugins. Supported platforms: Kubernetes", Example: ` # Manager plugins. in Kubernetes mode tkeel plugin list -k tkeel plugin delete -k pluginID tkeel plugin register -k pluginID `, Run: func(cmd *cobra.Command, args []string) { if len(args) == 0 { print.PendingStatusEvent(os.Stdout, "PluginId not fount ...\n # Manager plugins. in Kubernetes mode \n tkeel plugin delete -k pluginID") return } if kubernetesMode { pluginID := args[0] err := kubernetes.Delete(pluginID) if err != nil { print.FailureStatusEvent(os.Stdout, err.Error()) os.Exit(1) } print.SuccessStatusEvent(os.Stdout, fmt.Sprintf("Success! Plugin<%s> has been deleted from TKeel Platform . To verify, run `tkeel plugin list -k' in your terminal. ", pluginID)) } }, }
View Source
var PluginRegisterCmd = &cobra.Command{ Use: "register", Short: "Register plugins. Supported platforms: Kubernetes", Example: ` # Manager plugins. in Kubernetes mode tkeel plugin list -k tkeel plugin delete -k pluginID tkeel plugin register -k pluginID `, Run: func(cmd *cobra.Command, args []string) { if len(args) == 0 { print.PendingStatusEvent(os.Stdout, "PluginId not fount ...\n # Manager plugins. in Kubernetes mode \n tkeel plugin register -k pluginID") return } if kubernetesMode { pluginID := args[0] err := kubernetes.Register(pluginID) if err != nil { print.FailureStatusEvent(os.Stdout, err.Error()) os.Exit(1) } print.SuccessStatusEvent(os.Stdout, fmt.Sprintf("Success! Plugin<%s> has been Registered to TKeel Platform . To verify, run `tkeel plugin list -k' in your terminal. ", pluginID)) } }, }
View Source
var PluginStatusCmd = &cobra.Command{ Use: "list", Short: "Show the health status of TKeel plugins. Supported platforms: Kubernetes", Example: ` # Get status of TKeel plugins from Kubernetes tkeel plugin list -k tkeel plugin delete -k pluginID tkeel plugin register -k pluginID `, Run: func(cmd *cobra.Command, args []string) { sc, err := kubernetes.NewStatusClient() if err != nil { print.FailureStatusEvent(os.Stdout, err.Error()) os.Exit(1) } status, err := sc.Status() if err != nil { print.FailureStatusEvent(os.Stdout, err.Error()) os.Exit(1) } if len(status) == 0 { print.FailureStatusEvent(os.Stdout, "No status returned. Is TKeel initialized in your cluster?") os.Exit(1) } table, err := gocsv.MarshalString(status) if err != nil { print.FailureStatusEvent(os.Stdout, err.Error()) os.Exit(1) } utils.PrintTable(table) }, }
View Source
var RootCmd = &cobra.Command{
Use: "tkeel",
Short: "Keel CLI",
Long: `
__ __
/ /_____ ___ / /
/ //_/ _ \/ _ \/ /
/ ,< / __/ __/ /
/_/|_|\___/\___/_/
===============================
Things Keel Platform`,
}
View Source
var TenantCmd = &cobra.Command{ Use: "tenant", Short: "tenant of Auth plugins. Supported platforms: Kubernetes", Example: ` # Manager plugins. in Kubernetes mode tKeel tenant create -k tenantTitle tKeel tenant list -k `, Run: func(cmd *cobra.Command, args []string) { if len(args) == 0 { cmd.Help() return } }, }
View Source
var TenantCreateCmd = &cobra.Command{ Use: "create", Short: "create tenant . Supported platforms: Kubernetes", Example: ` # Manager plugins. in Kubernetes mode tKeel tenant create -k tenantTitle tKeel tenant list -k `, Run: func(cmd *cobra.Command, args []string) { if len(args) == 0 { print.PendingStatusEvent(os.Stdout, "tenantTitle not fount ...\n # auth plugins. in Kubernetes mode \n tkeel auth createtenant -k tenantTitle") return } if kubernetesMode { title := args[0] data, err := kubernetes.TenantCreate(title) if err != nil { print.FailureStatusEvent(os.Stdout, err.Error()) os.Exit(1) } dataSlice := []kubernetes.TenantCreateResp{*data} table, err := gocsv.MarshalString(dataSlice) if err != nil { print.FailureStatusEvent(os.Stdout, err.Error()) os.Exit(1) } utils.PrintTable(table) } }, }
View Source
var TenantListCmd = &cobra.Command{ Use: "list", Short: "list tenant . Supported platforms: Kubernetes", Example: ` # Manager plugins. in Kubernetes mode tKeel tenant create -k tenantTitle tKeel tenant list -k `, Run: func(cmd *cobra.Command, args []string) { if kubernetesMode { data, err := kubernetes.TenantList() if err != nil { print.FailureStatusEvent(os.Stdout, err.Error()) os.Exit(1) } table, err := gocsv.MarshalString(data.TenantList) if err != nil { print.FailureStatusEvent(os.Stdout, err.Error()) os.Exit(1) } utils.PrintTable(table) } }, }
View Source
var UninstallCmd = &cobra.Command{ Use: "uninstall", Short: "Uninstall tKeel Platform. Supported platforms: Kubernetes", Example: ` # Uninstall from self-hosted mode tkeel uninstall @TODO # Uninstall from self-hosted mode and remove .dapr directory, Redis, Placement and Zipkin containers dapr uninstall --all # Uninstall from Kubernetes dapr uninstall -k `, PreRun: func(cmd *cobra.Command, args []string) { }, Run: func(cmd *cobra.Command, args []string) { var err error if uninstallKubernetes { print.InfoStatusEvent(os.Stdout, "Removing tKeel Platform from your cluster...") err = kubernetes.Uninstall(uninstallNamespace, timeout, debugMode) } if err != nil { print.FailureStatusEvent(os.Stdout, fmt.Sprintf("Error removing TKeel: %s", err)) } else { print.SuccessStatusEvent(os.Stdout, "tKeel Platform has been removed successfully") } }, }
UninstallCmd is a command from removing a tKeel installation.
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.