Documentation
¶
Index ¶
Constants ¶
const StatePresent = "present"
StatePresent represents the present state
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BinnacleConfig ¶
type BinnacleConfig struct { Charts []ChartConfig `mapstructure:"charts"` ConfigFile string Context string `mapstructure:"kube-context"` LogLevel string `mapstructure:"loglevel"` Release string `mapstructure:"release"` Repositories []RepositoryConfig `mapstructure:"repositories"` }
BinnacleConfig definition
func LoadAndValidateFromViper ¶
func LoadAndValidateFromViper() (*BinnacleConfig, error)
LoadAndValidateFromViper creates a BinnacleConfig object from Viper
type BinnacleKustomization ¶
type BinnacleKustomization struct { // https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/resource/ Resources []string `mapstructure:"resources,omitempty" yaml:"resources,omitempty"` // https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/ Patches []Patch `mapstructure:"patches,omitempty" yaml:"patches,omitempty"` }
Adapted from https://github.com/kubernetes-sigs/kustomize/blob/master/api/types/kustomization.go
func (BinnacleKustomization) Empty ¶
func (k BinnacleKustomization) Empty() bool
type ChartConfig ¶
type ChartConfig struct { Kustomize BinnacleKustomization `mapstructure:"kustomize"` Name string `mapstructure:"name"` Namespace string `mapstructure:"namespace"` Release string `mapstructure:"release"` Repo string `mapstructure:"repo"` State string `mapstructure:"state"` URL string `mapstructure:"url"` Values map[string]any `mapstructure:"values"` Version string `mapstructure:"version"` }
ChartConfig definition
func (ChartConfig) ChartURL ¶
func (c ChartConfig) ChartURL() string
ChartURL returns a URL related to the given repo and name of the chart based off of criteria 1 through 4 of the following documentation on how to specify local and remote charts
1. By chart reference: helm install mymaria example/mariadb 2. By path to a packaged chart: helm install mynginx ./nginx-1.2.3.tgz 3. By path to an unpacked chart directory: helm install mynginx ./nginx 4. By absolute URL: helm install mynginx https://example.com/charts/nginx-1.2.3.tgz
func (ChartConfig) WriteValueFile ¶
func (c ChartConfig) WriteValueFile(dir string) (string, error)
WriteValueFile writes the given file containing the Chart's Values
type Patch ¶
type Patch struct { Path string `mapstructure:"path,omitempty" yaml:"path,omitempty"` Patch string `mapstructure:"patch,omitempty" yaml:"patch,omitempty"` Target *Selector `mapstructure:"target,omitempty" yaml:"target,omitempty"` Options map[string]bool `mapstructure:"options,omitempty" yaml:"options,omitempty"` }
type RepositoryConfig ¶
type RepositoryConfig struct { Name string `mapstructure:"name"` State string `mapstructure:"state"` URL string `mapstructure:"url"` }
RepositoryConfig definition
func (RepositoryConfig) Equal ¶
func (c RepositoryConfig) Equal(x RepositoryConfig) bool
Equal comparison operator