Documentation
¶
Overview ¶
Package parser provides functionality for parsing and masking Kubernetes manifests.
Package parser provides utilities for parsing Kubernetes YAML and JSON manifests.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseYAML ¶
func ParseYAML(reader io.Reader) ([]*unstructured.Unstructured, error)
ParseYAML reads a YAML or JSON stream and returns unstructured objects. If the unmarshaller encounters an error, objects read up until the error are returned.
Types ¶
type Options ¶ added in v0.0.4
type Options struct {
FilterOption *filter.Option // Filtering options
DisableMaskingSecrets bool // Disable masking of secret values (default: false)
}
Options controls the parsing and masking behavior
func DefaultOptions ¶ added in v0.0.4
func DefaultOptions() *Options
DefaultOptions returns the default parsing options
type ResourceKey ¶ added in v0.0.4
ResourceKey uniquely identifies a Kubernetes resource
func (ResourceKey) String ¶ added in v0.0.4
func (k ResourceKey) String() string
String returns a string representation of the ResourceKey
type Results ¶ added in v0.0.4
type Results map[ResourceKey]*unstructured.Unstructured
Results represents a collection of resources
func Objects ¶ added in v0.0.4
func Objects(objs []*unstructured.Unstructured, opts *Options) (Results, error)
Objects processes a slice of Kubernetes objects and returns Results with optional masking and filtering
func Yaml ¶ added in v0.0.4
Yaml processes YAML from an io.Reader and returns Results with optional masking
func YamlString ¶ added in v0.0.4
YamlString processes a YAML string and returns Results with optional masking