Documentation ¶
Index ¶
- func ApplyChanges(ctx context.Context, rc *ReleaseContext, updates []*update.WorkloadUpdate, ...) error
- func MakeReleaseError(err error) *fluxerr.Error
- func Release(ctx context.Context, rc *ReleaseContext, changes Changes, logger log.Logger) (results update.Result, err error)
- func VerifyChanges(before map[string]resource.Resource, updates []*update.WorkloadUpdate, ...) error
- type Changes
- type ReleaseContext
- func (rc *ReleaseContext) GetAllResources(ctx context.Context) (map[string]resource.Resource, error)
- func (rc *ReleaseContext) Registry() registry.Registry
- func (rc *ReleaseContext) SelectWorkloads(ctx context.Context, results update.Result, ...) ([]*update.WorkloadUpdate, error)
- func (rc *ReleaseContext) WorkloadsForUpdate(ctx context.Context) (map[resource.ID]*update.WorkloadUpdate, error)
- func (rc *ReleaseContext) WriteUpdates(ctx context.Context, updates []*update.WorkloadUpdate) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyChanges ¶
func ApplyChanges(ctx context.Context, rc *ReleaseContext, updates []*update.WorkloadUpdate, logger log.Logger) error
func MakeReleaseError ¶
Types ¶
type Changes ¶
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 ¶
type ReleaseContext struct {
// contains filtered or unexported fields
}
func NewReleaseContext ¶
func (*ReleaseContext) GetAllResources ¶
func (*ReleaseContext) Registry ¶
func (rc *ReleaseContext) Registry() registry.Registry
func (*ReleaseContext) SelectWorkloads ¶
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 ¶
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 ¶
func (rc *ReleaseContext) WriteUpdates(ctx context.Context, updates []*update.WorkloadUpdate) error
Click to show internal directories.
Click to hide internal directories.