Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultDeploymentSettings = DeploymentSettings{ Debug: false, DryRun: false, Wait: false, WaitForJobs: false, Timeout: 5 * time.Minute, }
Functions ¶
This section is empty.
Types ¶
type DeploymentSettings ¶ added in v2.15.0
type DeploymentSettings struct { // enable verbose output. Debug bool // simulate an install. DryRun bool // if set, will wait until all Pods, PVCs, Services, and minimum number of Pods of a Deployment, StatefulSet, or ReplicaSet are in a ready state before marking the release as successful. Wait bool // if set, will wait until all Jobs have been completed before marking the release as successful. WaitForJobs bool // time to wait for any individual Kubernetes operation (like Jobs for hooks) Timeout time.Duration }
type Helm ¶
type Helm interface { // SetVariables set the variables for the helm deployment. Variables set will be applied on any subsequent operation. If you do not provide // any variables with SetVariables, the default variables in file values.yaml are used. // // Parameters support are // helmVariables (this is a map of helm variables, defined as string keys and interface values. Nested structures are supported) SetVariables(helmVariables map[string]interface{}) error // Deploy deploys the helm charts provided in the helmDirectory to the configured kubernetes namespace. Deploy() error // GetVariablesOverrideFileName returns the file name in which the helm variables will be stored. This name is convention based on the helm tool chain. GetVariablesOverrideFileName() string }
Helm is a wrapper around common helm functionality used for automated app deployments to kubernetes.
func New ¶
New creates a new instance of Helm, which is a wrapper around common Helm functionality. The deployment will run with default DeploymentSettings
Parameters:
executor (can be provided from hq.GetExecutor() or by instantiating your own), namespace (the kubernetes namespace to deploy to), chartName (the chart name of the helm deployment), helmDirectory (directory where your helm resources are stored. To construct the full path, simply use filepath.Join() method and the hq.ProjectBasePath)
func NewWithSettings ¶ added in v2.15.0
func NewWithSettings(executor commands.Executor, namespace string, chartName string, helmDirectory string, deploymentSettings DeploymentSettings) Helm
NewWithSettings creates a new instance of Helm, which is a wrapper around common Helm functionality.
Parameters:
executor (can be provided from hq.GetExecutor() or by instantiating your own), namespace (the kubernetes namespace to deploy to), chartName (the chart name of the helm deployment), helmDirectory (directory where your helm resources are stored. To construct the full path, simply use filepath.Join() method and the hq.ProjectBasePath) deploymentSettings (deployment specific settings, e.g. to wait for completion of the deployment)
Click to show internal directories.
Click to hide internal directories.