Documentation ¶
Index ¶
- func WatchProjects()
- type Boondoggle
- func (b *Boondoggle) AddHelmRepos() error
- func (b *Boondoggle) AddImagePullSecret(namespace string) error
- func (b *Boondoggle) DepUp() error
- func (b *Boondoggle) DoBuild() error
- func (b *Boondoggle) DoClone() error
- func (b *Boondoggle) DoPostDeployExec(namespace string) error
- func (b *Boondoggle) DoPostDeploySteps() error
- func (b *Boondoggle) DoPreDeploySteps() error
- func (b *Boondoggle) DoUpgrade(namespace string, release string, dryRun bool, useSecrets bool, tls bool, ...) ([]byte, error)
- func (b *Boondoggle) SelfFetch(path string, version string) error
- type Dependency
- type HelmRepo
- type RawBoondoggle
- type Requirements
- type Service
- type Step
- type Umbrella
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Boondoggle ¶
type Boondoggle struct { PullSecretsName string DockerUsername string DockerPassword string DockerEmail string HelmRepos []HelmRepo Umbrella Umbrella Services []Service ExtraEnv map[string]string }
Boondoggle is the processed version of RawBoondoggle. It represents the settings of only the chosen options.
func NewBoondoggle ¶
func NewBoondoggle(config RawBoondoggle, environment string, setStateAll string, serviceState []string, extraEnv map[string]string) Boondoggle
NewBoondoggle unmarshals the boondoggle.yml to RawBoondoggle and returns a processed Boondoggle struct type.
func (*Boondoggle) AddHelmRepos ¶
func (b *Boondoggle) AddHelmRepos() error
AddHelmRepos uses `helm repo add` to setup the repos listed in boondoggle config. If promtbasicauth is true, it will prompt the user for the helm repo username and password. If "username" and "password" are provided, it will use these as the basic auth username and password. environment var replacement is supported for these. If the result for the environment variable lookup is empty, it will fall back to prompting for username and password. It will not do anything if the repo is already added.
func (*Boondoggle) AddImagePullSecret ¶
func (b *Boondoggle) AddImagePullSecret(namespace string) error
AddImagePullSecret ensures the kubernetes imagePullSecret is set with kubectl.
func (*Boondoggle) DoBuild ¶
func (b *Boondoggle) DoBuild() error
DoBuild builds the localdev container based on the command in the boondoggle config file.
func (*Boondoggle) DoClone ¶
func (b *Boondoggle) DoClone() error
DoClone determines which projects are being worked locally and clones them if necessary.
func (*Boondoggle) DoPostDeployExec ¶
func (b *Boondoggle) DoPostDeployExec(namespace string) error
DoPostDeployExec runs commands in the app outlined in the boondoggle.yml file for the services with the state set to "localdev"
func (*Boondoggle) DoPostDeploySteps ¶
func (b *Boondoggle) DoPostDeploySteps() error
DoPostDeploySteps runs the postDeploySteps outlined in the boondoggle.yml file for the services with the state set to "localdev" This is used for building any steps that need to happen after deploying a local environment.
func (*Boondoggle) DoPreDeploySteps ¶
func (b *Boondoggle) DoPreDeploySteps() error
DoPreDeploySteps runs the preDeploySteps outlined in the boondoggle.yml file for the services with the state set to "localdev" This is used for building any steps that need to happen before deploying a local environment.
type Dependency ¶
type Dependency struct { Name string `yaml:"name,omitempty"` Version string `yaml:"version,omitempty"` Repository string `yaml:"repository,omitempty"` Condition string `yaml:"condition,omitempty"` Tags []string `yaml:"tags,omitempty"` Enabled bool `yaml:"enabled,omitempty"` Importvalues []interface{} `yaml:"importvalues,omitempty"` Alias string `yaml:"alias,omitempty"` }
Dependency is part of the requirements file
type HelmRepo ¶
type HelmRepo struct { Name string URL string Promptbasicauth bool Username string Password string }
HelmRepo is the data needed to add a Helm Repository. Part of Boondoggle struct.
type RawBoondoggle ¶
type RawBoondoggle struct { PullSecretsName string `mapstructure:"pull-secrets-name,omitempty"` DockerUsername string `mapstructure:"docker_username,omitempty"` DockerPassword string `mapstructure:"docker_password,omitempty"` DockerEmail string `mapstructure:"docker_email,omitempty"` HelmRepos []struct { Name string `mapstructure:"name"` URL string `mapstructure:"url"` Promptbasicauth bool `mapstructure:"promptbasicauth,omitempty"` Username string `mapstructure:"username,omitempty"` Password string `mapstructure:"password,omitempty"` } `mapstructure:"helm-repos"` Umbrella struct { Name string `mapstructure:"name"` Repository string `mapstructure:"repository"` Path string `mapstructure:"path"` Environments []struct { Name string `mapstructure:"name"` Files []string `mapstructure:"files,omitempty"` Values []string `mapstructure:"values,omitempty"` } `mapstructure:"environments"` } `mapstructure:"umbrella"` Services []struct { Name string `mapstructure:"name"` Path string `mapstructure:"path"` Gitrepo string `mapstructure:"gitrepo"` Alias string `mapstructure:"alias,omitempty"` Chart string `mapstructure:"chart"` DepValuesAllStates struct { Condition string `mapstructure:"condition,omitempty"` Tags []string `mapstructure:"tags,omitempty"` Enabled bool `mapstructure:"enabled,omitempty"` Importvalues []interface{} `mapstructure:"importvalues,omitempty"` } `mapstructure:"dep-values-all-states,omitempty"` States []struct { StateName string `mapstructure:"state-name"` ContainerBuild string `mapstructure:"container-build,omitempty"` Repository string `mapstructure:"repository"` HelmValues []string `mapstructure:"helm-values,omitempty"` Version string `mapstructure:"version"` Condition string `mapstructure:"condition,omitempty"` Tags []string `mapstructure:"tags,omitempty"` Enabled bool `mapstructure:"enabled,omitempty"` Importvalues []interface{} `mapstructure:"importvalues,omitempty"` PreDeploySteps []struct { Cmd string `mapstructure:"cmd,omitempty"` Args []string `mapstructure:"args,omitempty"` } `mapstructure:"preDeploySteps,omitempty"` PostDeploySteps []struct { Cmd string `mapstructure:"cmd,omitempty"` Args []string `mapstructure:"args,omitempty"` } `mapstructure:"postDeploySteps,omitempty"` PostDeployExec []struct { App string `mapstructure:"app,omitempty"` Container string `mapstructure:"container,omitempty"` Args []string `mapstructure:"args,omitempty"` } `mapstructure:"postDeployExec,omitempty"` } `mapstructure:"states"` } `mapstructure:"services"` }
RawBoondoggle is the struct representation of the boondoggle.yml config file.
type Requirements ¶
type Requirements struct {
Dependencies []Dependency `yaml:"dependencies"`
}
Requirements represents the yaml file requirements.yaml as used in a Helm chart.
func BuildRequirements ¶
func BuildRequirements(b Boondoggle, svo []string) Requirements
BuildRequirements converts a Boondoggle into a Helm Requirements struct.
type Service ¶
type Service struct { Name string Path string Gitrepo string Alias string Chart string ContainerBuild string Repository string HelmValues []string Version string Condition string Tags []string Enabled bool Importvalues []interface{} PreDeploySteps []Step PostDeploySteps []Step PostDeployExec []Step }
Service is the definition of a service (an umbrella dependency). Part of Boondoggle struct.
func (Service) GetHelmDepName ¶
GetHelmDepName is a helper to return the Alias if there is one, else returns Chart