reconcile

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

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

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

Jump to

Keyboard shortcuts

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