repo_config

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const RepoConfigFilenamePrefix = `.kubechecks`

Variables

View Source
var ErrConfigFileNotFound = errors.New("project config file not found")
View Source
var RepoConfigFileExtensions = []string{".yaml", ".yml"}

Functions

func RepoConfigFilenameVariations

func RepoConfigFilenameVariations() []string

Types

type ArgoCdApplicationConfig

type ArgoCdApplicationConfig struct {
	Name              string   `yaml:"name" validate:"empty=false"`
	Cluster           string   `yaml:"cluster" validate:"empty=false"`
	Path              string   `yaml:"path" validate:"empty=false"`
	AdditionalPaths   []string `yaml:"additionalPaths"`
	EnableConfTest    bool     `yaml:"enableConfTest" default:"true"`
	EnableKubeConform bool     `yaml:"enableKubeConform" default:"true"`
	EnableKubePug     bool     `yaml:"enableKubePug" default:"true"`
}

func (*ArgoCdApplicationConfig) UnmarshalYAML

func (s *ArgoCdApplicationConfig) UnmarshalYAML(unmarshal func(interface{}) error) error

type ArgocdApplicationSetConfig

type ArgocdApplicationSetConfig struct {
	Name              string   `yaml:"name" validate:"empty=false"`
	Paths             []string `yaml:"paths" validate:"empty=false"`
	EnableConfTest    bool     `yaml:"enableConfTest" default:"true"`
	EnableKubeConform bool     `yaml:"enableKubeConform" default:"true"`
	EnableKubePug     bool     `yaml:"enableKubePug" default:"true"`
}

func (*ArgocdApplicationSetConfig) UnmarshalYAML

func (s *ArgocdApplicationSetConfig) UnmarshalYAML(unmarshal func(interface{}) error) error

type Config

type Config struct {
	Applications    []*ArgoCdApplicationConfig    `yaml:"applications"`
	ApplicationSets []*ArgocdApplicationSetConfig `yaml:"applicationSets"`
}

func LoadRepoConfig

func LoadRepoConfig(repoDir string) (*Config, error)

LoadRepoConfig attempts to load a config file from the given directory it searches the dir for all the config file name variations.

func LoadRepoConfigBytes

func LoadRepoConfigBytes(b []byte) (*Config, error)

Jump to

Keyboard shortcuts

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