deploy

package
v0.0.0-...-ff29d5a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CreateCmd = &cobra.Command{
	Use:   "create",
	Short: "Create deployments to client cluster",
	Run: func(cmd *cobra.Command, args []string) {
		log.Info("[*] Starting deployment")

		configPath, image, replicas, deploymentName := GetClusterParams(cmd, args)

		utils.CreateDeployment(configPath, deploymentName, image, replicas)

		os.Exit(0)
	},
}
View Source
var DeleteCmd = &cobra.Command{
	Use:   "delete",
	Short: "Delete application deployment from client clusters",
	Run: func(cmd *cobra.Command, args []string) {
		log.Info("[*] Deleting deployment")

		configPath, _, _, deploymentName := GetClusterParams(cmd, args)

		utils.DeleteDeployment(configPath, deploymentName)

		os.Exit(0)
	},
}
View Source
var UpdateCmd = &cobra.Command{
	Use:   "update",
	Short: "update deployments to client cluster",
	Run: func(cmd *cobra.Command, args []string) {
		log.Info("[*] Updating deployment")

		configPath, image, replicas, deploymentName := GetClusterParams(cmd, args)

		if image != "" {
			utils.UpdateImage(configPath, deploymentName, image)
		}

		if replicas != 0 {
			utils.UpdateReplicas(configPath, deploymentName, replicas)
		}

		os.Exit(0)
	},
}

Functions

func GetClusterParams

func GetClusterParams(cmd *cobra.Command, args []string) (string, string, int32, string)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL