release

package
v0.0.0-...-d1b097e Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyChanges

func ApplyChanges(rc *ReleaseContext, updates []*update.ControllerUpdate, logger log.Logger) error

func MakeReleaseError

func MakeReleaseError(err error) *fluxerr.Error

func Release

func Release(rc *ReleaseContext, changes Changes, logger log.Logger) (results update.Result, err error)

func VerifyChanges

func VerifyChanges(before map[string]resource.Resource, updates []*update.ControllerUpdate, after map[string]resource.Resource) error

VerifyChanges checks that the `after` resources are exactly the `before` resources with the updates applied. It destructively updates `before`.

Types

type Changes

type Changes interface {
	CalculateRelease(update.ReleaseContext, log.Logger) ([]*update.ControllerUpdate, update.Result, error)
	ReleaseKind() update.ReleaseKind
	ReleaseType() update.ReleaseType
	CommitMessage(update.Result) string
}

type ReleaseContext

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

func (*ReleaseContext) LoadManifests

func (rc *ReleaseContext) LoadManifests() (map[string]resource.Resource, error)

func (*ReleaseContext) Registry

func (rc *ReleaseContext) Registry() registry.Registry

func (*ReleaseContext) SelectServices

func (rc *ReleaseContext) SelectServices(results update.Result, prefilters, postfilters []update.ControllerFilter) ([]*update.ControllerUpdate, error)

SelectServices finds the services that exist both in the definition files and the running cluster. `ControllerFilter`s can be provided to filter the controllers so found, either before (`prefilters`) or after (`postfilters`) consulting the cluster.

func (*ReleaseContext) WorkloadsForUpdate

func (rc *ReleaseContext) WorkloadsForUpdate() (map[flux.ResourceID]*update.ControllerUpdate, error)

WorkloadsForUpdate collects all workloads defined in manifests and prepares a list of controller updates for each of them. It does not consider updatability.

func (*ReleaseContext) WriteUpdates

func (rc *ReleaseContext) WriteUpdates(updates []*update.ControllerUpdate) error

Jump to

Keyboard shortcuts

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