Giter Club home page Giter Club logo

Comments (4)

davidreuss avatar davidreuss commented on August 17, 2024 1

was just reading the source, and yes it might just be adding initContainers in the filter in this method

kail/filter.go

Line 35 in dab2d1e

func sourcesForPod(filter ContainerFilter, pod *v1.Pod) (nsname.NSName, map[eventSource]bool) {

I don't have time until next week, but if i get it working i'll do a PR for it.

Thanks for the pointers as well.

from kail.

boz avatar boz commented on August 17, 2024

Great idea. If Read Log works for init-containers then yeah, it should be doable.

I don't have time at the moment to get to it, but will try to get to it at some point.

If anyone else wants to tackle the issue, it will probably take something like

  1. include init containers by looking at InitContainerStatuses here
  2. figure out reasonable behavior for when to display init container logs and when to stop monitoring them.

from kail.

davidreuss avatar davidreuss commented on August 17, 2024

So, #15 seems to work in my local testing .. regarding when to stop monitoring them, if i understand the code correctly, then cleanup should already happen, as finished init containers will not be considered from the filter (they're not running anymore), and thus will be automatically prune from the sources.

	if pms, ok := c.monitors[id]; ok {
		for source, pm := range pms {
			if !sources[source] {
				pm.Shutdown()
			}
		}
	}

Is that understood correctly?

From the debug logs in my testing example it looks like it at least where i get

DEBU[0025] removing source prod/api-7805699-0mpq0@init   cmp=kail.controller

from kail.

boz avatar boz commented on August 17, 2024

@davidreuss: yep, that's right.

from kail.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.