corral

package
v0.0.0-...-cc466af Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2025 License: Apache-2.0 Imports: 14 Imported by: 6

Documentation

Index

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

func DeleteCorral(corralName string) error

DeleteCorral deletes a corral based on the corral name

func GetCorralEnvVar

func GetCorralEnvVar(corralName, envVar string) (string, error)

GetCorralEnvVar gets corral environment variables

func GetKubeConfig

func GetKubeConfig(corral string) ([]byte, error)

GetKubeConfig gets the kubeconfig of corral's cluster

func ListCorral

func ListCorral() (map[string]string, error)

ListCorral lists the corrals that currently created

func SetCorralBastion

func SetCorralBastion(corralName string) error

SetCorralBastion is a helper function that will set the corral bastion private and pulic addresses previously generated by `corralName`

func SetCorralSSHKeys

func SetCorralSSHKeys(corralName string) error

SetCorralSSHKeys is a helper function that will set the corral ssh keys previously generated by `corralName`

func SetCustomRepo

func SetCustomRepo(repo string) error

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

func SetupCorralConfig(configVars map[string]string, configUser string, configSSHPath string) error

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

func UpdateCorralConfig(configVar, value string) error

UpdateCorralConfig updates a specific corral config var

Types

type Args

type Args struct {
	Name        string
	PackageName string
	Updates     map[string]string
}

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

Jump to

Keyboard shortcuts

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