Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve error messaging if required config options are not defined #48

Open
ca-scribner opened this issue Sep 16, 2022 · 1 comment
Open
Labels
enhancement New feature or request

Comments

@ca-scribner
Copy link
Contributor

For both serving and eventing, if the user does not specify the namespace they will get a nondescript lightkube error that makes it difficult to understand a config option has been missed. Improve this error message, or possibly validate the config values before starting the charm.

@DnPlas DnPlas added the enhancement New feature or request label Sep 22, 2022
@ca-scribner
Copy link
Contributor Author

This situation is worse when omitting the istio gateway name/namespace. If omitting those, knative-serving (/eventing) will create a knativeserving CR that is malformed but will not report an error. This results in a Serving instance that does not get created, and some non-descript errors in the knative-operator logs like:

	  	2023-03-06T20:41:03.736Z [/ko-app/operator] {"severity":"ERROR","timestamp":"2023-03-06T20:41:03.736718347Z","logger":"knative-operator","caller":"knativeserving/reconciler.go:294","message":"Returned an error","commit":"e0ef2a2-dirty","knative.dev/pod":"knative-operator","knative.dev/controller":"knative.dev.operator.pkg.reconciler.knativeserving.Reconciler","knative.dev/kind":"operator.knative.dev.KnativeServing","knative.dev/traceid":"cc1ff0e5-82d3-4620-885d-226ef52cc193","knative.dev/key":"knative-serving-ns3/knative-serving","targetMethod":"ReconcileKind","error":"failed to apply non rbac manifest: the server does not allow this method on the requested resource","stacktrace":"knative.dev/operator/pkg/client/injection/reconciler/operator/v1beta1/knativeserving.(*reconcilerImpl).Reconcile\n\tknative.dev/operator/pkg/client/injection/reconciler/operator/v1beta1/knativeserving/reconciler.go:294\nknative.dev/pkg/controller.(*Impl).processNextWorkItem\n\tknative.dev/[email protected]/controller/controller.go:542\nknative.dev/pkg/controller.(*Impl).RunContext.func3\n\tknative.dev/[email protected]/controller/controller.go:491"}
		2023-03-06T20:41:03.736Z [/ko-app/operator] {"severity":"ERROR","timestamp":"2023-03-06T20:41:03.736836431Z","logger":"knative-operator","caller":"controller/controller.go:566","message":"Reconcile error","commit":"e0ef2a2-dirty","knative.dev/pod":"knative-operator","knative.dev/controller":"knative.dev.operator.pkg.reconciler.knativeserving.Reconciler","knative.dev/kind":"operator.knative.dev.KnativeServing","knative.dev/traceid":"cc1ff0e5-82d3-4620-885d-226ef52cc193","knative.dev/key":"knative-serving-ns3/knative-serving","duration":"6.437674429s","error":"failed to apply non rbac manifest: the server does not allow this method on the requested resource","stacktrace":"knative.dev/pkg/controller.(*Impl).handleErr\n\tknative.dev/[email protected]/controller/controller.go:566\nknative.dev/pkg/controller.(*Impl).processNextWorkItem\n\tknative.dev/[email protected]/controller/controller.go:543\nknative.dev/pkg/controller.(*Impl).RunContext.func3\n\tknative.dev/[email protected]/controller/controller.go:491"}
		2023-03-06T20:41:03.737Z [/ko-app/operator] {"severity":"INFO","timestamp":"2023-03-06T20:41:03.737018738Z","logger":"knative-operator.event-broadcaster","caller":"record/event.go:285","message":"Event(v1.ObjectReference{Kind:\"KnativeServing\", Namespace:\"knative-serving-ns3\", Name:\"knative-serving\", UID:\"77a01463-cd24-47c6-a68a-bda46a9d394f\", APIVersion:\"operator.knative.dev/v1beta1\", ResourceVersion:\"78350\", FieldPath:\"\"}): type: 'Warning' reason: 'InternalError' failed to apply non rbac manifest: the server does not allow this method on the requested resource","commit":"e0ef2a2-dirty","knative.dev/pod":"knative-operator"}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants