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

[Question]: How to restricts operator to auto analyze only selected namespaces #1267

Open
3 of 4 tasks
smartaquarius10 opened this issue Oct 8, 2024 · 1 comment
Open
3 of 4 tasks

Comments

@smartaquarius10
Copy link

Checklist

  • I've searched for similar issues and couldn't find anything matching
  • I've included steps to reproduce the behavior

Affected Components

  • K8sGPT (CLI)
  • K8sGPT Operator

K8sGPT Version

v0.0.26

Kubernetes Version

v1.29.8

Host OS and its Version

No response

Steps to reproduce

Host the operator after following steps written here

https://github.com/k8sgpt-ai/k8sgpt-operator

Expected behaviour

Restrict analysis by the operator only to few namespaces

Actual behaviour

Analyzing whole cluster

Additional Information

No response

@abindg
Copy link

abindg commented Feb 4, 2025

This is actually not properly documented. The k8sgpt is a crd and you can create multiple ones. In the k8sgpt crd, there is spec.targetnamespace. For each namespace you target create a k8sgpt instance with a diff name and in the spec.targetnamespace field mention the target namespace you want to scan. For 10 different namespaces you want to scan, you need to have 10 k8sgpt instances.

Hope this helps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Proposed
Development

No branches or pull requests

2 participants