config

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// DefaultMutableFeatureGate is a mutable version of DefaultFeatureGate.
	// Only top-level commands/options setup should make use of this.
	DefaultMutableFeatureGate featuregate.MutableFeatureGate = featuregate.NewFeatureGate()

	// DefaultFeatureGate is a shared global FeatureGate.
	// Top-level commands/options setup that needs to modify this feature gate should use DefaultMutableFeatureGate.
	DefaultFeatureGate featuregate.FeatureGate = DefaultMutableFeatureGate
)

Functions

This section is empty.

Types

type Config

type Config struct {
	LabelKeys                  []string                  `json:"labelKeys,omitempty"`
	AnnotationKeys             []string                  `json:"annotationKeys,omitempty"`
	SubNamespaceLabelKeys      []string                  `json:"subNamespaceLabelKeys,omitempty"`
	SubNamespaceAnnotationKeys []string                  `json:"subNamespaceAnnotationKeys,omitempty"`
	Watches                    []metav1.GroupVersionKind `json:"watches,omitempty"`
	NamingPolicies             []NamingPolicy            `json:"namingPolicies,omitempty"`
	NamingPolicyRegexps        []NamingPolicyRegexp
}

Config represents the configuration file of Accurate.

func (*Config) Load

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

Load loads configurations.

func (*Config) Validate

func (c *Config) Validate(mapper meta.RESTMapper) error

Validate validates the configurations.

type NamingPolicy added in v0.3.0

type NamingPolicy struct {
	Root  string `json:"root"`
	Match string `json:"match"`
}

NamingPolicy represents naming policies for Namespaces created from SubNamespaces.

type NamingPolicyRegexp added in v0.3.0

type NamingPolicyRegexp struct {
	Root  *regexp.Regexp
	Match string
}

Jump to

Keyboard shortcuts

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