Documentation
¶
Index ¶
- Constants
- func NewRelease(name, namespace string, revision int, deployType common.DeployType, ...) (helmrel.Accessor, error)
- func ReleaseToResourceSpecs(ctx context.Context, rel helmrel.Accessor, releaseNamespace string) ([]*spec.ResourceSpec, error)
- func ReleaserToV1Release(releaser helmrel.Releaser) (*helmrelease.Release, error)
- func ReleaserVersion(releaser helmrel.Releaser) string
- type Historier
- type History
- func (h *History) CreateRelease(ctx context.Context, rel helmrel.Accessor) error
- func (h *History) DeleteRelease(ctx context.Context, name string, revision int) error
- func (h *History) Release(ctx context.Context, version int) (helmrel.Accessor, error)
- func (h *History) Revisions() []Revision
- func (h *History) UpdateRelease(ctx context.Context, rel helmrel.Accessor) error
- type IsReleaseUpToDateResult
- type ReleaseOptions
- type ReleaseOutdatedReason
- type ReleaseStorageOptions
- type ReleaseStorager
- type Revision
- type VersionedRelease
Constants ¶
View Source
const ( ReleaseVersionV1 = "v1" ReleaseVersionV2 = "v2" )
Variables ¶
This section is empty.
Functions ¶
func NewRelease ¶
func NewRelease(name, namespace string, revision int, deployType common.DeployType, resources []*spec.ResourceSpec, chrt chart.Accessor, releaseConfig map[string]interface{}, opts ReleaseOptions) (helmrel.Accessor, error)
Construct Helm release.
func ReleaseToResourceSpecs ¶
func ReleaseToResourceSpecs(ctx context.Context, rel helmrel.Accessor, releaseNamespace string) ([]*spec.ResourceSpec, error)
Constructs ResourceSpecs from a Release object.
func ReleaserToV1Release ¶
func ReleaserToV1Release(releaser helmrel.Releaser) (*helmrelease.Release, error)
func ReleaserVersion ¶
Types ¶
type History ¶
type History struct {
// contains filtered or unexported fields
}
func BuildHistory ¶
func (*History) CreateRelease ¶
func (*History) DeleteRelease ¶
type IsReleaseUpToDateResult ¶
type IsReleaseUpToDateResult struct {
Reason ReleaseOutdatedReason
UpToDate bool
}
func IsReleaseUpToDate ¶
func IsReleaseUpToDate(oldRel, newRel helmrel.Accessor) (IsReleaseUpToDateResult, error)
Check if the new Release is up-to-date compared to the old Release. It doesn't check any resources of the release in the cluster, just compares Release objects.
type ReleaseOptions ¶
type ReleaseOutdatedReason ¶
type ReleaseOutdatedReason string
const ( ReleaseOutdatedReasonNone ReleaseOutdatedReason = "" ReleaseOutdatedReasonNoPreviousRelease ReleaseOutdatedReason = "there is no previously deployed release" ReleaseOutdatedReasonReleaseStatusNotDeployed ReleaseOutdatedReason = "the previously deployed release was not successful" ReleaseOutdatedReasonNotesChanged ReleaseOutdatedReason = "the release notes changed" ReleaseOutdatedReasonValuesChanged ReleaseOutdatedReason = "the release values changed" ReleaseOutdatedReasonHooksChanged ReleaseOutdatedReason = "the release hooks changed" ReleaseOutdatedReasonManifestsChanged ReleaseOutdatedReason = "the release manifests changed" )
type ReleaseStorageOptions ¶
type ReleaseStorager ¶
type ReleaseStorager interface {
Create(rls helmrel.Accessor) error
Update(rls helmrel.Accessor) error
UpdateLabels(name string, version int, labels map[string]string) error
Delete(ctx context.Context, name string, version int) error
Query(labels map[string]string) ([]helmrel.Accessor, error)
// GetRelease returns a single release revision. version == 0 means the latest revision.
GetRelease(name string, version int) (helmrel.Accessor, error)
// ListLatestReleases returns the highest revision of every stored release.
ListLatestReleases(ctx context.Context) ([]helmrel.Accessor, error)
// Revisions returns version and status of every revision of the named release.
Revisions(ctx context.Context, name string) ([]Revision, error)
}
func NewReleaseStorage ¶
func NewReleaseStorage(ctx context.Context, namespace, storageDriver string, clientFactory kube.ClientFactorier, opts ReleaseStorageOptions) (ReleaseStorager, error)
type Revision ¶
type Revision struct {
Name string `json:"name"`
Namespace string `json:"namespace"`
Status string `json:"status"`
Version int `json:"version"`
}
func DeployedRevisions ¶
DeployedRevisions expects revisions sorted by ascending Version.
func NewRevisionFromAccessor ¶
type VersionedRelease ¶
func (*VersionedRelease) MarshalJSON ¶
func (r *VersionedRelease) MarshalJSON() ([]byte, error)
func (*VersionedRelease) UnmarshalJSON ¶
func (r *VersionedRelease) UnmarshalJSON(data []byte) error
Click to show internal directories.
Click to hide internal directories.