cmd

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2017 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ConvertSource                string
	ConvertOut                   string
	ConvertBuildRepo             string
	ConvertBuildBranch           string
	ConvertChart                 bool
	ConvertDeployment            bool
	ConvertDaemonSet             bool
	ConvertReplicationController bool
	ConvertYaml                  bool
	ConvertJSON                  bool
	ConvertStdout                bool
	ConvertEmptyVols             bool
	ConvertDeploymentConfig      bool
	ConvertBuildConfig           bool
	ConvertReplicas              int
	ConvertOpt                   kobject.ConvertOptions
)

TODO: comment

View Source
var (
	DownReplicas  int
	DownEmptyVols bool
	DownOpt       kobject.ConvertOptions
)

TODO: comment

View Source
var (
	GlobalBundle           string
	GlobalProvider         string
	GlobalVerbose          bool
	GlobalSuppressWarnings bool
	GlobalErrorOnWarning   bool
	GlobalFiles            []string
)

TODO: comment

View Source
var (
	UpReplicas  int
	UpEmptyVols bool
	UpOpt       kobject.ConvertOptions
)

TODO: comment

View Source
var (
	// VERSION  is version number that wil be displayed when running ./kompose version
	VERSION = "0.3.0"
	// GITCOMMIT is hash of the commit that wil be displayed when running ./kompose version
	// this will be overwritten when running  build like this: go build -ldflags="-X github.com/kubernetes-incubator/kompose/cmd.GITCOMMIT=$(GITCOMMIT)"
	// HEAD is default indicating that this was not set during build
	GITCOMMIT = "HEAD"
)
View Source
var ConvertProvider = GlobalProvider

ConvertProvider TODO: comment

View Source
var RootCmd = &cobra.Command{
	Use:   "kompose",
	Short: "A tool helping Docker Compose users move to Kubernetes",
	Long:  `Kompose is a tool to help users who are familiar with docker-compose move to Kubernetes.`,

	PersistentPreRun: func(cmd *cobra.Command, args []string) {

		if GlobalVerbose {
			logrus.SetLevel(logrus.DebugLevel)
		}

		formatter := new(logrus.TextFormatter)
		formatter.DisableTimestamp = true
		formatter.ForceColors = true
		logrus.SetFormatter(formatter)

		if GlobalSuppressWarnings {
			logrus.SetLevel(logrus.ErrorLevel)
		} else if GlobalErrorOnWarning {
			hook := errorOnWarningHook{}
			logrus.AddHook(hook)
		}

		provider := strings.ToLower(GlobalProvider)
		if provider != "kubernetes" && provider != "openshift" {
			logrus.Fatalf("%s is an unsupported provider. Supported providers are: 'kubernetes', 'openshift'.", GlobalProvider)
		}

	},
}

RootCmd root level flags and commands

Functions

func Execute

func Execute()

Execute TODO: comment

func Generate

func Generate(cmd *cobra.Command, args []string) error

Generate the the approriate autocompletion file

Types

This section is empty.

Jump to

Keyboard shortcuts

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