culler

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const DEFAULT_CLUSTER_DOMAIN = "cluster.local"
View Source
const DEFAULT_CULLING_CHECK_PERIOD = "1"
View Source
const DEFAULT_ENABLE_CULLING = "false"
View Source
const DEFAULT_IDLE_TIME = "1440" // One day

The constants with name 'DEFAULT_{ENV_Var}' are the default values to be used, if the respective ENV vars are not present. All the time numbers correspond to minutes.

View Source
const STOP_ANNOTATION = "kubeflow-resource-stopped"

When a Resource should be stopped/culled, then the controller should add this annotation in the Resource's Metadata. Then, inside the reconcile loop, the controller must check if this annotation is set and then apply the respective culling logic for that Resource. The value of the annotation will be a timestamp of when the Resource was stopped/culled.

In case of Notebooks, the controller will reduce the replicas to 0 if this annotation is set. If it's not set, then it will make the replicas 1.

Variables

This section is empty.

Functions

func GetRequeueTime

func GetRequeueTime() time.Duration

func NotebookNeedsCulling

func NotebookNeedsCulling(nbMeta metav1.ObjectMeta) bool

func RemoveStopAnnotation

func RemoveStopAnnotation(meta *metav1.ObjectMeta)

func SetStopAnnotation

func SetStopAnnotation(meta *metav1.ObjectMeta, m *metrics.Metrics)

Stop Annotation handling functions

func StopAnnotationIsSet

func StopAnnotationIsSet(meta metav1.ObjectMeta) bool

Types

type NotebookStatus

type NotebookStatus struct {
	Started      string `json:"started"`
	LastActivity string `json:"last_activity"`
	Connections  int    `json:"connections"`
	Kernels      int    `json:"kernels"`
}

Jump to

Keyboard shortcuts

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