tektoncd/pipeline

Filtered Informer is not configured fully. Too many pods are in the informer.

Offen

#4.398 geöffnet am 26.11.2021

 (14 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Go (1.943 Forks)auto 404
help wantedkind/buglifecycle/frozenpriority/important-longterm

Repository-Metriken

Stars
 (9.013 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 9T 3h) (137 gemergte PRs in 30 T)

Beschreibung

Expected Behavior

The informer should have only pods with label app.kubernetes.io/managed-by=tekton-pipelines or the value of the config default-managed-by-label-value

https://github.com/tektoncd/pipeline/blob/main/config/config-defaults.yaml#L52

Actual Behavior

The informer has too many pods in his memory.

Steps to Reproduce the Problem

  1. Modify the code of the pipeline controller to display the number of pods in the informer
go func() {
	for {
		pods, err := podInformer.Lister().List(labels.Everything())
		if err != nil {
			logger.Fatal(err)
		}
		logger.Error(len(pods))
		time.Sleep(time.Second)
	}
}()
  1. Create a TaskRun
  2. Create a pod with a label app.kubernetes.io/managed-by: not-tekton-at-all

Additional Info

The filteredinformerfactory is configured here: https://github.com/tektoncd/pipeline/blob/64aff5edcbb7e6fdf22e1270f60ee37085a8d934/cmd/controller/main.go#L101 The podinformer is configured here: https://github.com/tektoncd/pipeline/blob/64aff5edcbb7e6fdf22e1270f60ee37085a8d934/pkg/reconciler/taskrun/controller.go#L53

Contributor Guide