runtime_details

package
v1.0.111 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2024 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPodGeneration added in v1.0.108

func GetPodGeneration(ctx context.Context, kubeClient *kubernetes.Clientset, pod *corev1.Pod) (int64, error)

Givin a pod, this function calculates it's workload generation. e.g. it will return the generation of the deployment/ds/ss manifest that created the pod. This function uses clientset and not the controller-runtime client, so not to pull these objects into the cache, potentially increasing the memory usage of the process. Avoid calling this function too often, as it will make an API call to the k8s API server.

func GetRuntimeDetails added in v1.0.64

func GetRuntimeDetails(ctx context.Context, kubeClient client.Client, podWorkload *workload.PodWorkload) (*odigosv1.InstrumentedApplication, error)

func SetupWithManager

func SetupWithManager(mgr ctrl.Manager, clientset *kubernetes.Clientset) error

Types

type DeprecatedInstrumentationConfigReconciler added in v1.0.108

type DeprecatedInstrumentationConfigReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

replaced by odiglet/pkg/kube/runtime_details/instrumentationconfigs_controller.go which does not rely on the RuntimeDetailsInvalidated flag left here until the migration is complete Deprecated: the new runtime inspection logic is found in odiglet/pkg/kube/runtime_details/instrumentationconfigs_controller.go

func (*DeprecatedInstrumentationConfigReconciler) Reconcile added in v1.0.108

type InstrumentationConfigReconciler added in v1.0.82

type InstrumentationConfigReconciler struct {
	client.Client
	Scheme *runtime.Scheme

	// the clientset is used to interact with the k8s API directly,
	// without pulling in specific objects into the controller runtime cache
	// which can be expensive (memory and CPU)
	Clientset *kubernetes.Clientset
}

func (*InstrumentationConfigReconciler) Reconcile added in v1.0.82

type PodsReconciler added in v1.0.108

type PodsReconciler struct {
	client.Client
	Scheme *runtime.Scheme

	// the clientset is used to interact with the k8s API directly,
	// without pulling in specific objects into the controller runtime cache
	// which can be expensive (memory and CPU)
	Clientset *kubernetes.Clientset
}

func (*PodsReconciler) Reconcile added in v1.0.108

func (p *PodsReconciler) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error)

We need to apply runtime details detection for a new running pod in the following cases: 1. When a new workload generation is applied, the runtime details might be changed (different env, versions, etc). 2. When a source is added, but there are no running pods yet. When the first pod starts running, this is chance to apply runtime details detection.

Jump to

Keyboard shortcuts

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