Giter VIP home page Giter VIP logo

Comments (7)

stewartshea avatar stewartshea commented on June 14, 2024 1

Thanks @zohebk8s -- I'll have a review next week and see if we can either improve the existing command or come up with a new one!

This is greatly appreciated!

from runwhen-local.

stewartshea avatar stewartshea commented on June 14, 2024 1

So, this is an interesting scenario where the pod spec (managed by the deployment) and the service were not aligned, or misconfigured. While I can see the value of wanting to check that they exist, the problem is a little deeper than that. Unfortunately we can't guarantee that the pod has the ports field in the spec, or possibly this field contains multiple values.

  • In the case the ports field doesn't exist, the container image itself still can have a port open we have no value to check against when querying the pod or deployment. In many of the implementations I've done, the ports field is never used.

  • In the case where this exists, but there are multiple values, we could check that at least one of them exists in the service configuration, but this again could continue to be misleading if the wrong port is selected.

I could see a version of this where we can check if the details are missing or appear mismatched and ask the user to go deeper into those resources, but it's only a pointer and not a guarantee. The other option is to show all ports configured on the deployment - but in many cases there won't be any information here.

from runwhen-local.

more-dinner avatar more-dinner commented on June 14, 2024

Good catch. @jon-funk - perhaps a useful issue to raise here for some of the related tasks?

from runwhen-local.

jon-funk avatar jon-funk commented on June 14, 2024

Thanks @zohebk8s. The doc+example helps a ton too. I see some opportunities here for connecting this check to other troubleshooting scripts based on the kind managing the pods in question.

from runwhen-local.

zohebk8s avatar zohebk8s commented on June 14, 2024

If you feel it’s quite complex & complicated with no real possibility of getting the details, feel free to close this issue.

Asking user or displaying ports configured in deployment is really a great idea. Whatever you feel best, you can add.

Thank you for spending time on this.

from runwhen-local.

stewartshea avatar stewartshea commented on June 14, 2024

runwhen-contrib/rw-cli-codecollection#189 adds some logic to detect mismatches where possible. Note that just because the conatinerPort is set in the spec, doesn't mean that it is the port the app is running on, but hopefully this adds additional detail where possible.

from runwhen-local.

stewartshea avatar stewartshea commented on June 14, 2024

I added some more discussion content here: https://github.com/orgs/runwhen-contrib/discussions/219#discussioncomment-6804236

I suspect we can close the issue now that we surface up some of this detail, along with continuing the discussion in the link above.

from runwhen-local.

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.