Commit 4b56bc52 authored by Andreas Brandl's avatar Andreas Brandl

Merge branch 'usage_ping_kubernetes_agent' into 'master'

Add kubernetes_agents usage metric

See merge request gitlab-org/gitlab!40559
parents bdc9c8ec d4e37765
---
title: Add kubernetes_agents usage metric
merge_request: 40559
author:
type: other
......@@ -111,6 +111,7 @@ module Gitlab
clusters_applications_jupyter: count(::Clusters::Applications::Jupyter.available),
clusters_applications_cilium: count(::Clusters::Applications::Cilium.available),
clusters_management_project: count(::Clusters::Cluster.with_management_project),
kubernetes_agents: count(::Clusters::Agent),
in_review_folder: count(::Environment.in_review_folder),
grafana_integrated_projects: count(GrafanaIntegration.enabled),
groups: count(Group),
......
......@@ -65,6 +65,9 @@ FactoryBot.define do
create(:alert_management_alert, issue: alert_bot_issues[0], project: projects[0])
create(:self_managed_prometheus_alert_event, related_issues: [issues[1]], project: projects[0])
# Kubernetes agents
create(:cluster_agent, project: projects[0])
# Enabled clusters
gcp_cluster = create(:cluster_provider_gcp, :created).cluster
create(:cluster_provider_aws, :created)
......
......@@ -447,6 +447,7 @@ RSpec.describe Gitlab::UsageData, :aggregate_failures do
expect(count_data[:clusters_applications_jupyter]).to eq(1)
expect(count_data[:clusters_applications_cilium]).to eq(1)
expect(count_data[:clusters_management_project]).to eq(1)
expect(count_data[:kubernetes_agents]).to eq(1)
expect(count_data[:deployments]).to eq(4)
expect(count_data[:successful_deployments]).to eq(2)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment