Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
55f4119e
Commit
55f4119e
authored
Sep 18, 2019
by
Tiger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add EKS cluster count to usage data
https://gitlab.com/gitlab-org/gitlab/merge_requests/17059
parent
53273fd9
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
7 deletions
+25
-7
changelogs/unreleased/22392-add-eks-clusters-to-usage-data.yml
...elogs/unreleased/22392-add-eks-clusters-to-usage-data.yml
+5
-0
ee/lib/ee/gitlab/usage_data.rb
ee/lib/ee/gitlab/usage_data.rb
+1
-0
ee/spec/lib/ee/gitlab/usage_data_spec.rb
ee/spec/lib/ee/gitlab/usage_data_spec.rb
+4
-2
lib/gitlab/usage_data.rb
lib/gitlab/usage_data.rb
+1
-0
spec/lib/gitlab/usage_data_spec.rb
spec/lib/gitlab/usage_data_spec.rb
+14
-5
No files found.
changelogs/unreleased/22392-add-eks-clusters-to-usage-data.yml
0 → 100644
View file @
55f4119e
---
title
:
Add EKS cluster count to usage data
merge_request
:
17059
author
:
type
:
other
ee/lib/ee/gitlab/usage_data.rb
View file @
55f4119e
...
...
@@ -192,6 +192,7 @@ module EE
clusters_disabled:
::
Clusters
::
Cluster
.
disabled
.
distinct_count_by
(
:user_id
),
clusters_enabled:
::
Clusters
::
Cluster
.
enabled
.
distinct_count_by
(
:user_id
),
clusters_platforms_gke:
::
Clusters
::
Cluster
.
gcp_installed
.
enabled
.
distinct_count_by
(
:user_id
),
clusters_platforms_eks:
::
Clusters
::
Cluster
.
aws_installed
.
enabled
.
distinct_count_by
(
:user_id
),
clusters_platforms_user:
::
Clusters
::
Cluster
.
user_provided
.
enabled
.
distinct_count_by
(
:user_id
),
group_clusters_disabled:
::
Clusters
::
Cluster
.
disabled
.
group_type
.
distinct_count_by
(
:user_id
),
group_clusters_enabled:
::
Clusters
::
Cluster
.
enabled
.
group_type
.
distinct_count_by
(
:user_id
),
...
...
ee/spec/lib/ee/gitlab/usage_data_spec.rb
View file @
55f4119e
...
...
@@ -49,8 +49,9 @@ describe Gitlab::UsageData do
create
(
:clusters_applications_ingress
,
:installed
,
cluster:
cluster
)
create
(
:clusters_applications_knative
,
:installed
,
cluster:
cluster
)
create
(
:cluster
,
:disabled
,
user:
user
)
create
(
:cluster
,
:provided_by_gcp
,
user:
user
)
create
(
:cluster
,
:provided_by_user
,
user:
user
)
create
(
:cluster_provider_gcp
,
:created
)
create
(
:cluster_provider_aws
,
:created
)
create
(
:cluster_platform_kubernetes
)
create
(
:cluster
,
:group
,
:disabled
,
user:
user
)
create
(
:cluster
,
:group
,
user:
user
)
create
(
:slack_service
,
project:
project
)
...
...
@@ -65,6 +66,7 @@ describe Gitlab::UsageData do
clusters_disabled:
1
,
clusters_enabled:
4
,
clusters_platforms_gke:
1
,
clusters_platforms_eks:
1
,
clusters_platforms_user:
1
,
group_clusters_disabled:
1
,
group_clusters_enabled:
1
,
...
...
lib/gitlab/usage_data.rb
View file @
55f4119e
...
...
@@ -66,6 +66,7 @@ module Gitlab
clusters_disabled:
count
(
::
Clusters
::
Cluster
.
disabled
),
project_clusters_disabled:
count
(
::
Clusters
::
Cluster
.
disabled
.
project_type
),
group_clusters_disabled:
count
(
::
Clusters
::
Cluster
.
disabled
.
group_type
),
clusters_platforms_eks:
count
(
::
Clusters
::
Cluster
.
aws_installed
.
enabled
),
clusters_platforms_gke:
count
(
::
Clusters
::
Cluster
.
gcp_installed
.
enabled
),
clusters_platforms_user:
count
(
::
Clusters
::
Cluster
.
user_provided
.
enabled
),
clusters_applications_helm:
count
(
::
Clusters
::
Applications
::
Helm
.
available
),
...
...
spec/lib/gitlab/usage_data_spec.rb
View file @
55f4119e
...
...
@@ -24,12 +24,19 @@ describe Gitlab::UsageData do
create_list
(
:zoom_meeting
,
2
,
project:
projects
[
0
],
issue:
projects
[
0
].
issues
[
1
],
issue_status: :removed
)
create
(
:zoom_meeting
,
project:
projects
[
0
],
issue:
projects
[
0
].
issues
[
2
],
issue_status: :added
)
create_list
(
:zoom_meeting
,
2
,
project:
projects
[
0
],
issue:
projects
[
0
].
issues
[
2
],
issue_status: :removed
)
gcp_cluster
=
create
(
:cluster
,
:provided_by_gcp
)
create
(
:cluster
,
:provided_by_user
)
create
(
:cluster
,
:provided_by_user
,
:disabled
)
# Enabled clusters
gcp_cluster
=
create
(
:cluster_provider_gcp
,
:created
).
cluster
create
(
:cluster_provider_aws
,
:created
)
create
(
:cluster_platform_kubernetes
)
create
(
:cluster
,
:group
)
# Disabled clusters
create
(
:cluster
,
:disabled
)
create
(
:cluster
,
:group
,
:disabled
)
create
(
:cluster
,
:group
,
:disabled
)
# Applications
create
(
:clusters_applications_helm
,
:installed
,
cluster:
gcp_cluster
)
create
(
:clusters_applications_ingress
,
:installed
,
cluster:
gcp_cluster
)
create
(
:clusters_applications_cert_manager
,
:installed
,
cluster:
gcp_cluster
)
...
...
@@ -117,6 +124,7 @@ describe Gitlab::UsageData do
clusters_disabled
project_clusters_disabled
group_clusters_disabled
clusters_platforms_eks
clusters_platforms_gke
clusters_platforms_user
clusters_applications_helm
...
...
@@ -185,13 +193,14 @@ describe Gitlab::UsageData do
expect
(
count_data
[
:issues_with_associated_zoom_link
]).
to
eq
(
2
)
expect
(
count_data
[
:issues_using_zoom_quick_actions
]).
to
eq
(
3
)
expect
(
count_data
[
:clusters_enabled
]).
to
eq
(
7
)
expect
(
count_data
[
:project_clusters_enabled
]).
to
eq
(
6
)
expect
(
count_data
[
:clusters_enabled
]).
to
eq
(
4
)
expect
(
count_data
[
:project_clusters_enabled
]).
to
eq
(
3
)
expect
(
count_data
[
:group_clusters_enabled
]).
to
eq
(
1
)
expect
(
count_data
[
:clusters_disabled
]).
to
eq
(
3
)
expect
(
count_data
[
:project_clusters_disabled
]).
to
eq
(
1
)
expect
(
count_data
[
:group_clusters_disabled
]).
to
eq
(
2
)
expect
(
count_data
[
:group_clusters_enabled
]).
to
eq
(
1
)
expect
(
count_data
[
:clusters_platforms_eks
]).
to
eq
(
1
)
expect
(
count_data
[
:clusters_platforms_gke
]).
to
eq
(
1
)
expect
(
count_data
[
:clusters_platforms_user
]).
to
eq
(
1
)
expect
(
count_data
[
:clusters_applications_helm
]).
to
eq
(
1
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment