apps

package
v1.3.1018 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2019 License: Apache-2.0 Imports: 23 Imported by: 1

Documentation

Index

Constants

View Source
const (
	//ValuesAnnotation is the name of the annotation used to stash values
	ValuesAnnotation = "jenkins.io/values.yaml"
)

Variables

This section is empty.

Functions

func AddSecretsToTemplate

func AddSecretsToTemplate(dir string, app string, generatedSecrets []*surveyutils.GeneratedSecret) (string, func(),
	error)

AddSecretsToTemplate adds the generatedSecrets into the template (rooted at dir) as Kubernetes Secrets, using app as the base of the name

func AddSecretsToVault

func AddSecretsToVault(generatedSecrets []*surveyutils.GeneratedSecret, client vault.Client,
	basepath string) (func(), error)

AddSecretsToVault adds the generatedSecrets into the vault using client at basepath

func AddValuesToChart

func AddValuesToChart(dir string, app string, values []byte, verbose bool) (string, func(), error)

AddValuesToChart adds a values file to the chart rooted at dir

func GenerateQuestions

func GenerateQuestions(schema []byte, batchMode bool, askExisting bool, existing map[string]interface{},
	in terminal.FileReader,
	out terminal.FileWriter, outErr io.Writer) ([]byte, []*surveyutils.GeneratedSecret, error)

GenerateQuestions asks questions based on the schema

func StashValues

func StashValues(values []byte, name string, jxClient versioned.Interface, ns string, chartDir string, repository string) error

StashValues takes the values used to configure an app and annotates the APP CRD with them allowing them to be used at a later date e.g. when the app is upgraded

Types

type ChartDetails added in v1.3.913

type ChartDetails struct {
	Values  []byte
	Version string
	Cleanup func()
}

ChartDetails are details about a chart returned by the chart interrogator

type GitOpsOptions

type GitOpsOptions struct {
	*InstallOptions
}

GitOpsOptions is the options used for Git Operations for apps

func (*GitOpsOptions) AddApp

func (o *GitOpsOptions) AddApp(app string, dir string, version string, repository string, alias string) error

AddApp adds the app with version rooted in dir from the repository. An alias can be specified.

func (*GitOpsOptions) DeleteApp

func (o *GitOpsOptions) DeleteApp(app string, alias string) error

DeleteApp deletes the app with alias

func (*GitOpsOptions) UpgradeApp

func (o *GitOpsOptions) UpgradeApp(app string, version string, repository string, username string, password string,
	alias string, interrogateChartFunc func(dir string, existing map[string]interface{}) (*ChartDetails,
		error)) error

UpgradeApp upgrades the app (or all apps if empty) to a version ( or latest if empty) from a repository with username and password. If one app is being upgraded an alias can be specified.

type HelmOpsOptions

type HelmOpsOptions struct {
	*InstallOptions
}

HelmOpsOptions is the options used for Helm Operations for apps

func (*HelmOpsOptions) AddApp

func (o *HelmOpsOptions) AddApp(app string, chart string, version string, values []byte, repository string,
	username string, password string, releaseName string, setValues []string, helmUpdate bool) error

AddApp adds the app with a version and releaseName from the chart from the repository with username and password. A values file or a slice of name=value pairs can be passed in to configure the chart

func (*HelmOpsOptions) DeleteApp

func (o *HelmOpsOptions) DeleteApp(app string, releaseName string, purge bool) error

DeleteApp deletes the app, optionally allowing the user to set the releaseName

func (*HelmOpsOptions) UpgradeApp

func (o *HelmOpsOptions) UpgradeApp(app string, version string, repository string, username string, password string,
	releaseName string, alias string, helmUpdate bool) error

UpgradeApp upgrades the app with releaseName (or all apps if the app name is empty) to the specified version ( or the latest version if the version is empty) using the repository with username and password

type InstallOptions

type InstallOptions struct {
	Helmer          helm.Helmer
	KubeClient      kubernetes.Interface
	InstallTimeout  string
	JxClient        versioned.Interface
	Namespace       string
	EnvironmentsDir string
	GitProvider     gits.GitProvider
	ConfigureGitFn  environments.ConfigureGitFn
	Gitter          gits.Gitter
	Verbose         bool
	DevEnv          *jenkinsv1.Environment
	BatchMode       bool
	In              terminal.FileReader
	Out             terminal.FileWriter
	Err             io.Writer
	GitOps          bool
	TeamName        string
	VaultClient     *vault.Client
	// contains filtered or unexported fields
}

InstallOptions are shared options for installing, removing or upgrading apps for either GitOps or HelmOps

func (*InstallOptions) AddApp

func (o *InstallOptions) AddApp(app string, version string, repository string, username string, password string,
	releaseName string, valuesFiles []string, setValues []string, alias string, helmUpdate bool) error

DirectlyAddAppToGitOps adds the app at a particular version ( or latest if not specified) from the repository with username and password. A releaseName can be specified. Values can be passed with in files or as a slice of name=value pairs. An alias can be specified. GitOps or HelmOps will be automatically chosen based on the o.GitOps flag

func (*InstallOptions) DeleteApp

func (o *InstallOptions) DeleteApp(app string, alias string, releaseName string, purge bool) error

DeleteApp deletes the app. An alias and releaseName can be specified. GitOps or HelmOps will be automatically chosen based on the o.GitOps flag

func (*InstallOptions) GetApps added in v1.3.914

func (o *InstallOptions) GetApps(kubeClient kubernetes.Interface, namespace string, appNames []string) (apps *jenkinsv1.AppList, err error)

GetApps gets a list of installed apps

func (*InstallOptions) UpgradeApp

func (o *InstallOptions) UpgradeApp(app string, version string, repository string, username string, password string,
	releaseName string, alias string, update bool, askExisting bool) error

UpgradeApp upgrades the app (or all apps if empty) to a particular version ( or the latest if not specified) from the repository with username and password. An alias can be specified. GitOps or HelmOps will be automatically chosen based on the o.GitOps flag

Jump to

Keyboard shortcuts

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