apiextensions-apiserverk8s.io/apiextensions-apiserver/pkg/apiserver/schema/pruning Index | Files

package pruning

import "k8s.io/apiextensions-apiserver/pkg/apiserver/schema/pruning"

Index

Functions

func Prune

func Prune(obj interface{}, s *structuralschema.Structural, isResourceRoot bool)

Prune is equivalent to PruneWithOptions(obj, s, isResourceRoot, structuralschema.UnknownFieldPathOptions{})

func PruneWithOptions

func PruneWithOptions(obj interface{}, s *structuralschema.Structural, isResourceRoot bool, opts structuralschema.UnknownFieldPathOptions) []string

PruneWithOptions removes object fields in obj which are not specified in s. It skips TypeMeta and ObjectMeta fields if XEmbeddedResource is set to true, or for the root if isResourceRoot=true, i.e. it does not prune unknown metadata fields. It returns the set of fields that it prunes if opts.TrackUnknownFieldPaths is true

Source Files

algorithm.go

Version
v0.32.3
Published
Mar 12, 2025
Platform
js/wasm
Imports
2 packages
Last checked
37 minutes ago

Tools for package owners.