Documentation
¶
Overview ¶
Package kapply provides a pure-Go equivalent of `kubectl apply -k <dir>`, building a Kustomize stack and applying it via Server-Side Apply (SSA).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Clients ¶
type Clients struct {
Dynamic dynamic.Interface
Discovery discovery.DiscoveryInterface
Mapper meta.RESTMapper
}
Clients bundles the cluster interfaces this package needs.
type Option ¶
type Option func(*Options)
Option is a functional option for ApplyDir.
func WithDefaultNamespace ¶
func WithDryRun ¶
func WithDryRun() Option
func WithFieldManager ¶
func WithForceConflicts ¶
func WithPreapplyKinds ¶
func WithWaitAfterCRDs ¶
type Options ¶
type Options struct {
// FieldManager identifies your applier in managedFields (kubectl default is "kubectl").
FieldManager string
// ForceConflicts mirrors `--force-conflicts` (take ownership when needed).
ForceConflicts bool
// DefaultNamespace fills in a namespace for namespaced resources that
// don’t have one set by Kustomize.
DefaultNamespace string
// PreapplyKinds are applied in a first pass to satisfy dependencies
// (default: Namespace, CustomResourceDefinition).
PreapplyKinds []string
// DryRun prints/introspects without persisting (server-side dry-run).
DryRun bool
// WaitAfterCRDs pauses briefly and refreshes discovery after CRDs are applied.
WaitAfterCRDs time.Duration
}
Options controls ApplyDir behavior.
Click to show internal directories.
Click to hide internal directories.