mirror of
https://github.com/k8sgpt-ai/k8sgpt.git
synced 2026-02-21 14:52:11 +00:00
* feat(serve): add short flag and env var for metrics port Add short flag -m for --metrics-port to improve discoverability. Add K8SGPT_METRICS_PORT environment variable support, consistent with other K8SGPT_* environment variables. This helps users who encounter port conflicts on the default metrics port (8081) when running k8sgpt serve with --mcp or other configurations. Signed-off-by: Three Foxes (in a Trenchcoat) <threefoxes53235@gmail.com> Signed-off-by: Three Foxes (in a Trenchcoat) <threefoxesyes3inatrenchcoat@gmail.com> * fix: validate namespace before running custom analyzers Custom analyzers previously ignored the --namespace flag entirely, executing even when an invalid or misspelled namespace was provided. This was inconsistent with built-in filter behavior, which respects namespace scoping. Add namespace existence validation in RunCustomAnalysis() before executing custom analyzers. If a namespace is specified but does not exist, an error is reported and custom analyzers are skipped. Fixes #1601 Signed-off-by: Three Foxes (in a Trenchcoat) <threefoxes53235@gmail.com> Signed-off-by: Three Foxes (in a Trenchcoat) <threefoxesyes3inatrenchcoat@gmail.com> --------- Signed-off-by: Three Foxes (in a Trenchcoat) <threefoxes53235@gmail.com> Signed-off-by: Three Foxes (in a Trenchcoat) <threefoxesyes3inatrenchcoat@gmail.com> Co-authored-by: Alex Jones <1235925+AlexsJones@users.noreply.github.com>