Skip to content

Add Helm chart for Kubernetes deployment#112

Open
pashok2398 wants to merge 7 commits into
thought-machine:masterfrom
pashok2398:prometheus-cardinality-exporter
Open

Add Helm chart for Kubernetes deployment#112
pashok2398 wants to merge 7 commits into
thought-machine:masterfrom
pashok2398:prometheus-cardinality-exporter

Conversation

@pashok2398

Copy link
Copy Markdown

Summary

  • Add a Helm chart for easy deployment to Kubernetes
  • Configurable RBAC scope (ClusterRole or namespace-scoped Role)
  • Optional ServiceMonitor for Prometheus Operator
  • Authentication support via Secret or existing Secret
  • Comprehensive values.yaml with documentation

Features

  • Service Discovery: Discover Prometheus instances via K8s API with configurable selector and namespaces
  • Manual Mode: Alternatively, specify Prometheus URLs directly
  • RBAC Flexibility: ClusterRole for cluster-wide discovery, or Role for namespace-scoped
  • ServiceMonitor: Optional support for Prometheus Operator
  • Security: Non-root user, read-only filesystem, no privilege escalation

Testing

  • Tested locally with kind cluster
  • Deployed kube-prometheus-stack and verified metrics collection
  • Validated with helm lint and helm template

Usage Examples

Basic installation with service discovery:

helm install cardinality-exporter ./charts/prometheus-cardinality-exporter \
  --namespace monitoring \
  --set config.selector="app.kubernetes.io/name=prometheus"

Namespace-scoped RBAC:

helm install cardinality-exporter ./charts/prometheus-cardinality-exporter \
  --set rbac.clusterScope=false \
  --set config.namespaces[0]=monitoring

With ServiceMonitor (Prometheus Operator):

helm install cardinality-exporter ./charts/prometheus-cardinality-exporter \
  --set serviceMonitor.enabled=true

pashok2398 and others added 7 commits February 19, 2026 16:30
Add a Helm chart with configurable options:
- Service discovery or manual Prometheus URLs
- ClusterRole or namespace-scoped Role for RBAC
- Optional ServiceMonitor for Prometheus Operator
- Authentication credentials via Secret
- Configurable resources, probes, and security context

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add GitHub Actions workflow for chart-releaser to publish charts to GitHub Pages
- Add artifacthub-repo.yml for Artifact Hub repository metadata
- Add Artifact Hub annotations to Chart.yaml for rich metadata display

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add workflow to bump chart version when new release is published
- Remove artifacthub-repo.yml (not needed for OCI registries)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@pashok2398 pashok2398 force-pushed the prometheus-cardinality-exporter branch from c5648b9 to 5a9de73 Compare February 22, 2026 08:06
@zl728 zl728 requested review from alelevinas and zl728 February 23, 2026 10:50
@zl728

zl728 commented Mar 2, 2026

Copy link
Copy Markdown
Contributor

@pashok2398 hey ! thanks very much for submitting this, it is a very useful feature indeed

however unfortunately in thought machine we do not use Helm and accepting this PR would mean that by default we would have to switch to it. we have to keep the tool up to date with third-party party version upgrades to mitigate security vulnerabilities and adhere the SLDC SLA for them.

I am happy to accept PR if you find a way to make installation via Helm optional and not as a breaking change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants