Documentation
¶
Index ¶
- Constants
- type BuildCmd
- type Cli
- type ContextArgs
- type ExternalDiffCmd
- type FileArgs
- type FmtCmd
- type GenerateCmd
- type GeneratedFile
- type KubeCfgArgs
- type KubeCmd
- type KubeDeployCmd
- type KubeDiffCmd
- type KubeListCmd
- type KubectlApplyCmd
- type KubectlCmd
- type KubectlDiffCmd
- type OutputFormat
- type PkgClearCmd
- type PkgCmd
- type PkgFetchDepsCmd
- type PkgInitCmd
- type PkgPushCmd
Constants ¶
View Source
const ManagedByStark = "app.kubernetes.io/managed-by=stark"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BuildCmd ¶
type BuildCmd struct { FileArgs ContextArgs Format OutputFormat `short:"f" help:"Output format (yaml,json)" default:"yaml"` Output string `short:"o" help:"Write output to a file instead of stdout" type:"path"` }
type Cli ¶
type Cli struct { Debug bool `short:"v" help:"Set log level to DEBUG for more information"` Trace bool `help:"Set log level to TRACE for even more information"` Build BuildCmd `cmd:"" help:"Build a stark config and output YAML"` Fmt FmtCmd `cmd:"" aliases:"format" help:"Format a stark config"` Gen GenerateCmd `cmd:"" aliases:"generate" help:"Generate files from stark configs"` Kube KubeCmd `cmd:"" aliases:"k" help:"Work with exported Stark bundles in Kubernetes"` Pkg PkgCmd `cmd:"" aliases:"p" help:"Work with packages and dependencies"` RawKubectl KubectlCmd `cmd:"" hidden:"" help:"Manage raw Kubernetes resources without Bundles"` ExternalDiff ExternalDiffCmd `cmd:"" hidden:""` }
type ContextArgs ¶
type ContextArgs struct { Version string `help:"Version of the image to apply, set in ctx['version']"` Context map[string]string `help:"Generic values passed to Starlark evaluation in ctx"` }
func (*ContextArgs) ToStarlark ¶
func (c *ContextArgs) ToStarlark() *starlark.Dict
type ExternalDiffCmd ¶
type ExternalDiffCmd struct { FromPath string `arg:""` ToPath string `arg:""` IgnoreOrderChanges bool `default:"true"` Kubernetes bool `default:"true"` Ignore []string `default:"metadata.managedFields.*"` Style string `default:"human"` }
func (*ExternalDiffCmd) Run ¶
func (cmd *ExternalDiffCmd) Run() error
type FileArgs ¶
type FileArgs struct {
Files []string `arg:"" help:"Path to stark config file" type:"existingfile"`
}
type GenerateCmd ¶
type GenerateCmd struct { FileArgs ContextArgs Out string `short:"o" help:"Override output base path, defaults to relative to input file"` }
type GeneratedFile ¶
type KubeCfgArgs ¶
type KubeCfgArgs struct { Kubectl string `help:"Path to kubectl CLI"` Kubeconfig string `help:"Path to kubernetes config (default: ~/.kube/config)"` DiffCmd string `help:"Command to use for external diff (default: pretty based on dyff)"` }
func (*KubeCfgArgs) ToCfg ¶
func (args *KubeCfgArgs) ToCfg() kube.KubeCfg
type KubeCmd ¶
type KubeCmd struct { List KubeListCmd `cmd:"" aliases:"ls" help:"List resources in a Kubernetes bundle"` Diff KubeDiffCmd `cmd:"" help:"Diff resources in Kubernetes bundle with resources in cluster"` Deploy KubeDeployCmd `cmd:"" aliases:"d" help:"Deploy resources in a Kubernetes bundle to the target cluster"` }
type KubeDeployCmd ¶
type KubeDeployCmd struct { KubeCfgArgs FileArgs ContextArgs Watch bool `short:"w" negatable:"" default:"false" help:"Watch code resources (Deployments) be applied"` DryRun bool `help:"Run a dry-run instead of applying resources"` NonInteractive bool `short:"y" help:"Don't prompt, assume yes and deploy"` // TODO: use pruning as the default, after kubectl diff --prune is fixed Delete bool `help:"Prune old resources which no longer exist in the bundle while deploying"` }
type KubeDiffCmd ¶
type KubeDiffCmd struct { KubeCfgArgs ContextArgs FileArgs }
type KubeListCmd ¶
type KubeListCmd struct { ContextArgs FileArgs }
type KubectlApplyCmd ¶
type KubectlApplyCmd struct { ContextArgs FileArgs DryRun bool `help:"Run a server dry-run instead of applying"` }
type KubectlCmd ¶
type KubectlCmd struct { Apply KubectlApplyCmd `cmd:"" aliases:"a" help:"Apply raw resources with kubectl apply"` Diff KubectlDiffCmd `cmd:"" help:"Diff raw resources with kubectl diff"` }
type KubectlDiffCmd ¶
type KubectlDiffCmd struct { ContextArgs FileArgs }
type OutputFormat ¶
type OutputFormat string
const ( Json OutputFormat = "json" Yaml OutputFormat = "yaml" )
type PkgClearCmd ¶
type PkgClearCmd struct{}
func (*PkgClearCmd) Run ¶
func (cmd *PkgClearCmd) Run() error
type PkgCmd ¶
type PkgCmd struct { Init PkgInitCmd `cmd:"" aliases:"new,n" help:"Generate a starkcfg.star for the current package"` Push PkgPushCmd `cmd:"" help:"Push package to a remote repository"` FetchDeps PkgFetchDepsCmd `cmd:"" aliases:"fetch,fd" help:"Download all dependencies of this package"` Clear PkgClearCmd `cmd:"" help:"Delete downloaded dependencies of this package"` }
type PkgFetchDepsCmd ¶
type PkgFetchDepsCmd struct{}
func (*PkgFetchDepsCmd) Run ¶
func (cmd *PkgFetchDepsCmd) Run() error
type PkgInitCmd ¶
type PkgInitCmd struct {
Package string `arg:"" help:"Name of the package to create"`
}
func (*PkgInitCmd) Run ¶
func (cmd *PkgInitCmd) Run() error
type PkgPushCmd ¶
type PkgPushCmd struct {
Destination string `arg:"" help:"Remote reference to push to"`
}
func (*PkgPushCmd) Run ¶
func (cmd *PkgPushCmd) Run() error
Click to show internal directories.
Click to hide internal directories.