Documentation ¶
Index ¶
- Variables
- func GetDeploymentWatchList() *list.List
- func RemoveFromDeploymentWatchList(d *Deployment)
- type Deployment
- func (d *Deployment) DeploymentComplete(newd *apps_v1.Deployment) bool
- func (d *Deployment) IsObservedGenerationSame() bool
- func (d *Deployment) MetricsHandler(rate float64)
- func (d *Deployment) SaveCurrentDeploymentState() error
- func (d *Deployment) ShouldWatch() bool
- func (d *Deployment) StartWatch(m metricsservice.MetricsSevrice)
- func (d *Deployment) StopWatch(remove bool)
- func (d *Deployment) WatchDoneHandler(remove bool) error
Constants ¶
This section is empty.
Variables ¶
var WatchList = list.New()
WatchList contain all active deployments
Functions ¶
func GetDeploymentWatchList ¶
GetDeploymentWatchList returns the WatchList
func RemoveFromDeploymentWatchList ¶
func RemoveFromDeploymentWatchList(d *Deployment)
RemoveFromDeploymentWatchList - remove a deployment from the WatchList
Types ¶
type Deployment ¶
type Deployment struct { Name string NameSpace string Threshold int Watching bool IsRollback bool // contains filtered or unexported fields }
Deployment holds deployment info & status
func NewDeploymentController ¶
func NewDeploymentController(kubeClient kubernetes.Interface, current *apps_v1.Deployment, new *apps_v1.Deployment, threshold int) *Deployment
NewDeploymentController - crteate a New DeploymentController
func (*Deployment) DeploymentComplete ¶
func (d *Deployment) DeploymentComplete(newd *apps_v1.Deployment) bool
DeploymentComplete - return true if deployment id sone
func (*Deployment) IsObservedGenerationSame ¶
func (d *Deployment) IsObservedGenerationSame() bool
IsObservedGenerationSame - any change between deployments?
func (*Deployment) MetricsHandler ¶
func (d *Deployment) MetricsHandler(rate float64)
MetricsHandler - callback for the metrics watcher
func (*Deployment) SaveCurrentDeploymentState ¶
func (d *Deployment) SaveCurrentDeploymentState() error
SaveCurrentDeploymentState - store image version of current deployment as an annotation
func (*Deployment) ShouldWatch ¶
func (d *Deployment) ShouldWatch() bool
ShouldWatch do we have containers to watch
func (*Deployment) StartWatch ¶
func (d *Deployment) StartWatch(m metricsservice.MetricsSevrice)
StartWatch - start the metrcis watcher
func (*Deployment) StopWatch ¶
func (d *Deployment) StopWatch(remove bool)
StopWatch - stop the metrics watcher
func (*Deployment) WatchDoneHandler ¶
func (d *Deployment) WatchDoneHandler(remove bool) error
WatchDoneHandler - called by metrics watcher when it's done