Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KubernetesResourceReconciler ¶
type KubernetesResourceReconciler struct { Scheme *runtime.Scheme Client client.Client ControllerReferencer controllerReferencer }
KubernetesResourceReconciler handles reconciling Kubernetes resources, such as pods, service accounts etc.
func (*KubernetesResourceReconciler) PodCleanup ¶ added in v1.3.0
func (k *KubernetesResourceReconciler) PodCleanup(reqLogger logr.Logger, instance *custompodautoscalercomv1.CustomPodAutoscaler) error
PodCleanup will look for any Pods that have the v1.custompodautoscaler.com/owned-by label set to the name of the CPA and delete any 'orphaned' Pods, these are Pods that are owned by the CPA but are no longer defined in the CPA PodTemplateSpec (for example if the PodTemplateSpec has renamed the Pod, it should delete the old Pod as it provisions a new Pod so there aren't two Pods for the CPA)
func (*KubernetesResourceReconciler) Reconcile ¶
func (k *KubernetesResourceReconciler) Reconcile( reqLogger logr.Logger, instance *custompodautoscalercomv1.CustomPodAutoscaler, obj metav1.Object, shouldProvision bool, updatable bool, kind string, ) (reconcile.Result, error)
Reconcile manages k8s objects, making sure that the supplied object exists, and if it doesn't it creates one
Click to show internal directories.
Click to hide internal directories.