Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var GetResource = map[string]getResourceFunc{
"deployments": getDeployments,
"statefulsets": getStatefulSets,
"cronjobs": getCronJobs,
"jobs": getJobs,
"daemonsets": getDaemonSets,
"poddisruptionbudgets": getPodDisruptionBudgets,
"horizontalpodautoscalers": getHorizontalPodAutoscalers,
"scaledobjects": getScaledObjects,
}
GetResource maps the resource name to an implementation specific getResourceFunc
Functions ¶
This section is empty.
Types ¶
type Clientsets ¶
type Clientsets struct { Kubernetes *kubernetes.Clientset Keda *keda.Clientset }
type Workload ¶
type Workload interface { // GetAnnotations gets the annotations of the resource GetAnnotations() map[string]string // GetNamespace gets the namespace of the resource GetNamespace() string // GetName gets the name of the resource GetName() string // GetUID gets the uid of the workload GetUID() types.UID // GetObjectKind gets the ObjectKind of the workload GetObjectKind() schema.ObjectKind // GetLabels gets the labels of the workload GetLabels() map[string]string // GetCreationTimestamp gets the creation timestamp of the workload GetCreationTimestamp() metav1.Time // SetAnnotations sets the annotations on the resource. Changes won't be made on kubernetes until update() is called SetAnnotations(annotations map[string]string) // Update updates the resource with all changes made to it. It should only be called once on a resource Update(clientsets *Clientsets, ctx context.Context) error // ScaleUp scales up the workload ScaleUp() error // ScaleDown scales down the workload ScaleDown(downscaleReplicas int) error }
Workload is an interface for a scalable resource. It holds shared resource specific functions
Click to show internal directories.
Click to hide internal directories.