...

Package filtersutil

import "sigs.k8s.io/kustomize/kyaml/filtersutil"
Overview
Index

Overview ▾

Package filtersutil provides utilities for working with yaml.Filter and kio.Filter interfaces.

func ApplyToJSON

func ApplyToJSON(filter kio.Filter, objs ...marshalerUnmarshaler) error

ApplyToJSON applies the filter to the json objects.

ApplyToJSON marshals the objects into a slice of yaml.RNodes, runs the filter on the slice, and then unmarshals the values back.

The filter must not create or delete objects because the objects are updated in place.

func GetRNode

func GetRNode(k json.Marshaler) (*yaml.RNode, error)

GetRNode converts k into an RNode