config

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AWS

type AWS struct {
	// Region is the AWS region in which the cluster is hosted and should be used
	// by default for all AWS resources.
	Region string

	// LoadBalancer is either set to "classic" or "network" to determine how to
	// locate and configure load balancers attached to a cluster.
	LoadBalancer string `mapstructure:"load_balancer"`
}

AWS defines AWS specific configuration.

type AutoDNS

type AutoDNS struct {
	// Config is the name of the Terraform configuration used to generate
	// automatic DNS.
	Config string

	// File is the name of the Terrform file that is generated and managed by
	// the automatic DNS tooling.
	File string
}

AutoDNS provides configuration for the automatic DNS tooling.

type Cluster

type Cluster struct {
	// Context names the configuration used for accessing the cluster.
	Context string

	// KubeDir tells genifest where to find the kubernetes resource files
	// which are applied to the cluster.
	KubeDir string `mapstructure:"kube_dir"`

	// FilesDir tells genifiest where to locate files that are loaded when
	// templating using the files template function.
	FilesDir string `mapstructure:"files_dir"`

	// SourceDir tells genifest where to find the source files to use for
	// generating the deployment resources.
	SourceDir string `mapstructure:"source_dir"`

	// DeployDir tells genifest where to send the generated resource files
	// for deployment via gitops.
	DeployDir string `mapstructure:"deploy_dir"`

	// Host names the hosting service on which the cluster is based.
	Host string

	// AWS provides AWS specific configuration when Host is set to AWS.
	AWS AWS `mapstructure:"aws"`

	// AutoDNS defines parameters on how DNS entries are automatically generated
	// and configured.
	AutoDNS AutoDNS `mapstructure:"auto_dns"`

	// Disabled is set to prevent the cluster from being configured unless it is
	// specifically named when running genifest.
	Disabled bool

	// Limits is a set of allowlists that define which resources genifest
	// will attempt to manage.
	Limits Limits

	// Ghost is the ghost configuration to use.
	Ghost Ghost
}

Cluster configures orchestration of a single cluster.

type Config

type Config struct {
	// CloudHome is the absolute path to the root of the configuration.
	CloudHome string `mapstructure:"cloud_home"`

	// Clusters defines the orchestration configuration for each cluster managed
	// by this configuration.
	Clusters map[string]Cluster
}

Config defines configuration for the cluster.

func InitConfig

func InitConfig(cfgFile string) (*Config, error)

func (*Config) Tools

func (c *Config) Tools(cluster *Cluster, noApi bool) *LazyTools

type Ghost added in v0.1.0

type Ghost struct {
	// ConfigFile is the path to the ghost configuration file to use (default is the
	// user's default ghost configuration file).
	ConfigFile string `mapstructure:"config_file"`

	// Keeper is the name of the keeper to use (default is the master keeper
	// defined in the ghost configuration file)..
	Keeper string
}

Ghost defines the ghost configuration to use.

type LazyTools

type LazyTools struct {
	// contains filtered or unexported fields
}

func (*LazyTools) IAM

func (t *LazyTools) IAM() (*iam.Client, error)

func (*LazyTools) Kube

func (t *LazyTools) Kube() (*k8s.Client, error)

func (*LazyTools) ResMgr

func (t *LazyTools) ResMgr(ctx context.Context, skipSecrets bool) (*k8scfg.Client, error)

type Limits

type Limits struct {
	// Kinds specifies which kinds of resources the tooling will attempt to
	// manage when set. If not set, no consideration of kinds is made.
	Kinds []string

	// NotNamespaces specifies a blocklist of namespaces that the tooling will
	// not attempt to manage.
	NotNamespaces []string `mapstructure:"not_namespaces"`

	// NotResourceFiles specifies glob patterns to identify resource files the
	// tool will not attempt to manage.
	NotResourceFiles []string `mapstructure:"not_resources"`
	// contains filtered or unexported fields
}

Limits defines the allowlists and blocklists that identify resources the tooling will attempt to manage.

func (*Limits) DropKind

func (l *Limits) DropKind(dropped string)

func (*Limits) KindsSet

func (l *Limits) KindsSet() map[string]struct{}

func (*Limits) NotNamespacesSet

func (l *Limits) NotNamespacesSet() map[string]struct{}

func (*Limits) NotResourceFilesMatches

func (l *Limits) NotResourceFilesMatches() []string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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