deployment

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 6, 2017 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAnnotationIntegerValue

func GetAnnotationIntegerValue(obj *metav1.ObjectMeta, annotationName string, defaultValue int) int

GetAnnotationIntegerValue returns the value from annotation as integer

func GetSchedule

func GetSchedule(deployments []*extensionsv1.Deployment, readyClusters []*v1beta1.Cluster) ([]*extensionsv1.Deployment, error)

GetSchedule figures out how given deployment should be distributed across ready cluster

func StartDeploymentController

func StartDeploymentController(cController *cluster.ClusterController, config *restclient.Config, stopChan <-chan struct{}, minimizeLatency bool)

StartDeploymentController starts a new deployment controller

Types

type ClusterData

type ClusterData struct {
	Name          string
	TotalCapacity int
	UsedCapacity  int
	Priority      int
	Labels        map[string]string
}

ClusterData holds extracted cluster capacity data

type DeploymentController

type DeploymentController struct {
	// contains filtered or unexported fields
}

DeploymentController provides for distribution of deployment

func (*DeploymentController) Run

func (dc *DeploymentController) Run(stopChan <-chan struct{})

Run begins watching and syncing.

type DeploymentData

type DeploymentData struct {
	Name                string
	Replicas            int
	UnscheduledReplicas int
	Annotations         map[string]string
}

DeploymentData holds extracted deployment distribution data

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL