application

package
v0.10.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 7, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConditionsShouldDiscardTimestamps = false

Functions

func ChartVersionResolved added in v0.5.0

func ChartVersionResolved(app *shipper.Application) bool

func CopyEnvironment

func CopyEnvironment(app *shipper.Application, rel *shipper.Release)

func GetContender

func GetContender(appName string, rels []*shipper.Release) (*shipper.Release, error)

GetContender returns the contender from the given Release slice. The slice is expected to be sorted by descending generation.

func GetHighestObservedGeneration

func GetHighestObservedGeneration(app *shipper.Application) (int, error)

func GetIncumbent

func GetIncumbent(appName string, rels []*shipper.Release) (*shipper.Release, error)

GetIncumbent returns the incumbent from the given Release slice. The slice is expected to be sorted by descending generation.

An incumbent release is the first release in this slice that is considered completed.

func NewApplicationCondition

func NewApplicationCondition(condType shipper.ApplicationConditionType, status coreV1.ConditionStatus, reason, message string) *shipper.ApplicationCondition

func ReleasesToApplicationHistory

func ReleasesToApplicationHistory(releases []*shipper.Release) []string

ReleasesToApplicationHistory transforms the given Release slice into a string slice sorted by descending generation, suitable to be used set in ApplicationStatus.History.

func ResolveChartVersion added in v0.5.0

func ResolveChartVersion(app *shipper.Application, resolver shipperrepo.ChartVersionResolver) (*repo.ChartVersion, error)

This function modifies app object and populates it's annotations. The changes are not saved immediately and are delegated to the caller.

func SetApplicationCondition

func SetApplicationCondition(status *shipper.ApplicationStatus, condition shipper.ApplicationCondition) diff.Diff

func SetHighestObservedGeneration

func SetHighestObservedGeneration(app *shipper.Application, generation int)

func UpdateChartNameAnnotation added in v0.5.0

func UpdateChartNameAnnotation(app *shipper.Application, name string)

func UpdateChartVersionRawAnnotation added in v0.5.0

func UpdateChartVersionRawAnnotation(app *shipper.Application, version string)

func UpdateChartVersionResolvedAnnotation added in v0.5.0

func UpdateChartVersionResolvedAnnotation(app *shipper.Application, version string)

Types

type ApplicationConditionDiff added in v0.7.0

type ApplicationConditionDiff struct {
	// contains filtered or unexported fields
}

func NewApplicationConditionDiff added in v0.7.0

func NewApplicationConditionDiff(c1, c2 *shipper.ApplicationCondition) *ApplicationConditionDiff

func (*ApplicationConditionDiff) IsEmpty added in v0.7.0

func (d *ApplicationConditionDiff) IsEmpty() bool

func (*ApplicationConditionDiff) String added in v0.7.0

func (d *ApplicationConditionDiff) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL