flux: github.com/weaveworks/flux/pkg/release Index | Files

package release

import "github.com/weaveworks/flux/pkg/release"


Package Files

context.go errors.go releaser.go

func ApplyChanges Uses

func ApplyChanges(ctx context.Context, rc *ReleaseContext, updates []*update.WorkloadUpdate, logger log.Logger) error

func MakeReleaseError Uses

func MakeReleaseError(err error) *fluxerr.Error

func Release Uses

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

func VerifyChanges Uses

func VerifyChanges(before map[string]resource.Resource, updates []*update.WorkloadUpdate, 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`.

type Changes Uses

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

type ReleaseContext Uses

type ReleaseContext struct {
    // contains filtered or unexported fields

func NewReleaseContext Uses

func NewReleaseContext(cluster cluster.Cluster, resourceStore manifests.Store, registry registry.Registry) *ReleaseContext

func (*ReleaseContext) GetAllResources Uses

func (rc *ReleaseContext) GetAllResources(ctx context.Context) (map[string]resource.Resource, error)

func (*ReleaseContext) Registry Uses

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

func (*ReleaseContext) SelectWorkloads Uses

func (rc *ReleaseContext) SelectWorkloads(ctx context.Context, results update.Result, prefilters,
    postfilters []update.WorkloadFilter) ([]*update.WorkloadUpdate, error)

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

func (*ReleaseContext) WorkloadsForUpdate Uses

func (rc *ReleaseContext) WorkloadsForUpdate(ctx context.Context) (map[resource.ID]*update.WorkloadUpdate, error)

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

func (*ReleaseContext) WriteUpdates Uses

func (rc *ReleaseContext) WriteUpdates(ctx context.Context, updates []*update.WorkloadUpdate) error

Package release imports 12 packages (graph). Updated 2020-09-20. Refresh now. Tools for package owners.