Documentation ¶
Index ¶
- func ListActiveReleases() []*rspb.Release
- type Action
- type Event
- func (e *Event) GetAction() Action
- func (e *Event) GetAppDescription() string
- func (e *Event) GetAppName() string
- func (e *Event) GetAppVersion() string
- func (e *Event) GetChartVersion() string
- func (e *Event) GetConfigDiffYAML() string
- func (e *Event) GetLabelsModifiedAtTimestamp() meta_v1.Time
- func (e *Event) GetNamespace() string
- func (e *Event) GetNotes() string
- func (e *Event) GetPreviousAppVersion() string
- func (e *Event) GetPreviousChartVersion() string
- func (e *Event) GetRelease(secretName string) *rspb.Release
- func (e *Event) GetReleaseDescription() string
- func (e *Event) GetSecretCreationTimestamp() meta_v1.Time
- func (e *Event) GetSecretUID() kbtypes.UID
- func (e *Event) Init() error
- func (e *Event) IsAppVersionChanged() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ListActiveReleases ¶
ListActiveReleases lists releases which have not been superseded by an upgrade, rollback or other operation.
Types ¶
type Action ¶
type Action string
Action describes the action that was taken by Helm. For example, it could be an install or an uninstall (delete) action. There are typically two phases to each action, pre and post. This can best be demonstrated by using helm ... --wait. Helm will create a release to mark the start of the action (pre) and update it to mark the end of the action (post).
const ( ActionPreInstall Action = "PRE_INSTALL" ActionPreRollback Action = "PRE_ROLLBACK" ActionPreUpgrade Action = "PRE_UPGRADE" ActionPostInstall Action = "POST_INSTALL" ActionPostUpgrade Action = "POST_UPGRADE" ActionPostRollback Action = "POST_ROLLBACK" // Because string matching is a dangerous game, we should have a fallback for times we // can't tell if the operation was an Upgrade or a Rollback. ActionPostReplace Action = "POST_REPLACE" ActionPostReplaceSuperseded Action = "POST_REPLACE-SUPERSEDED" ActionPreUninstall Action = "PRE_UNINSTALL" ActionFailedInstall Action = "FAILED_INSTALL" ActionFailedReplace Action = "FAILED_REPLACE" )
All possible actions and their states. See helm/pkg/release/status.go for more details.
type Event ¶
type Event struct { // Describes the action that happened to the secret in order to trigger this event. Events // occur when secrets are created, updated or deleted. What was the action that led to this // particular event. SecretAction string CurrentReleaseSecret *api_v1.Secret // contains filtered or unexported fields }
Event marks a release event. Upgrading a Helm chart from one version to another is an example of an event. Installing a chart is a different type of event.
func (*Event) GetAction ¶
GetAction returns the action which is being performed in this Event. It may be an install, upgrade or other Event.
func (*Event) GetAppDescription ¶
GetAppDescription returns the description of the application being installed or upgraded.
func (*Event) GetAppName ¶
GetAppName returns the name of the application being installed by the Helm chart.
func (*Event) GetAppVersion ¶
GetAppVersion returns the version of the application being installed by the Helm chart.
func (*Event) GetChartVersion ¶
GetChartVersion returns the version of the Helm chart being installed. This is different than the version of the application being installed. The same application version may span multiple chart versions.
func (*Event) GetConfigDiffYAML ¶
GetConfigDiffYAML is useful to show what has changed during a chart upgrade or rollback. It will show a diff of the values file in the Slack message or other notification. Be careful with secrets.
func (*Event) GetLabelsModifiedAtTimestamp ¶
GetLabelsModifiedAtTimestamp returns the modifiedAt time in the release Meta. It's stored in the release as an Int and thus must be converted to a meta_v1.Time so it can be more easily compared with the creation timestamp.
func (*Event) GetNamespace ¶
GetNamespace returns the namespace that the event is occurring in.
func (*Event) GetNotes ¶
GetNotes returns the install notes of the Helm package being installed or upgraded.
func (*Event) GetPreviousAppVersion ¶
GetPreviousAppVersion returns the version of the application being superseeded by the current upgrade event. It can be used to send notifications like "upgrading X from version 1 to version 2"
func (*Event) GetPreviousChartVersion ¶
GetPreviousChartVersion returns the version of the previously installed Helm chart. This is useful during an upgrade when we wish to see how significant the upgrade is.
func (*Event) GetRelease ¶
GetRelease retrieves a release object from the Kubernetes Secret store. It delegates to the Helm Driver for this operation in order to reduce the possibility of breaking changes.
func (*Event) GetReleaseDescription ¶
GetReleaseDescription returns the Description of the release. This is primarily useful because it contains information about the cause of failure when a failure occurs.
func (*Event) GetSecretCreationTimestamp ¶
GetSecretCreationTimestamp returns the time that the release secret was created by Helm. Note that it returns a custom Time object which is defined in the Kubernetes meta_v1 API. It's not an instance of the standard go Time struct.
func (*Event) GetSecretUID ¶
GetSecretUID returns the UID of the release secret. Note that it returns a custom struct which is defined in the Kubernetes library. It's not a string or suchlike.
func (*Event) Init ¶
Init pre-loads data for the event.
- Brand new installs will only have e.currentRelease.
- Upgrades, rollbacks and uninstalls will have e.currentRelease and e.previousRelease (unless they have been deleted by the user or something)
func (*Event) IsAppVersionChanged ¶
IsAppVersionChanged makes it easy to tell if the application is upgraded when upgrading from one Helm Chart version to another.