Documentation ¶
Index ¶
- Constants
- func CreateActionConfig(includeRelease bool, releaseName string, releaseStatus release.Status, ...) (*action.Configuration, error)
- func FindLatestChartVersion(chartName, repoName, repoURI string) (string, error)
- func GetAllValues(kubeInfo *client.KubeInfo, releaseName string, namespace string) ([]byte, error)
- func GetAllValuesMap(kubeInfo *client.KubeInfo, releaseName string, namespace string) (map[string]interface{}, error)
- func GetHelmReleaseStatus(kubeInfo *client.KubeInfo, releaseName string, namespace string) (string, error)
- func GetMetadata(kubeInfo *client.KubeInfo, releaseName string, namespace string) (*action.Metadata, error)
- func GetRelease(kubeInfo *client.KubeInfo, releaseName string, namespace string) (*release.Release, error)
- func GetReleaseAppVersion(kubeInfo *client.KubeInfo, releaseName string, namespace string) (string, error)
- func GetReleaseChartVersion(kubeInfo *client.KubeInfo, releaseName string, namespace string) (string, error)
- func GetReleaseStatus(kubeInfo *client.KubeInfo, releaseName string, namespace string) (status string, err error)
- func GetReleaseStringValues(kubeInfo *client.KubeInfo, valueKeys []string, releaseName string, ...) (map[string]string, error)
- func GetReleaseValues(kubeInfo *client.KubeInfo, valueKeys []string, releaseName string, ...) (map[string]interface{}, error)
- func GetReleases(kubeInfo *client.KubeInfo, namespace string) ([]*release.Release, error)
- func GetReleasesAllNamespaces(kubeInfo *client.KubeInfo) ([]*release.Release, error)
- func GetShowValues(archive io.Reader) ([]byte, error)
- func GetValues(kubeInfo *client.KubeInfo, releaseName string, namespace string) ([]byte, error)
- func GetValuesMap(kubeInfo *client.KubeInfo, releaseName string, namespace string) (map[string]interface{}, error)
- func HelmValueFileConstructor(kvs []KeyValue) (string, error)
- func IsReleaseDeployed(kubeInfo *client.KubeInfo, releaseName string, namespace string) (found bool, err error)
- func IsReleaseFailed(kubeInfo *client.KubeInfo, releaseName string, namespace string) (bool, error)
- func IsReleaseInstalled(kubeInfo *client.KubeInfo, releaseName string, namespace string) (found bool, err error)
- func MergeMaps(mBase map[string]interface{}, mOverlay map[string]interface{}) error
- func MergeValues(overrides []HelmOverrides, p getter.Providers) (map[string]interface{}, error)
- func NewGitGetter(options ...getter.Option) (getter.Getter, error)
- func NewGitProvider() getter.Provider
- func SetActionConfigFunction(f ActionConfigFnType)
- func SetChartInfoFunction(f ChartInfoFnType)
- func SetDefaultActionConfigFunction()
- func SetDefaultChartInfoFunction()
- func SetDefaultLoadChartFunction()
- func SetLoadChartFunction(f LoadChartFnType)
- func Template(kubeInfo *client.KubeInfo, theChart *chart.Chart, overrides []HelmOverrides, ...) (string, error)
- func Uninstall(kubeInfo *client.KubeInfo, releaseName string, namespace string, dryRun bool) (err error)
- func UpgradeChart(kubeInfo *client.KubeInfo, releaseName string, namespace string, ...) (*release.Release, error)
- func UpgradeChartFromArchive(kubeInfo *client.KubeInfo, releaseName string, namespace string, ...) (*release.Release, error)
- type ActionConfigFnType
- type ChartInfo
- type ChartInfoFnType
- type ChartStatusFnType
- type CreateReleaseFnType
- type GitGetter
- type HelmOverrides
- type HelmReleaseOpts
- type KeyValue
- type LoadChartFnType
- type RestGetter
Constants ¶
const ReleaseNotFound = "NotFound"
const ReleaseStatusDeployed = "deployed"
const ReleaseStatusFailed = "failed"
Variables ¶
This section is empty.
Functions ¶
func CreateActionConfig ¶
func CreateActionConfig(includeRelease bool, releaseName string, releaseStatus release.Status, createReleaseFn CreateReleaseFnType) (*action.Configuration, error)
func FindLatestChartVersion ¶
FindLatestChartVersion Finds the most recent ChartVersion
func GetAllValues ¶
GetAllValues will run 'helm get values -a' command and return the output from the command.
func GetAllValuesMap ¶
func GetAllValuesMap(kubeInfo *client.KubeInfo, releaseName string, namespace string) (map[string]interface{}, error)
GetAllValuesMap will run 'helm get values -a' command and return the output from the command.
func GetHelmReleaseStatus ¶
func GetHelmReleaseStatus(kubeInfo *client.KubeInfo, releaseName string, namespace string) (string, error)
GetHelmReleaseStatus extracts the Helm deployment status of the specified chart from the JSON output as a string
func GetMetadata ¶
func GetMetadata(kubeInfo *client.KubeInfo, releaseName string, namespace string) (*action.Metadata, error)
GetMetadata will run 'helm get metadata' command and return the output from the command.
func GetRelease ¶
func GetRelease(kubeInfo *client.KubeInfo, releaseName string, namespace string) (*release.Release, error)
GetRelease will run 'helm get all' command and return the output from the command.
func GetReleaseAppVersion ¶
func GetReleaseAppVersion(kubeInfo *client.KubeInfo, releaseName string, namespace string) (string, error)
GetReleaseAppVersion - public function to execute releaseAppVersionFn
func GetReleaseChartVersion ¶
func GetReleaseChartVersion(kubeInfo *client.KubeInfo, releaseName string, namespace string) (string, error)
GetReleaseChartVersion extracts the chart version from a deployed helm release
func GetReleaseStatus ¶
func GetReleaseStatus(kubeInfo *client.KubeInfo, releaseName string, namespace string) (status string, err error)
GetReleaseStatus returns the helmRelease status
func GetReleaseStringValues ¶
func GetReleaseStringValues(kubeInfo *client.KubeInfo, valueKeys []string, releaseName string, namespace string) (map[string]string, error)
GetReleaseStringValues - Returns a subset of Helm helmRelease values as a map of strings
func GetReleaseValues ¶
func GetReleaseValues(kubeInfo *client.KubeInfo, valueKeys []string, releaseName string, namespace string) (map[string]interface{}, error)
GetReleaseValues - Returns a subset of Helm helmRelease values as a map of objects
func GetReleases ¶
func GetReleasesAllNamespaces ¶
GetReleasesAllNamespaces gets the release information over all namespaces In the helm source code, the namespace for the envSettings and the configuration seem to be set to "" when the --all-namespaces flag is used, so I am following that pattern
func GetShowValues ¶
GetShowValues returns the values.yaml file of a particular chart
func GetValues ¶
GetValues will run 'helm get values' command and return the output from the command.
func GetValuesMap ¶
func GetValuesMap(kubeInfo *client.KubeInfo, releaseName string, namespace string) (map[string]interface{}, error)
GetValuesMap will run 'helm get values' command and return the output from the command.
func HelmValueFileConstructor ¶
HelmValueFileConstructor creates a YAML file from a set of key value pairs
func IsReleaseDeployed ¶
func IsReleaseDeployed(kubeInfo *client.KubeInfo, releaseName string, namespace string) (found bool, err error)
IsReleaseDeployed returns true if the helmRelease is deployed
func IsReleaseFailed ¶
IsReleaseFailed Returns true if the chart helmRelease state is marked 'failed'
func IsReleaseInstalled ¶
func IsReleaseInstalled(kubeInfo *client.KubeInfo, releaseName string, namespace string) (found bool, err error)
IsReleaseInstalled returns true if the helmRelease is installed
func MergeValues ¶
func MergeValues(overrides []HelmOverrides, p getter.Providers) (map[string]interface{}, error)
MergeValues merges values from the specified overrides
func NewGitGetter ¶
NewGitGetter constructs a valid git client as a Getter
func NewGitProvider ¶
NewGitProvider returns a provider struct that contains a scheme and a construction for a GitGetter struct
func SetActionConfigFunction ¶
func SetActionConfigFunction(f ActionConfigFnType)
func SetChartInfoFunction ¶
func SetChartInfoFunction(f ChartInfoFnType)
SetChartInfoFunction Override the chart info function for unit testing
func SetDefaultActionConfigFunction ¶
func SetDefaultActionConfigFunction()
SetDefaultActionConfigFunction Resets the action config function
func SetDefaultChartInfoFunction ¶
func SetDefaultChartInfoFunction()
SetDefaultChartInfoFunction Reset the chart info function
func SetDefaultLoadChartFunction ¶
func SetDefaultLoadChartFunction()
func SetLoadChartFunction ¶
func SetLoadChartFunction(f LoadChartFnType)
func Template ¶
func Template(kubeInfo *client.KubeInfo, theChart *chart.Chart, overrides []HelmOverrides, k8sVersion *semver.Version) (string, error)
Template templates a chart using the provided overrides and returns the generated yamls as a string
func Uninstall ¶
func Uninstall(kubeInfo *client.KubeInfo, releaseName string, namespace string, dryRun bool) (err error)
Uninstall will uninstall the helmRelease in the specified namespace using helm uninstall
func UpgradeChart ¶
func UpgradeChart(kubeInfo *client.KubeInfo, releaseName string, namespace string, createNamespace bool, theChart *chart.Chart, wait bool, dryRun bool, overrides []HelmOverrides, resetValues bool) (*release.Release, error)
UpgradeChart installs a release into a cluster or upgrades an existing one.
func UpgradeChartFromArchive ¶
func UpgradeChartFromArchive(kubeInfo *client.KubeInfo, releaseName string, namespace string, createNamespace bool, archive io.Reader, wait bool, dryRun bool, overrides []HelmOverrides, resetValues bool) (*release.Release, error)
UpgradeChartFromArchive installs a release into a cluster or upgrades an existing one. The reader must be a compressed tar archive.
Types ¶
type ActionConfigFnType ¶
type ChartInfo ¶
type ChartInfo struct { APIVersion string Description string Name string Version string AppVersion string }
ChartInfo contains Helm Chart.yaml data
func GetChartInfo ¶
GetChartInfo - public entry point
type ChartInfoFnType ¶
ChartInfoFnType - Package-level var and functions to allow overriding getReleaseState for unit test purposes
type ChartStatusFnType ¶
ChartStatusFnType - Package-level var and functions to allow overriding GetChartStatus for unit test purposes
type CreateReleaseFnType ¶
type GitGetter ¶
type GitGetter struct { }
GitGetter is a struct that implements the Getter interface
func (GitGetter) Get ¶
Get goes to a url in the format of git+http[s]://provider/organization/repo&/path-to-file?[tag,branch,commit]=value or in the format of git+ssh://username@provider/organization/repo&/path-to-file?[tag,branch,commit]=value and clones that repo, opens it in memory and returns the contents of the specified file This format was inspired from https://github.com/aslafy-z/helm-git
type HelmOverrides ¶
type HelmOverrides struct { LiteralOverride string // literal yaml SetOverrides string // for --set SetStringOverrides string // for --set-string SetFileOverrides string // for --set-file FileOverride string // for -f }
HelmOverrides contains all the overrides that gets passed to the helm cli runner
type HelmReleaseOpts ¶
type KeyValue ¶
type KeyValue struct { Key string Value string SetString bool // for --set-string SetFile bool // for --set-file IsFile bool // for -f }
KeyValue defines the Key, Value pair used to override a single helm Value
type RestGetter ¶
type RestGetter struct {
// contains filtered or unexported fields
}