jxapps

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AppConfigFileName is the name of the applications configuration file
	AppConfigFileName = "jx-apps.yaml"
	// AppConfigAlternateFileName is the name of the applications configuration file
	AppConfigAlternateFileName = "jx-apps.yml"
	// PhaseSystem is installed before the apps phase
	PhaseSystem Phase = "system"
	// PhaseApps is installed after the system phase
	PhaseApps Phase = "apps"
)
View Source
const (
	// AppDefaultsConfigFileName is the name of the apps configuration file in the version stream
	AppDefaultsConfigFileName = "defaults.yml"
)

Variables

View Source
var PhaseValues = []string{"system", "apps"}

PhaseValues the string values for Phases

Functions

This section is empty.

Types

type App

type App struct {
	// Name of the application / helm chart
	Name string `json:"name,omitempty"`
	// Repository the helm repository
	Repository string `json:"repository,omitempty"`
	// Namespace to install the application into
	Namespace string `json:"namespace,omitempty"`
	// Phase of the pipeline to install application
	Phase Phase `json:"phase,omitempty"`
	// Version the version to install if you want to override the version from the Version Stream.
	// Note we recommend using the version stream for app versions
	Version string `json:"version,omitempty"`
	// Description an optional description of the app
	Description string `json:"description,omitempty"`
	// Alias an optional alias of the app
	Alias string `json:"alias,omitempty"`
	// Values any explicit value files to be used
	Values []string `json:"values,omitempty"`
	// Hooks is a list of extension points paired with operations, that are executed in specific points of the lifecycle of releases defined in helmfile
	Hooks []helmfile.Hook `json:"hooks,omitempty"`
	// Wait, if set to true, will wait until all Pods, PVCs, Services, and minimum number of Pods of a Deployment are in a ready state before marking the release as successful
	Wait *bool `json:"wait,omitempty"`
	// Timeout is the time in seconds to wait for any individual Kubernetes operation (like Jobs for hooks, and waits on pod/pvc/svc/deployment readiness) (default 300)
	Timeout *int `json:"timeout,omitempty"`
	// RecreatePods, when set to true, instruct helmfile to perform pods restart for the resource if applicable
	RecreatePods *bool `json:"recreatePods,omitempty"`
	// Force, when set to true, forces resource update through delete/recreate if needed
	Force *bool `json:"force,omitempty"`
	// Installed, when set to true, `delete --purge` the release
	Installed *bool `json:"installed,omitempty"`
	// Atomic, when set to true, restore previous state in case of a failed install/upgrade attempt
	Atomic *bool `json:"atomic,omitempty"`
	// CleanupOnFail, when set to true, the --cleanup-on-fail helm flag is passed to the upgrade command
	CleanupOnFail *bool `json:"cleanupOnFail,omitempty"`
}

App is the configuration of an app used during boot for helmfile / helm 3

type AppConfig

type AppConfig struct {
	// Apps of applications
	Apps []App `json:"apps"`
	// Repositories list of helm repositories
	Repositories []helmfile.RepositorySpec `json:"repositories,omitempty"`
	// DefaultNamespace the default namespace to install applications into
	DefaultNamespace string `json:"defaultNamespace,omitempty"`
	// Values common values files to be used for all charts
	Values []string `json:"values,omitempty"`
}

AppConfig contains the apps to install during boot for helmfile / helm 3

func LoadAppConfig

func LoadAppConfig(dir string) (*AppConfig, string, error)

LoadAppConfig loads the boot applications configuration file if there is not a file called `jx-apps.yml` in the given dir we will scan up the parent directories looking for the requirements file as we often run 'jx' steps in sub directories.

func (*AppConfig) SaveConfig

func (c *AppConfig) SaveConfig(fileName string) error

SaveConfig saves the configuration file to the given project directory

type AppDefaultsConfig

type AppDefaultsConfig struct {
	// Namespace the default namespace to install this app into
	Namespace string `json:"namespace,omitempty"`
	// Phase the boot phase this app should be installed in. Leave blank if you are not sure.
	// things like ingress controllers are in 'system' and most other things default to the 'apps' phase
	Phase string `json:"phase,omitempty"`
	// Hooks is a list of extension points paired with operations, that are executed in specific points of the lifecycle of releases defined in helmfile
	Hooks []helmfile.Hook `json:"hooks,omitempty"`
}

AppDefaultsConfig contains optional defaults for apps installed via helmfile / helm 3 which are typically discovered from the Version Stream

func LoadAppDefaultsConfig

func LoadAppDefaultsConfig(dir string) (*AppDefaultsConfig, string, error)

LoadAppDefaultsConfig loads the boot apps default configuration when using helmfile / helm 3 in the version stream used to default values if the user does not specify any configuration when doing `jx add app foo` to try encourage default configurations across installations (e.g. using default namespace names and so forth)

type Phase

type Phase string

Phase of the pipeline to install application

Jump to

Keyboard shortcuts

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