Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultCRName = "example-seataserver" DefaultServerImage = "apache/seata-server:latest" DefaultNamespace = "default" DefaultDeployName = "seata-k8s-controller-manager" DefaultControllerImage = "apache/seata-controller:latest" DefaultReplicas = 1 Label = "cr_name" CreateCrdPath = "/apis/apiextensions.k8s.io/v1/customresourcedefinitions" FilePath = "seata.yaml" CRDname = "seataservers.operator.seata.apache.org" ServiceName = "seata-server-cluster" RequestStorage = "1Gi" LimitStorage = "1Gi" )
Variables ¶
View Source
var ( Name string Replicas int32 Namespace string Image string ControllerImage string DeployName string )
View Source
var DeployCmd = &cobra.Command{ Use: "deploy", Short: "deploy seata in k8s", Run: func(cmd *cobra.Command, args []string) { err := deploy() if err != nil { tool.Logger.Errorf("deploy err:%v", err) } }, }
View Source
var InstallCmd = &cobra.Command{ Use: "install", Short: "Install Kubernetes CRD controller", Run: func(cmd *cobra.Command, args []string) { err := DeployCRD() if err != nil { tool.Logger.Errorf("install CRD err: %v", err) } err = DeployController() if err != nil { tool.Logger.Errorf("install Controller err: %v", err) } }, }
View Source
var ScaleCmd = &cobra.Command{ Use: "scale", Short: "scale seata in k8s", Run: func(cmd *cobra.Command, args []string) { err := scale() if err != nil { tool.Logger.Errorf("scale err:%v", err) } }, }
View Source
var StatusCmd = &cobra.Command{ Use: "status", Short: "show seata status in k8s", Run: func(cmd *cobra.Command, args []string) { err := status() if err != nil { tool.Logger.Errorf("get k8s status error: %v", err) } }, }
View Source
var UnDeployCmd = &cobra.Command{ Use: "undeploy", Short: "undeploy seata in k8s", Run: func(cmd *cobra.Command, args []string) { err := undeploy() if err != nil { tool.Logger.Errorf("undeploy error: %v", err) } }, }
View Source
var UnInstallCmd = &cobra.Command{ Use: "uninstall", Short: "uninstall seata in k8s", Run: func(cmd *cobra.Command, args []string) { err := UninstallCRD() if err != nil { tool.Logger.Errorf("uninstall CRD err:%v", err) } err = UnDeploymentController() if err != nil { tool.Logger.Errorf("uninstall Deployment err:%v", err) } }, }
Functions ¶
func DeployController ¶
func DeployController() error
DeployController deploys the controller for the custom resource.
func UnDeploymentController ¶
func UnDeploymentController() error
func UninstallCRD ¶
func UninstallCRD() error
Types ¶
This section is empty.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.