This section is empty.


This section is empty.


func Manifold

func Manifold(config ManifoldConfig) dependency.Manifold

Manifold returns a dependency manifold that runs an upgrader worker, using the resource names defined in the supplied config.


type CAASOperatorUpgrader

type CAASOperatorUpgrader interface {
	Upgrade(agentTag string, v version.Number) error

type Config

type Config struct {
	UpgraderClient              UpgraderClient
	CAASOperatorUpgrader        CAASOperatorUpgrader
	AgentTag                    names.Tag
	OrigAgentVersion            version.Number
	UpgradeStepsWaiter          gate.Waiter
	InitialUpgradeCheckComplete gate.Unlocker

Config contains the items the worker needs to start.

type ManifoldConfig

type ManifoldConfig struct {
	AgentName            string
	APICallerName        string
	UpgradeStepsGateName string
	UpgradeCheckGateName string
	PreviousAgentVersion version.Number

ManifoldConfig defines the names of the manifolds on which a Manifold will depend.

type Upgrader

type Upgrader struct {
	// contains filtered or unexported fields

Upgrader represents a worker that watches the state for upgrade requests for a given CAAS agent.

func NewUpgrader

func NewUpgrader(config Config) (*Upgrader, error)

NewUpgrader returns a new upgrader worker. It watches changes to the current version of a CAAS agent. If an upgrade is needed, the worker updates the docker image version for the specified agent. TODO(caas) - support HA controllers

func (*Upgrader) Kill

func (u *Upgrader) Kill()

Kill implements worker.Worker.Kill.

func (*Upgrader) Wait

func (u *Upgrader) Wait() error

Wait implements worker.Worker.Wait.

type UpgraderClient

type UpgraderClient interface {
	DesiredVersion(tag string) (version.Number, error)
	SetVersion(tag string, v version.Binary) error
	WatchAPIVersion(agentTag string) (watcher.NotifyWatcher, error)

UpgraderClient provides the facade methods used by the worker.