Skip to content

Commit

Permalink
docs: better gather helm docs
Browse files Browse the repository at this point in the history
  • Loading branch information
rluders committed Dec 6, 2023
1 parent 126a8b4 commit eafae76
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
12 changes: 10 additions & 2 deletions docs/gathered-data.md
Expand Up @@ -771,8 +771,16 @@ None

## HelmInfo

Collects summarized info about the helm usage on a cluster
in a generic fashion
Collects statistics about resources deployed via HelmChart, counting only the resources
with `app.kubernetes.io/managed-by=Helm` and `helm.sh/chart` labels. The data is then summarized
and grouped by hashed namespace.

Resource types included:
- ReplicaSets
- DaemonSets
- StatefulSets
- Services
- Deployments

### API Reference
None
Expand Down
14 changes: 11 additions & 3 deletions pkg/gatherers/workloads/gather_helm_info.go
Expand Up @@ -20,8 +20,16 @@ import (

const labelChartNameKey = "helm.sh/chart"

// GatherHelmInfo Collects summarized info about the helm usage on a cluster
// in a generic fashion
// GatherHelmInfo Collects statistics about resources deployed via HelmChart, counting only the resources
// with `app.kubernetes.io/managed-by=Helm` and `helm.sh/chart` labels. The data is then summarized
// and grouped by hashed namespace.
//
// Resource types included:
// - ReplicaSets
// - DaemonSets
// - StatefulSets
// - Services
// - Deployments
//
// ### API Reference
// None
Expand Down Expand Up @@ -84,7 +92,7 @@ func gatherHelmInfo(
// Anonymize the namespace to make it unique identifier
hash, err := createHash(item.GetNamespace())
if err != nil {
klog.Errorf("unable to hash the namespace '%s': %v", labels[labelChartNameKey], err)
klog.Errorf("unable to hash the namespace '%s': %v", item.GetNamespace(), err)
continue
}

Expand Down

0 comments on commit eafae76

Please sign in to comment.