Documentation ¶
Index ¶
Constants ¶
View Source
const ( // AnnotationGcTag annotation that triggers // garbage collection. Objects with value equal to // command-line flag that are *not* in config will be deleted. // // NB: this is in phase1 of a migration to use a label instead. // At this stage, both label+migration are written, but the // annotation (only) is still used to trigger GC. [gctag-migration] AnnotationGcTag = LabelGcTag // LabelGcTag label that triggers garbage collection. Objects // with value equal to command-line flag that are *not* in // config will be deleted. // // NB: this is in phase1 of a migration from an annotation. // At this stage, both label+migration are written, but the // annotation (only) is still used to trigger GC. [gctag-migration] LabelGcTag = "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 ¶
View Source
var DiffLineStart = regexp.MustCompile("(^|\n)(.)")
Matches all the line starts on a diff text, which is where we put diff markers and indent
View Source
var ErrDiffFound = fmt.Errorf("Differences found.")
Functions ¶
This section is empty.
Types ¶
type DeleteCmd ¶ added in v0.6.0
type DeleteCmd struct { ClientPool dynamic.ClientPool Discovery discovery.DiscoveryInterface DefaultNamespace string GracePeriod int64 }
DeleteCmd represents the delete subcommand
func (DeleteCmd) Run ¶ added in v0.6.0
func (c DeleteCmd) Run(apiObjects []*unstructured.Unstructured) error
type DiffCmd ¶ added in v0.6.0
type DiffCmd struct { ClientPool dynamic.ClientPool Discovery discovery.DiscoveryInterface DefaultNamespace string DiffStrategy string }
DiffCmd represents the diff subcommand
func (DiffCmd) Run ¶ added in v0.6.0
func (c DiffCmd) Run(apiObjects []*unstructured.Unstructured, out io.Writer) error
type ShowCmd ¶ added in v0.6.0
type ShowCmd struct {
Format string
}
ShowCmd represents the show subcommand
func (ShowCmd) Run ¶ added in v0.6.0
func (c ShowCmd) Run(apiObjects []*unstructured.Unstructured, out io.Writer) error
type UpdateCmd ¶
type UpdateCmd struct { ClientPool dynamic.ClientPool Discovery discovery.DiscoveryInterface DefaultNamespace string Create bool GcTag string SkipGc bool DryRun bool }
UpdateCmd represents the update subcommand
func (UpdateCmd) Run ¶
func (c UpdateCmd) Run(apiObjects []*unstructured.Unstructured) error
type ValidateCmd ¶ added in v0.6.0
type ValidateCmd struct { Discovery discovery.DiscoveryInterface IgnoreUnknown bool }
ValidateCmd represents the validate subcommand
func (ValidateCmd) Run ¶ added in v0.6.0
func (c ValidateCmd) Run(apiObjects []*unstructured.Unstructured, out io.Writer) error
Click to show internal directories.
Click to hide internal directories.