Extend Post Deployment Metrics support to Kubernetes Metrics

Problem to solve

#214924 (closed) Adds showing which threshold was crossed from NGINX metrics, this issue will extend this to Kubernetes metrics.

Intended users

Using K8s

Further details

In case there is a degradation in performance or quality, we will notify the user on the deploy board (environment page) so that they will know something is wrong and can take action.

Proposal

Additional metrics to display on the deploy board:

Metrics supported Average Memory Usage (MB):

avg(sum(container_memory_usage_bytes{container_name!="POD",pod_name=~"^%{ci_environment_slug}-([^c].*|c([^a]|a([^n]|n([^a]|a([^r]|r[^y])))).|)-(.)",namespace="%{kube_namespace}"}) by (job)) without (job) / count(avg(container_memory_usage_bytes{container_name!="POD",pod_name=~"^%{ci_environment_slug}-([^c].*|c([^a]|a([^n]|n([^a]|a([^r]|r[^y])))).|)-(.)",namespace="%{kube_namespace}"}) without (job)) /1024/1024

Average CPU Utilization (%):

avg(sum(rate(container_cpu_usage_seconds_total{container_name!="POD",pod_name=~"^%{ci_environment_slug

Permissions and Security

Documentation

Availability & Testing

What does success look like, and how can we measure that?

What is the type of buyer?

Is this a cross-stage feature?

Links / references

https://docs.gitlab.com/ee/user/project/integrations/prometheus_library/kubernetes.html

This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.

Edited by 🤖 GitLab Bot 🤖