Code Monkey home page Code Monkey logo

Comments (3)

AlexsJones avatar AlexsJones commented on June 11, 2024

@golgoth31 if I am correct, this actually just checks to see if there is an error from OpenAPIschema right? Do we think there needs to be some more work done to clarify what this command really does?

	// we get the openapi schema from the server only if required by the flag "with-doc"
	openapiSchema := &openapi_v2.Document{}
	if a.WithDoc {
		var openApiErr error

		openapiSchema, openApiErr = a.Client.Client.Discovery().OpenAPISchema()
		if openApiErr != nil {
			a.Errors = append(a.Errors, fmt.Sprintf("[KubernetesDoc] %s", openApiErr))
		}
	}

from k8sgpt.

golgoth31 avatar golgoth31 commented on June 11, 2024

Hi @AlexsJones , The command you mention is the command to extract the full openapi schema from the target kubernetes cluster only if requested by the "with-doc" flag.

Unfortunatly, this is not used if not requested by an analyser. For exemple, the cronjob analyser:

If the nothing is found or the schema not parsed, the kubernetesDoc string is empty and the output is not shown https://github.com/k8sgpt-ai/k8sgpt/blob/main/pkg/analysis/output.go#L81

We have multiple ways to fix this:

  • always add a kubernetesDoc value to "not available"; replaced by the real value if found
  • update the documentation to say that nothing is displayed if not found

In a first run, I can add all the missing openapi parsing requests to the known objects.

Do you have any guide lines for the analysers writing, if yes, we schould add this part.

from k8sgpt.

VaibhavMalik4187 avatar VaibhavMalik4187 commented on June 11, 2024

@AlexsJones Can I work on this issue?

from k8sgpt.

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.