Documentation ¶
Index ¶
Constants ¶
const DEFAULT_CLUSTER_DOMAIN = "cluster.local"
const DEFAULT_CULLING_CHECK_PERIOD = "1"
const DEFAULT_ENABLE_CULLING = "false"
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.
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 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