Switch Kubernetes metrics autodetection to per namespace
Problem to solve
Presently we only show Kubernetes system metrics if we are able to detect the environment based on the Pod/Deployment names. This is because Auto DevOps, and potentially others but not commonly, deploy multiple environments to the same Kubernetes namespace. Because multiple environments could deploy into the same namespace, we need to utilize the pod names to differentiate environments within a namespace.
Soon, ADO plans to deploy environments to their own namespace. When this happens, we should also adjust our detection to support more use cases without requiring special naming formats.
Support per-namespace matching for environments, removing the need for any special naming conventions. Essentially the k8s system metrics PromQL should filter based on the namespace, without the current matching rules for pod names.
Since this is a change in functionality, it should probably be opt-in for now. In a major release we could then make this the default. (Potentially 12.0)