Documentation
¶
Index ¶
- func CreateCorral(ts *session.Session, corralName, packageName string, debug, cleanup bool) ([]byte, error)
- func CreateMultipleCorrals(ts *session.Session, commands []Args, debug, cleanup bool) ([][]byte, error)
- func DeleteAllCorrals() error
- func DeleteCorral(corralName string) error
- func GetCorralEnvVar(corralName, envVar string) (string, error)
- func GetKubeConfig(corral string) ([]byte, error)
- func ListCorral() (map[string]string, error)
- func SetCorralBastion(corralName string) error
- func SetCorralSSHKeys(corralName string) error
- func SetCustomRepo(repo string) error
- func SetupCorralConfig(configVars map[string]string, configUser string, configSSHPath string) error
- func UpdateCorralConfig(configVar, value string) error
- type Args
- type Configs
- type Packages
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateCorral ¶
func CreateCorral(ts *session.Session, corralName, packageName string, debug, cleanup bool) ([]byte, error)
CreateCorral creates a corral taking the corral name, the package path, and a debug set so if someone wants to view the corral create log
func CreateMultipleCorrals ¶
func CreateMultipleCorrals(ts *session.Session, commands []Args, debug, cleanup bool) ([][]byte, error)
CreateMultipleCorrals creates corrals taking the corral name, the package path, and a debug set so if someone wants to view the corral create log. Using this function implies calling WaitOnCorralWithCombinedOutput to get the output once finished.
func DeleteAllCorrals ¶
func DeleteAllCorrals() error
func DeleteCorral ¶
DeleteCorral deletes a corral based on the corral name
func GetCorralEnvVar ¶
GetCorralEnvVar gets corral environment variables
func GetKubeConfig ¶
GetKubeConfig gets the kubeconfig of corral's cluster
func ListCorral ¶
ListCorral lists the corrals that currently created
func SetCorralBastion ¶
SetCorralBastion is a helper function that will set the corral bastion private and pulic addresses previously generated by `corralName`
func SetCorralSSHKeys ¶
SetCorralSSHKeys is a helper function that will set the corral ssh keys previously generated by `corralName`
func SetCustomRepo ¶
SetCustomRepo sets a custom repo for corral to use. It takes a string as a parameter which is the repo you want to use
func SetupCorralConfig ¶
SetupCorralConfig sets the corral config vars. It takes a map[string]string as a parameter; the key is the value and the value the value you are setting For example we are getting the aws config vars to build a corral from aws. results := aws.AWSCorralConfigVars() err := corral.SetupCorralConfig(results)
func UpdateCorralConfig ¶
UpdateCorralConfig updates a specific corral config var
Types ¶
type Args ¶
Args is a struct that contains arguments to a corral create command, and any updates to the config that should be applied before creating the corral
type Configs ¶
type Configs struct { CorralConfigVars map[string]string `json:"corralConfigVars" yaml:"corralConfigVars"` CorralConfigUser string `json:"corralConfigUser" yaml:"corralConfigUser" default:"jenkauto"` CorralSSHPath string `json:"corralSSHPath" yaml:"corralSSHPath" default:"/root/.ssh/public.pub"` }
Configs is a struct that for necessary corral config environment variables to build a corral
func Configurations ¶
func Configurations() *Configs
Configurations is a function that reads in the corral config vars from the config file
type Packages ¶
type Packages struct { CorralPackageImages map[string]string `json:"corralPackageImages" yaml:"corralPackageImages"` HasCleanup bool `json:"hasCleanup" yaml:"hasCleanup" default:"true"` HasDebug bool `json:"hasDebug" yaml:"hasDebug" default:"false"` HasCustomRepo string `json:"hasCustomRepo" yaml:"hasCustomRepo"` }
Packages is a struct that has the path to the packages
func PackagesConfig ¶
func PackagesConfig() *Packages
PackagesConfig is a function that reads in the corral package object from the config file