config

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2025 License: MIT Imports: 5 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 {
	APIVersion string   `yaml:"apiVersion"`
	Kind       string   `yaml:"kind"`
	Sources    []Source `yaml:"sources"`
}

Config represents the kubesource.yaml configuration file.

func LoadConfig

func LoadConfig(afs afero.Fs, dir string) (*Config, error)

LoadConfig loads and parses a kubesource.yaml file from the specified directory using afero.Fs

type Filter

type Filter struct {
	Include []Selector `yaml:"include,omitempty"`
	Exclude []Selector `yaml:"exclude,omitempty"`
}

Filter represents filtering options for a target. An empty include list means to include everything. An empty exclude list means to exclude nothing.

type MetadataSelector

type MetadataSelector struct {
	Name      string            `yaml:"name,omitempty"`
	Namespace string            `yaml:"namespace,omitempty"`
	Labels    map[string]string `yaml:"labels,omitempty"`
}

MetadataSelector represents metadata-based filtering.

type Selector

type Selector struct {
	Kind       string            `yaml:"kind,omitempty"`
	APIVersion string            `yaml:"apiVersion,omitempty"`
	Metadata   *MetadataSelector `yaml:"metadata,omitempty"`
}

Selector represents a resource selector for filtering. All non-empty fields must match.

type Source added in v0.2.0

type Source struct {
	SourceDir string   `yaml:"sourceDir"`
	Targets   []Target `yaml:"targets"`
}

Source represents a source directory and its associated targets.

type Target

type Target struct {
	Directory string  `yaml:"directory"`
	Filter    *Filter `yaml:"filter,omitempty"`
}

Target represents a target directory where rendered manifests should be saved.

Jump to

Keyboard shortcuts

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