Skip to content

Commit

Permalink
feat: send api resource count and object count from argocd applicatio…
Browse files Browse the repository at this point in the history
…n controller (argoproj#52)
  • Loading branch information
jiachengxu authored and Akuity committed Nov 8, 2024
1 parent e6f5cb0 commit 16f7c78
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions controller/cache/ak-dashboard/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ import (
)

type ClusterInfo struct {
K8sVersion string `json:"k8sVersion,omitempty"`
APIResources []APIResource `json:"apiResources,omitempty"`
K8sVersion string `json:"k8sVersion,omitempty"`
APIResources []APIResource `json:"apiResources,omitempty"`
APIResourceCount int `json:"apiResourceCount,omitempty"`
ObjectCount int `json:"objectCount,omitempty"`
}

type APIResource struct {
Expand Down Expand Up @@ -55,8 +57,10 @@ func NewClusterInfo(info clustercache.ClusterInfo, crds *extensionsv1.CustomReso
}

return ClusterInfo{
K8sVersion: info.K8SVersion,
APIResources: apiResources,
K8sVersion: info.K8SVersion,
APIResources: apiResources,
APIResourceCount: info.APIsCount,
ObjectCount: info.ResourcesCount,
}
}

Expand Down

0 comments on commit 16f7c78

Please sign in to comment.