filters

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 29, 2021 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterOne

func FilterOne(f kio.Filter) yaml.Filter

FilterOne is the opposite of kio.FilterAll, useful if you have a filter that is optimized for filtering batches of nodes but you just need to call `Pipe` on a single node.

Types

type ResourceMetaFilter

type ResourceMetaFilter struct {
	// Regular expression matching the group.
	Group string `json:"group,omitempty" yaml:"group,omitempty"`
	// Regular expression matching the version.
	Version string `json:"version,omitempty" yaml:"version,omitempty"`
	// Regular expression matching the kind.
	Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
	// Regular expression matching the namespace.
	Namespace string `json:"namespace,omitempty" yaml:"namespace,omitempty"`
	// Regular expression matching the name.
	Name string `json:"name,omitempty" yaml:"name,omitempty"`
	// Kubernetes selector matching labels.
	LabelSelector string `json:"labelSelector,omitempty" yaml:"labelSelector,omitempty"`
	// Kubernetes selector matching annotations
	AnnotationSelector string `json:"annotationSelector,omitempty" yaml:"annotationSelector,omitempty"`
}

ResourceMetaFilter filters nodes based on their resource metadata using regular expressions or Kubernetes selectors.

func (*ResourceMetaFilter) Filter

func (f *ResourceMetaFilter) Filter(nodes []*yaml.RNode) ([]*yaml.RNode, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL