Documentation ¶
Index ¶
- Variables
- func AddFlags(fs *pflag.FlagSet, cmdName string)
- func FlagToEnvVarName(f *pflag.Flag) string
- func NewCmdBuild() *cobra.Command
- func NewCmdCompletion() *cobra.Command
- func NewCmdConfig() *cobra.Command
- func NewCmdCredits() *cobra.Command
- func NewCmdDebug() *cobra.Command
- func NewCmdDelete() *cobra.Command
- func NewCmdDeploy() *cobra.Command
- func NewCmdDev() *cobra.Command
- func NewCmdDiagnose() *cobra.Command
- func NewCmdFindConfigs() *cobra.Command
- func NewCmdFix() *cobra.Command
- func NewCmdGeneratePipeline() *cobra.Command
- func NewCmdInit() *cobra.Command
- func NewCmdList() *cobra.Command
- func NewCmdOptions() *cobra.Command
- func NewCmdRender() *cobra.Command
- func NewCmdRun() *cobra.Command
- func NewCmdSchema() *cobra.Command
- func NewCmdSchemaGet() *cobra.Command
- func NewCmdSchemaList() *cobra.Command
- func NewCmdSet() *cobra.Command
- func NewCmdUnset() *cobra.Command
- func NewCmdVersion() *cobra.Command
- func NewSkaffoldCommand(out, err io.Writer) *cobra.Command
- func SetupFlags()
- type Builder
- type Flag
Constants ¶
This section is empty.
Variables ¶
var FlagRegistry = []Flag{ { Name: "filename", Shorthand: "f", Usage: "Filename or URL to the pipeline file", Value: &opts.ConfigurationFile, DefValue: "skaffold.yaml", FlagAddMethod: "StringVar", DefinedOn: []string{"all"}, }, { Name: "profile", Shorthand: "p", Usage: "Activate profiles by name", Value: &opts.Profiles, DefValue: []string{}, FlagAddMethod: "StringSliceVar", DefinedOn: []string{"all"}, }, { Name: "namespace", Shorthand: "n", Usage: "Run deployments in the specified namespace", Value: &opts.Namespace, DefValue: "", FlagAddMethod: "StringVar", DefinedOn: []string{"all"}, }, { Name: "default-repo", Shorthand: "d", Usage: "Default repository value (overrides global config)", Value: &opts.DefaultRepo, DefValue: "", FlagAddMethod: "StringVar", DefinedOn: []string{"all"}, }, { Name: "cache-artifacts", Usage: "Set to false to disable default caching of artifacts", Value: &opts.CacheArtifacts, DefValue: true, FlagAddMethod: "BoolVar", DefinedOn: []string{"dev", "build", "run", "debug"}, }, { Name: "cache-file", Usage: "Specify the location of the cache file (default $HOME/.skaffold/cache)", Value: &opts.CacheFile, DefValue: "", FlagAddMethod: "StringVar", DefinedOn: []string{"dev", "build", "run", "debug"}, }, { Name: "insecure-registry", Usage: "Target registries for built images which are not secure", Value: &opts.InsecureRegistries, DefValue: []string{}, FlagAddMethod: "StringSliceVar", DefinedOn: []string{"dev", "build", "run", "debug"}, }, { Name: "enable-rpc", Usage: "Enable gRPC for exposing Skaffold events (true by default for `skaffold dev`)", Value: &opts.EnableRPC, DefValue: false, FlagAddMethod: "BoolVar", DefinedOn: []string{"dev", "build", "run", "debug", "deploy"}, }, { Name: "rpc-port", Usage: "tcp port to expose event API", Value: &opts.RPCPort, DefValue: constants.DefaultRPCPort, FlagAddMethod: "IntVar", DefinedOn: []string{"dev", "build", "run", "debug", "deploy"}, }, { Name: "rpc-http-port", Usage: "tcp port to expose event REST API over HTTP", Value: &opts.RPCHTTPPort, DefValue: constants.DefaultRPCHTTPPort, FlagAddMethod: "IntVar", DefinedOn: []string{"dev", "build", "run", "debug", "deploy"}, }, { Name: "label", Shorthand: "l", Usage: "Add custom labels to deployed objects. Set multiple times for multiple labels", Value: &opts.CustomLabels, DefValue: []string{}, FlagAddMethod: "StringSliceVar", DefinedOn: []string{"dev", "run", "debug", "deploy", "render"}, }, { Name: "toot", Usage: "Emit a terminal beep after the deploy is complete", Value: &opts.Notification, DefValue: false, FlagAddMethod: "BoolVar", DefinedOn: []string{"dev", "build", "run", "debug", "deploy"}, }, { Name: "tail", Usage: "Stream logs from deployed objects (default false)", Value: &opts.Tail, DefValue: false, FlagAddMethod: "BoolVar", DefinedOn: []string{"deploy", "run"}, }, { Name: "tail", Usage: "Stream logs from deployed objects", Value: &opts.TailDev, DefValue: true, FlagAddMethod: "BoolVar", DefinedOn: []string{"dev", "debug"}, }, { Name: "force", Usage: "Recreate Kubernetes resources if necessary for deployment, warning: might cause downtime! (true by default for `skaffold dev`)", Value: &opts.Force, DefValue: false, FlagAddMethod: "BoolVar", DefinedOn: []string{"deploy", "dev", "run", "debug"}, }, { Name: "skip-tests", Usage: "Whether to skip the tests after building", Value: &opts.SkipTests, DefValue: false, FlagAddMethod: "BoolVar", DefinedOn: []string{"dev", "run", "debug", "build"}, }, { Name: "cleanup", Usage: "Delete deployments after dev or debug mode is interrupted", Value: &opts.Cleanup, DefValue: true, FlagAddMethod: "BoolVar", DefinedOn: []string{"dev", "run", "debug"}, }, { Name: "no-prune", Usage: "Skip removing images and containers built by Skaffold", Value: &opts.NoPrune, DefValue: false, FlagAddMethod: "BoolVar", DefinedOn: []string{"dev", "run", "debug"}, }, { Name: "no-prune-children", Usage: "Skip removing layers reused by Skaffold", Value: &opts.NoPruneChildren, DefValue: false, FlagAddMethod: "BoolVar", DefinedOn: []string{"dev", "run", "debug"}, }, { Name: "port-forward", Usage: "Port-forward exposed container ports within pods", Value: &opts.PortForward.Enabled, DefValue: false, FlagAddMethod: "BoolVar", DefinedOn: []string{"dev", "debug", "deploy", "run"}, }, { Name: "status-check", Usage: "Wait for deployed resources to stabilize", Value: &opts.StatusCheck, DefValue: false, FlagAddMethod: "BoolVar", DefinedOn: []string{"dev", "debug", "deploy", "run"}, }, { Name: "render-only", Usage: "Print rendered Kubernetes manifests instead of deploying them", Value: &opts.RenderOnly, DefValue: false, FlagAddMethod: "BoolVar", DefinedOn: []string{"dev", "run"}, }, { Name: "config", Shorthand: "c", Usage: "File for global configurations (defaults to $HOME/.skaffold/config)", Value: &opts.GlobalConfig, DefValue: "", FlagAddMethod: "StringVar", DefinedOn: []string{"run", "dev", "debug", "build", "deploy", "delete", "diagnose"}, }, { Name: "kube-context", Usage: "Deploy to this Kubernetes context", Value: &opts.KubeContext, DefValue: "", FlagAddMethod: "StringVar", DefinedOn: []string{"build", "debug", "delete", "deploy", "dev", "run"}, }, { Name: "kubeconfig", Usage: "Path to the kubeconfig file to use for CLI requests.", Value: &opts.KubeConfig, DefValue: "", FlagAddMethod: "StringVar", DefinedOn: []string{"build", "debug", "delete", "deploy", "dev", "run"}, }, { Name: "tag", Shorthand: "t", Usage: "The optional custom tag to use for images which overrides the current Tagger configuration", Value: &opts.CustomTag, DefValue: "", FlagAddMethod: "StringVar", DefinedOn: []string{"build", "debug", "dev", "run"}, }, }
FlagRegistry is a list of all Skaffold CLI flags. When adding a new flag to the registry, please specify the command/commands to which the flag belongs in `DefinedOn` field. If the flag is a global flag, or belongs to all the subcommands, / specify "all" FlagAddMethod is method which defines a flag value with specified name, default value, and usage string. e.g. `StringVar`, `BoolVar`
Functions ¶
func FlagToEnvVarName ¶ added in v0.20.0
func NewCmdBuild ¶ added in v0.6.0
NewCmdBuild describes the CLI command to build artifacts.
func NewCmdCompletion ¶ added in v0.4.0
NewCmdCompletion returns the cobra command that outputs shell completion code
func NewCmdConfig ¶ added in v0.13.0
func NewCmdCredits ¶ added in v1.0.0
func NewCmdDebug ¶ added in v0.26.0
NewCmdDebug describes the CLI command to run a pipeline in debug mode.
func NewCmdDelete ¶ added in v0.7.0
NewCmdDelete describes the CLI command to delete deployed resources.
func NewCmdDeploy ¶ added in v0.7.0
NewCmdDeploy describes the CLI command to deploy artifacts.
func NewCmdDiagnose ¶ added in v0.16.0
NewCmdDiagnose describes the CLI command to diagnose skaffold.
func NewCmdFindConfigs ¶ added in v0.32.0
NewCmdFindConfigs list the skaffold config files in the specified directory.
func NewCmdGeneratePipeline ¶ added in v0.36.0
func NewCmdInit ¶ added in v0.14.0
NewCmdInit describes the CLI command to generate a Skaffold configuration.
func NewCmdList ¶ added in v0.31.0
func NewCmdOptions ¶ added in v0.34.0
func NewCmdRender ¶ added in v0.39.0
NewCmdRender describes the CLI command to build artifacts render Kubernetes manifests.
func NewCmdSchema ¶ added in v1.1.0
func NewCmdSchemaGet ¶ added in v1.1.0
func NewCmdSchemaList ¶ added in v1.1.0
func NewCmdUnset ¶ added in v0.31.0
func NewCmdVersion ¶
func SetupFlags ¶ added in v0.37.1
func SetupFlags()
SetupFlags creates pflag.Flag for all registered flags
Types ¶
type Builder ¶ added in v0.31.0
type Builder interface { WithDescription(description string) Builder WithLongDescription(long string) Builder WithExample(comment, command string) Builder WithFlags(adder func(*pflag.FlagSet)) Builder WithCommonFlags() Builder Hidden() Builder ExactArgs(argCount int, action func(io.Writer, []string) error) *cobra.Command NoArgs(action func(io.Writer) error) *cobra.Command }
Builder is used to build cobra commands.