GithubHelp home page GithubHelp logo

Version Command Panics about kubeaudit HOT 4 CLOSED

shopify avatar shopify commented on August 23, 2024
Version Command Panics

from kubeaudit.

Comments (4)

shane-lawrence avatar shane-lawrence commented on August 23, 2024

If kubeaudit is run without the -l switch,

if kubeconfig == "" && !rootConfig.localMode {
assumes it's running in a cluster. If it's not, it won't have KUBERNETES_SERVICE_ environment variables set, so it returns nil and an error. The error is displayed but it doesn't abort, and
kube, err := kubernetes.NewForConfig(config)
passes a nil pointer.

from kubeaudit.

jinankjain avatar jinankjain commented on August 23, 2024

@shane-lawrence one solution could be that by default set the value of local to be true and use special flag to indicate its inside a cluster.

On a side note I think we need to change that version string too.

from kubeaudit.

shane-lawrence avatar shane-lawrence commented on August 23, 2024

The version string needs to be updated and I noticed a few times that the kubectl client version was blank so I'll look into that as well.

Here's my proposed fix for the panic: #113

from kubeaudit.

shane-lawrence avatar shane-lawrence commented on August 23, 2024

Resolved by #113.

from kubeaudit.

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.