kubernetes/staging/src/k8s.io/kubectl/pkg/cmd/apply/applyset.go

const ApplySetToolingAnnotation

const ApplySetAdditionalNamespacesAnnotation

const DeprecatedApplySetGRsAnnotation

const ApplySetGKsAnnotation

const ApplySetParentIDLabel

const V1ApplySetIdFormat

const ApplysetPartOfLabel

const ApplysetParentCRDLabel

var defaultApplySetParentGVR

type ApplySet

var builtinApplySetParentGVRs

type ApplySetParentRef

func (p ApplySetParentRef) IsNamespaced() bool {}

// String returns the string representation of the parent object using the same format
// that we expect to receive in the --applyset flag on the CLI.
func (p ApplySetParentRef) String() string {}

type ApplySetTooling

func (t ApplySetTooling) String() string {}

// NewApplySet creates a new ApplySet object tracked by the given parent object.
func NewApplySet(parent *ApplySetParentRef, tooling ApplySetTooling, mapper meta.RESTMapper, client resource.RESTClient) *ApplySet {}

const applySetIDPartDelimiter

func (a ApplySet) ID() string {}

// Validate imposes restrictions on the parent object that is used to track the applyset.
func (a ApplySet) Validate(ctx context.Context, client dynamic.Interface) error {}

func (a *ApplySet) labelForCustomParentCRDs() *metav1.LabelSelector {}

func (a *ApplySet) getAllowedCustomResourceParents(ctx context.Context, client dynamic.Interface) (sets.Set[schema.GroupVersionResource], error) {}

func (a *ApplySet) LabelsForMember() map[string]string {}

// addLabels sets our tracking labels on each object; this should be called as part of loading the objects.
func (a *ApplySet) AddLabels(objects ...*resource.Info) error {}

func (a *ApplySet) fetchParent() error {}

func (a *ApplySet) LabelSelectorForMembers() string {}

// AllPrunableResources returns the list of all resources that should be considered for pruning.
// This is potentially a superset of the resources types that actually contain resources.
func (a *ApplySet) AllPrunableResources() []*kindInfo {}

// AllPrunableNamespaces returns the list of all namespaces that should be considered for pruning.
// This is potentially a superset of the namespaces that actually contain resources.
func (a *ApplySet) AllPrunableNamespaces() []string {}

func getLabelsAndAnnotations(obj runtime.Object) (map[string]string, map[string]string, error) {}

func toolingBaseName(toolAnnotation string) string {}

type kindInfo

func parseKindAnnotation(annotations map[string]string, mapper meta.RESTMapper) (map[schema.GroupKind]*kindInfo, error) {}

func parseDeprecatedResourceAnnotation(annotation string, mapper meta.RESTMapper) (map[schema.GroupKind]*kindInfo, error) {}

func parseNamespacesAnnotation(annotations map[string]string) sets.Set[string] {}

// addResource registers the given resource and namespace as being part of the updated set of
// resources being applied by the current operation.
func (a *ApplySet) addResource(restMapping *meta.RESTMapping, namespace string) {}

type ApplySetUpdateMode

var updateToLatestSet

var updateToSuperset

func (a *ApplySet) updateParent(mode ApplySetUpdateMode, dryRun cmdutil.DryRunStrategy, validation string) error {}

func serverSideApplyRequest(a *ApplySet, data []byte, dryRun cmdutil.DryRunStrategy, validation string, forceConficts bool) error {}

func (a *ApplySet) buildParentPatch(mode ApplySetUpdateMode) *metav1.PartialObjectMetadata {}

func generateNamespacesAnnotation(namespaces sets.Set[string], skip string) string {}

func generateKindsAnnotation(resources sets.Set[schema.GroupKind]) string {}

func (a ApplySet) FieldManager() string {}

// ParseApplySetParentRef creates a new ApplySetParentRef from a parent reference in the format [RESOURCE][.GROUP]/NAME
func ParseApplySetParentRef(parentRefStr string, mapper meta.RESTMapper) (*ApplySetParentRef, error) {}

// Prune deletes any objects from the apiserver that are no longer in the applyset.
func (a *ApplySet) Prune(ctx context.Context, o *ApplyOptions) error {}

// BeforeApply should be called before applying the objects.
// It pre-updates the parent object so that it covers the resources that will be applied.
// In this way, even if we are interrupted, we will not leak objects.
func (a *ApplySet) BeforeApply(objects []*resource.Info, dryRunStrategy cmdutil.DryRunStrategy, validationDirective string) error {}