operator

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 16, 2017 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const AppMonitorAnnotation string = "app-monitor.kubedemo.com/monitor"
View Source
const AppMonitorAnnotationRedeployInProgress string = "app-monitor.kubedemo.com/redeploy-in-progress"
View Source
const Description string = "Allow user to create an app monitor to supervise the app and the resources it needs."
View Source
const Domain string = "kubedemo.com"
View Source
const ResourceName string = "appmonitor"
View Source
const ResourceNamePlural string = "appmonitors"
View Source
const TPRName string = "app-monitor"
View Source
const Version string = "v1"

Variables

This section is empty.

Functions

func ListAppMonitorsWithClient

func ListAppMonitorsWithClient(kubecfg *rest.Config, namespace string)

List all AppMonitors in the cluster.

Types

type AppMonitor

type AppMonitor struct {
	// TODO: add Name field for AppMonitor as its currently missing
	unversioned.TypeMeta `json:",inline"`
	Metadata             api.ObjectMeta `json:"metadata"`

	Spec AppMonitorSpec `json:"spec"`
}

func CopyObjToAppMonitor

func CopyObjToAppMonitor(obj interface{}) (*AppMonitor, error)

Create a deep-copy of an AppMonitor object

func CopyObjToAppMonitors

func CopyObjToAppMonitors(obj []interface{}) ([]AppMonitor, error)

Attempt to deep copy an empty interface into an AppMonitorList.

func NewAppMonitor

func NewAppMonitor(name string, memThresholdPercent, memMultiplier float64) *AppMonitor

func (*AppMonitor) GetObjectKind

func (am *AppMonitor) GetObjectKind() unversioned.ObjectKind

Required to satisfy Object interface

func (*AppMonitor) GetObjectMeta

func (am *AppMonitor) GetObjectMeta() meta.Object

Required to satisfy ObjectMetaAccessor interface

func (*AppMonitor) Instantiate

func (am *AppMonitor) Instantiate(kubecfg, namespace string) error

Instantiate an AppMonitor in the cluster.

func (*AppMonitor) UnmarshalJSON

func (am *AppMonitor) UnmarshalJSON(data []byte) error

type AppMonitorController

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

Implements an AppMonitor's controller loop in a particular namespace. The controller makes use of an Informer resource to locally cache resources managed, and handle events on the resources.

func NewAppMonitorController

func NewAppMonitorController(kubeconfig, namespace, prometheusAddr string) (
	*AppMonitorController, error)

Create a new Controller for the AppMonitor operator

func (*AppMonitorController) Run

func (amc *AppMonitorController) Run(stop <-chan struct{})

Run begins the AppMonitorController.

func (*AppMonitorController) Start

func (amc *AppMonitorController) Start(stop <-chan struct{})

Start the AppMonitorController until stopped.

type AppMonitorControllerInformer

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

Implements an Informer for the resources being operated on: Pods & AppMonitors.

type AppMonitorCopy

type AppMonitorCopy AppMonitor

type AppMonitorList

type AppMonitorList struct {
	unversioned.TypeMeta `json:",inline"`
	Metadata             unversioned.ListMeta `json:"metadata"`

	Items []AppMonitor `json:"items"`
}

func (*AppMonitorList) GetListMeta

func (aml *AppMonitorList) GetListMeta() unversioned.List

Required to satisfy ListMetaAccessor interface

func (*AppMonitorList) GetObjectKind

func (aml *AppMonitorList) GetObjectKind() unversioned.ObjectKind

Required to satisfy Object interface

func (*AppMonitorList) UnmarshalJSON

func (aml *AppMonitorList) UnmarshalJSON(data []byte) error

type AppMonitorListCopy

type AppMonitorListCopy AppMonitorList

type AppMonitorSpec

type AppMonitorSpec struct {
	MemThresholdPercent float64 `json:memThresholdPercent`
	MemMultiplier       float64 `json:memMultiplier`
}

An AppMonitor redeploys an app when resource limits are exceeded.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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