Documentation ¶
Index ¶
- Constants
- Variables
- type ApplyCmd
- type Client
- type ComponentListCmd
- type ComponentRmCmd
- type DeleteCmd
- type Diff
- type DiffCmd
- type DiffLocalCmd
- type DiffRemoteCmd
- type DiffRemotesCmd
- type EnvAddCmd
- type EnvListCmd
- type EnvRmCmd
- type EnvSetCmd
- type InitCmd
- type LocalEnv
- type ParamDiffCmd
- type ParamListCmd
- type ParamSetCmd
- type RegistryAddCmd
- type ShowCmd
- type ValidateCmd
Constants ¶
const ( // AnnotationGcTag annotation that triggers // garbage collection. Objects with value equal to // command-line flag that are *not* in config will be deleted. AnnotationGcTag = "kubecfg.ksonnet.io/garbage-collect-tag" // AnnotationGcStrategy controls gc logic. Current values: // `auto` (default if absent) - do garbage collection // `ignore` - never garbage collect this object AnnotationGcStrategy = "kubecfg.ksonnet.io/garbage-collect-strategy" // GcStrategyAuto is the default automatic gc logic GcStrategyAuto = "auto" // GcStrategyIgnore means this object should be ignored by garbage collection GcStrategyIgnore = "ignore" )
Variables ¶
var ErrDiffFound = fmt.Errorf("Differences found.")
Functions ¶
This section is empty.
Types ¶
type ApplyCmd ¶
type ApplyCmd struct { ClientConfig *client.Config Env string Create bool GcTag string SkipGc bool DryRun bool }
ApplyCmd represents the apply subcommand
func (ApplyCmd) Run ¶
func (c ApplyCmd) Run(apiObjects []*unstructured.Unstructured, wd string) error
Run applies the components to the designated environment cluster.
type Client ¶
type Client struct { ClientPool dynamic.ClientPool Discovery discovery.DiscoveryInterface Namespace string // Name of the remote client to identify changes against. This field is Optional. Name string // APIObjects are the Kubernetes objects being diffed against APIObjects []*unstructured.Unstructured }
Client holds the necessary information to connect with a remote Kubernetes cluster.
type ComponentListCmd ¶ added in v0.9.0
type ComponentListCmd struct { }
ComponentListCmd stores the information necessary to display components.
func NewComponentListCmd ¶ added in v0.9.0
func NewComponentListCmd() *ComponentListCmd
NewComponentListCmd acts as a constructor for ComponentListCmd.
type ComponentRmCmd ¶ added in v0.9.0
type ComponentRmCmd struct {
// contains filtered or unexported fields
}
ComponentRmCmd stores the information necessary to remove a component from the ksonnet application.
func NewComponentRmCmd ¶ added in v0.9.0
func NewComponentRmCmd(component string) *ComponentRmCmd
NewComponentRmCmd acts as a constructor for ComponentRmCmd.
func (*ComponentRmCmd) Run ¶ added in v0.9.0
func (c *ComponentRmCmd) Run() error
Run executes the removing of the component.
type DeleteCmd ¶
DeleteCmd represents the delete subcommand
func (DeleteCmd) Run ¶
func (c DeleteCmd) Run(apiObjects []*unstructured.Unstructured) error
type Diff ¶
type Diff struct {
DiffStrategy string
}
Diff is a base representation of the `diff` functionality.
type DiffCmd ¶
DiffCmd is an interface containing a set of functions that allow diffing between two sets of data containing Kubernetes resouces.
type DiffLocalCmd ¶
DiffLocalCmd extends DiffCmd and is meant to represent diffing between two sets of Kubernetes objects.
type DiffRemoteCmd ¶
DiffRemoteCmd extends DiffCmd and is meant to represent diffing between some set of Kubernetes objects and the Kubernetes objects located on a remote client.
type DiffRemotesCmd ¶
DiffRemotesCmd extends DiffCmd and is meant to represent diffing between the Kubernetes objects on two remote clients.
type EnvAddCmd ¶
type EnvAddCmd struct {
// contains filtered or unexported fields
}
func NewEnvAddCmd ¶
type EnvListCmd ¶
type EnvListCmd struct {
// contains filtered or unexported fields
}
func NewEnvListCmd ¶
func NewEnvListCmd(manager metadata.Manager) (*EnvListCmd, error)
type EnvSetCmd ¶
type EnvSetCmd struct {
// contains filtered or unexported fields
}
func NewEnvSetCmd ¶
type LocalEnv ¶
type LocalEnv struct { Name string APIObjects []*unstructured.Unstructured }
LocalEnv holds the local Kubernetes objects for an environment and relevant environment details, such as, environment name
type ParamDiffCmd ¶
type ParamDiffCmd struct {
// contains filtered or unexported fields
}
ParamDiffCmd stores the information necessary to diff between environment parameters.
func NewParamDiffCmd ¶
func NewParamDiffCmd(fs afero.Fs, root, env1, env2, componentName string) *ParamDiffCmd
NewParamDiffCmd acts as a constructor for ParamDiffCmd.
type ParamListCmd ¶
type ParamListCmd struct {
// contains filtered or unexported fields
}
ParamListCmd stores the information necessary display component or environment parameters
func NewParamListCmd ¶
func NewParamListCmd(component, env, nsName string) *ParamListCmd
NewParamListCmd acts as a constructor for ParamListCmd.
type ParamSetCmd ¶
type ParamSetCmd struct {
// contains filtered or unexported fields
}
ParamSetCmd stores the information necessary to set component and environment params.
func NewParamSetCmd ¶
func NewParamSetCmd(component, env, param, value string) *ParamSetCmd
NewParamSetCmd acts as a constructor for ParamSetCmd. It will also sanitize or "quote" the param value first if necessary.
type RegistryAddCmd ¶ added in v0.8.0
type RegistryAddCmd struct {
// contains filtered or unexported fields
}
RegistryAddCmd contains the metadata needed to create a registry.
func NewRegistryAddCmd ¶ added in v0.8.0
func NewRegistryAddCmd(name, protocol, uri, version string) *RegistryAddCmd
NewRegistryAddCmd initializes a RegistryAddCmd.
func (*RegistryAddCmd) Run ¶ added in v0.8.0
func (c *RegistryAddCmd) Run() error
Run adds the registry to the ksonnet project.
type ShowCmd ¶
type ShowCmd struct {
Format string
}
ShowCmd represents the show subcommand
func (ShowCmd) Run ¶
func (c ShowCmd) Run(apiObjects []*unstructured.Unstructured, out io.Writer) error
type ValidateCmd ¶
ValidateCmd represents the validate subcommand
func (ValidateCmd) Run ¶
func (c ValidateCmd) Run(apiObjects []*unstructured.Unstructured, out io.Writer) error