Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterResource ¶
func RegisterResource(r *ResourceManager)
Types ¶
type App ¶
type App struct { Name string ChangeSets map[ImageIdentifier]*ChangeSet }
App is a group of images mapped to containers within resources in the app
func (*App) GetChangeSets ¶
GetChangeSets returns all changesets in the App
type AppManager ¶
type AppManager struct { ClientSet kubernetes.Interface Namespace string Apps map[string]*App Managers map[string]*ResourceManager }
AppManager finds and updates Applications and their deployments and cronjobs
func NewAppManager ¶
func NewAppManager(namespace string) (*AppManager, error)
NewAppManager creates a new Image manager
func (*AppManager) AddContainer ¶
func (mgr *AppManager) AddContainer(kind string, container Container)
AddContainer adds the specified container, from a resource of the specified kind To the appropriate app
func (*AppManager) Scan ¶
func (mgr *AppManager) Scan() error
Scan the cluster and find all resources and containers we manage
func (*AppManager) SetLatest ¶
func (mgr *AppManager) SetLatest(registry, repository, version string)
SetLatest calls SetLatest on all contained apps Setting the version on all relevant containers
type ChangeSet ¶
type ChangeSet struct { ImageID ImageIdentifier NeedsUpdate bool UpdateTo Version Containers map[string][]Container // Map of Kinds to lists of containers }
ChangeSet contains resources that share an image identifier
func NewChangeSet ¶
func NewChangeSet(ID ImageIdentifier) *ChangeSet
NewChangeSet creates a new changeset
func (*ChangeSet) AddContainer ¶
func (*ChangeSet) RegistryPath ¶
RegistryPath returns the full registry path to which all images in the changeset should use
func (*ChangeSet) SetLatest ¶
SetLatest sets the latest version, and checks if this changeset requires update Uses SemVer to perform comparisons if possible, otherwise falls back to string equality comparison.
func (*ChangeSet) Upgrade ¶
func (cs *ChangeSet) Upgrade(mgr *AppManager) error
Upgrade all of the resources in this changeset, using the managers in the appmanager
type Container ¶
type Container struct { ContainerID ContainerIdentifier ImageID ImageIdentifier App string Current Version }
Container represents a container
type ContainerIdentifier ¶
ContainerIdentifier is a unique identifier for a container
type ImageIdentifier ¶
ImageIdentifier images are identified by their repo and registry
type ResourceManager ¶
type ResourceManager struct { Kind string Resources func(mgr *AppManager) ([]interface{}, error) Generator func(item interface{}) []Container Upgrade func(mgr *AppManager, image *ChangeSet, resource Container) error }