Documentation
¶
Index ¶
- Constants
- Variables
- type ApplyCmd
- type Client
- 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 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 {
ClientPool dynamic.ClientPool
Discovery discovery.DiscoveryInterface
Namespace 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 metadata.AbsPath) error
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 DeleteCmd ¶
type DeleteCmd struct {
ClientPool dynamic.ClientPool
Discovery discovery.DiscoveryInterface
Namespace string
GracePeriod int64
}
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(env1, env2, component 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 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 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 ¶
type ValidateCmd struct {
Discovery discovery.DiscoveryInterface
}
ValidateCmd represents the validate subcommand
func (ValidateCmd) Run ¶
func (c ValidateCmd) Run(apiObjects []*unstructured.Unstructured, out io.Writer) error