Documentation ¶
Index ¶
- func GetProfileValues(ch chart.Chart, profileName string) (map[string]interface{}, error)
- type Client
- func (hc *Client) InstallRelease(chartDir string, nn NamespacedName, overrideValues overrides.Map, ...) (*Release, error)
- func (hc *Client) IsReleaseDeletable(nn NamespacedName) (bool, error)
- func (hc *Client) IsReleasePresent(nn NamespacedName) (bool, error)
- func (hc *Client) ListReleases() ([]*Release, error)
- func (hc *Client) PrintOverrides(values overrides.Map, relName string, action string)
- func (hc *Client) PrintRelease(release *Release)
- func (hc *Client) ReleaseDeployedRevision(nn NamespacedName) (int, error)
- func (hc *Client) ReleaseStatus(nn NamespacedName) (*ReleaseStatus, error)
- func (hc *Client) RollbackRelease(nn NamespacedName, revision int) error
- func (hc *Client) UninstallRelease(nn NamespacedName) error
- func (hc *Client) UpgradeRelease(chartDir string, nn NamespacedName, overrideValues overrides.Map, ...) (*Release, error)
- func (hc *Client) WaitForCondition(nn NamespacedName, pf WaitPredicateFunc, opts ...WaitOption) (bool, error)
- func (hc *Client) WaitForReleaseDelete(nn NamespacedName) (bool, error)
- func (hc *Client) WaitForReleaseRollback(nn NamespacedName) (bool, error)
- type ClientInterface
- type NamespacedName
- type Release
- type ReleaseMeta
- type ReleaseStatus
- type Status
- type UninstallReleaseStatus
- type WaitOption
- type WaitPredicateFunc
- type WaitReleaseStatusFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a Helm client
func (*Client) InstallRelease ¶
func (hc *Client) InstallRelease(chartDir string, nn NamespacedName, overrideValues overrides.Map, profile string) (*Release, error)
InstallRelease installs a Helm chart
func (*Client) IsReleaseDeletable ¶
func (hc *Client) IsReleaseDeletable(nn NamespacedName) (bool, error)
IsReleaseDeletable returns true for release that can be deleted
func (*Client) IsReleasePresent ¶
func (hc *Client) IsReleasePresent(nn NamespacedName) (bool, error)
IsReleasePresent returns true for release that cis present on the cluster
func (*Client) ListReleases ¶
ListReleases lists all releases except for the superseded ones
func (*Client) PrintOverrides ¶
PrintOverrides .
func (*Client) ReleaseDeployedRevision ¶
func (hc *Client) ReleaseDeployedRevision(nn NamespacedName) (int, error)
ReleaseDeployedRevision returns the last deployed revision
func (*Client) ReleaseStatus ¶
func (hc *Client) ReleaseStatus(nn NamespacedName) (*ReleaseStatus, error)
ReleaseStatus returns release status
func (*Client) RollbackRelease ¶
func (hc *Client) RollbackRelease(nn NamespacedName, revision int) error
RollbackRelease performs rollback of a Helm release
func (*Client) UninstallRelease ¶
func (hc *Client) UninstallRelease(nn NamespacedName) error
UninstallRelease uninstalls a Helm release
func (*Client) UpgradeRelease ¶
func (hc *Client) UpgradeRelease(chartDir string, nn NamespacedName, overrideValues overrides.Map, profile string) (*Release, error)
UpgradeRelease upgrades a Helm chart
func (*Client) WaitForCondition ¶
func (hc *Client) WaitForCondition(nn NamespacedName, pf WaitPredicateFunc, opts ...WaitOption) (bool, error)
WaitForCondition returns true if condition was fulfilled within configured time, returns false otherwise. Returns an error immediately if the configured predicate function returns an error.
func (*Client) WaitForReleaseDelete ¶
func (hc *Client) WaitForReleaseDelete(nn NamespacedName) (bool, error)
func (*Client) WaitForReleaseRollback ¶
func (hc *Client) WaitForReleaseRollback(nn NamespacedName) (bool, error)
type ClientInterface ¶
type ClientInterface interface { ListReleases() ([]*Release, error) IsReleaseDeletable(nn NamespacedName) (bool, error) IsReleasePresent(nn NamespacedName) (bool, error) ReleaseDeployedRevision(nn NamespacedName) (int, error) InstallRelease(chartDir string, nn NamespacedName, overrides overrides.Map, profile string) (*Release, error) UpgradeRelease(chartDir string, nn NamespacedName, overrides overrides.Map, profile string) (*Release, error) UninstallRelease(nn NamespacedName) error RollbackRelease(nn NamespacedName, revision int) error WaitForReleaseDelete(nn NamespacedName) (bool, error) WaitForReleaseRollback(nn NamespacedName) (bool, error) PrintRelease(release *Release) }
ClientInterface exposes functions to interact with Helm
type NamespacedName ¶
NamespacedName Combines release name and namespace
type Release ¶
type Release struct { *ReleaseMeta *ReleaseStatus }
Release is an internal representation of a Helm release
type ReleaseMeta ¶
type ReleaseMeta struct { NamespacedName Description string }
ReleaseMeta is an internal representation of Helm's release metadata
type ReleaseStatus ¶
ReleaseStatus is an internal representation of Helm's release status
func (*ReleaseStatus) IsUpgradeStep ¶
func (rs *ReleaseStatus) IsUpgradeStep() (bool, error)
type Status ¶
type Status string
const ( // StatusUnknown indicates that a release is in an uncertain state. StatusUnknown Status = "unknown" // StatusDeployed indicates that the release has been pushed to Kubernetes. StatusDeployed Status = "deployed" // StatusUninstalled indicates that a release has been uninstalled from Kubernetes. StatusUninstalled Status = "uninstalled" // StatusSuperseded indicates that this release object is outdated and a newer one exists. StatusSuperseded Status = "superseded" // StatusFailed indicates that the release was not successfully deployed. StatusFailed Status = "failed" // StatusUninstalling indicates that a uninstall operation is underway. StatusUninstalling Status = "uninstalling" // StatusPendingInstall indicates that an install operation is underway. StatusPendingInstall Status = "pending-install" // StatusPendingUpgrade indicates that an upgrade operation is underway. StatusPendingUpgrade Status = "pending-upgrade" // StatusPendingRollback indicates that an rollback operation is underway. StatusPendingRollback Status = "pending-rollback" )
type UninstallReleaseStatus ¶
type UninstallReleaseStatus struct { }
UninstallReleaseResponse is an internal representation of Helm's uninstall release response
type WaitOption ¶
type WaitOption func(*waitConditionCfg)
func MaxIterations ¶
func MaxIterations(val uint8) WaitOption
func ReleaseStatusFunc ¶
func ReleaseStatusFunc(val WaitReleaseStatusFunc) WaitOption
func SleepTimeSecs ¶
func SleepTimeSecs(val uint8) WaitOption
type WaitPredicateFunc ¶
type WaitPredicateFunc func(releaseStatus *ReleaseStatus, relStatusResponseErr error) (bool, error)
type WaitReleaseStatusFunc ¶
type WaitReleaseStatusFunc func(nn NamespacedName) (*ReleaseStatus, error)