However, If I don't specify targetNamespace, k8sGPT operator controller manager won't create result and will log an error:
Finished Reconciling k8sGPT with error: an empty namespace may not be set during creation
2024-05-10T00:59:16Z ERROR Reconciler error {"controller": "k8sgpt", "controllerGroup": "core.k8sgpt.ai", "controllerKind": "K8sGPT", "K8sGPT": {"name":"k8sgpt-local","namespace":"k8sgpt-operator-system"}, "namespace": "k8sgpt-operator-system", "name": "k8sgpt-local", "reconcileID": "4f9ace39-1e48-4211
-8a56-e7f78a37bebb", "error": "an empty namespace may not be set during creation"}
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.15.0/pkg/internal/controller/controller.go:324
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.15.0/pkg/internal/controller/controller.go:265
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.15.0/pkg/internal/controller/controller.go:226
Creating new client for 10.233.1.108:8080
Connection established between 10.233.1.108:8080 and localhost with time out of 1 seconds.
Remote Address : 10.233.1.108:8080
K8sGPT address: 10.233.1.108:8080
Finished Reconciling k8sGPT with error: an empty namespace may not be set during creation
And If I specify targetNamespace, k8sgpt will only analyze for the namespace.
So If I have multiple namespace, I will create k8sgpt for all namespace??
Expected behaviour
k8sGPT will analyze for all namespace if targetNamespace not specified
Actual behaviour
if targetNamespace not specified, k8sgpt will throw
Finished Reconciling k8sGPT with error: an empty namespace may not be set during creation
if targetNamespace specified,
k8sgpt will only analyze for that namespace
Checklist
Affected Components
K8sGPT Version
v0.1.4
Kubernetes Version
v1.26.3
Host OS and its Version
Rocky 9
Steps to reproduce
I am facing same error with https://github.com/k8sgpt-ai/k8sgpt/issues/1107 This is what I create for k8sgpt CRD resource
However, If I don't specify targetNamespace, k8sGPT operator controller manager won't create result and will log an error:
And If I specify targetNamespace, k8sgpt will only analyze for the namespace. So If I have multiple namespace, I will create k8sgpt for all namespace??
Expected behaviour
k8sGPT will analyze for all namespace if targetNamespace not specified
Actual behaviour
if targetNamespace not specified, k8sgpt will throw
if targetNamespace specified, k8sgpt will only analyze for that namespace
Additional Information
no
thanks~~