config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	TargetResources        []TargetResource      `json:"TargetResources,omitempty"`
	NamespaceSelector      *metav1.LabelSelector `json:"NamespaceSelector,omitempty"`
	EnableClusterResources bool                  `json:"EnableClusterResources,omitempty"`
}

Config represents the configuration file of kubbernecker.

func (*Config) Load

func (c *Config) Load(data []byte) error

Load loads configurations.

func (*Config) SelectorFor

func (c *Config) SelectorFor(gvk metav1.GroupVersionKind) (nsSelector labels.Selector, resSelector labels.Selector, err error)

func (*Config) Validate

func (c *Config) Validate() error

Validate validates the configurations.

type TargetResource

type TargetResource struct {
	metav1.GroupVersionKind `json:",inline"`
	NamespaceSelector       *metav1.LabelSelector `json:"namespaceSelector,omitempty"`
	ResourceSelector        *metav1.LabelSelector `json:"resourceSelector,omitempty"`
}

Jump to

Keyboard shortcuts

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