csa-exporter

by KlickTipp

Helm chartv0.1.4App 0.3.1Verified publisher

A Helm chart for Kubernetes to scrape the CSA stats API.

About this chart

csa-exporter

A Helm chart for Kubernetes to scrape the CSA stats API.

Homepage: https://github.com/klicktipp/helm-charts

Maintainers

NameEmailUrl
vquiehttps://github.com/vquie

Source Code

Authentication

The chart supports two authentication modes for the CSA API:

  • Token-based auth with CSA_API_TOKEN
  • Key-pair auth with CSA_API_ID and CSA_API_SECRET

The recommended production setup is to provide an existing Kubernetes Secret with the required keys and set auth.existingSecretName.

If you want the chart to create the Secret, set auth.createSecret=true and provide either:

  • auth.token together with auth.secretKeys.token
  • auth.id and auth.secret together with auth.secretKeys.id and auth.secretKeys.secret

When both auth variants are configured, token auth takes precedence.

Runtime Configuration

The chart exposes optional runtime overrides through env.* values:

  • env.apiUrl overrides the default CSA API endpoint used by the container image
  • env.apiTimeout sets the outbound API timeout
  • env.logLevel adjusts application logging

Values

KeyTypeDefaultDescription
replicaCountint1Number of csa-exporter pods to run.
imageobject{"digest":"","pullPolicy":"IfNotPresent","registry":"ghcr.io","repository":"klicktipp/csa-exporter","tag":""}Container image configuration.
image.registrystring"ghcr.io"Optional image registry prefix.
image.repositorystring"klicktipp/csa-exporter"Image repository name.
image.tagstring""Image tag. When empty, the chart appVersion is used.
image.pullPolicystring"IfNotPresent"Image pull policy.
image.digeststring""Optional image digest overriding the tag-based reference.
imagePullSecretslist[]Image pull secrets for the pod.
nameOverridestring""Partially override generated resource names.
fullnameOverridestring""Fully override generated resource names.
namespaceOverridestring""Override the namespace used for namespaced resources.
serviceAccountobject{"annotations":{},"automount":true,"create":true,"name":""}ServiceAccount configuration.
serviceAccount.createbooltrueCreate a dedicated ServiceAccount.
serviceAccount.automountbooltrueMount the ServiceAccount token into the pod.
serviceAccount.annotationsobject{}ServiceAccount annotations.
serviceAccount.namestring""Existing ServiceAccount name to use. When empty, a name is generated.
podAnnotationsobject{}Extra annotations added to the pod template.
podLabelsobject{}Extra labels added to the pod template.
podSecurityContextobject{}Pod-level security context.
securityContextobject{}Container-level security context.
serviceobject{"port":9100,"type":"ClusterIP"}Service configuration.
service.typestring"ClusterIP"Kubernetes Service type.
service.portint9100Metrics port exposed by the Service and container.
resourcesobject{}CPU and memory requests/limits for the container.
authobject{"createSecret":false,"existingSecretName":"","id":"","secret":"","secretKeys":{"id":"","secret":"","token":"csa-api-token"},"token":""}Authentication settings for the CSA API.
auth.createSecretboolfalseCreate a Secret from values in this chart instead of referencing an existing one.
auth.existingSecretNamestring""Existing Secret name containing either token auth or id/secret auth keys.
auth.secretKeysobject{"id":"","secret":"","token":"csa-api-token"}Secret keys used to read credentials from the Secret. Token auth takes precedence.
auth.secretKeys.tokenstring"csa-api-token"Secret key containing the CSA API token.
auth.secretKeys.idstring""Secret key containing the CSA API client ID.
auth.secretKeys.secretstring""Secret key containing the CSA API client secret.
auth.tokenstring""Token value written to the generated Secret. Takes precedence over id/secret auth.
auth.idstring""Client ID value written to the generated Secret when using key-pair auth.
auth.secretstring""Client secret value written to the generated Secret when using key-pair auth.
envobject{"apiTimeout":"","apiUrl":"","logLevel":""}Optional runtime environment overrides passed to the container.
env.apiUrlstring""Override the CSA API base URL expected by the exporter image.
env.apiTimeoutstring""Override the outbound CSA API timeout value.
env.logLevelstring""Override the exporter log level.
extraEnvlist[]Additional environment variables appended to the container.
extraVolumeMountslist[]Additional volume mounts appended to the container.
extraVolumeslist[]Additional volumes appended to the pod.
serviceMonitorobject`{"selfMonitor":{"additionalMetricsRelabels":{},"additionalRelabeling":[{"action":"labeldrop","regex":"(instancepod)"}],"enabled":true,"interval":"1h","labels":{},"path":"/metrics","scrapeTimeout":"60s"}}`
serviceMonitor.selfMonitorobject`{"additionalMetricsRelabels":{},"additionalRelabeling":[{"action":"labeldrop","regex":"(instancepod)"}],"enabled":true,"interval":"1h","labels":{},"path":"/metrics","scrapeTimeout":"60s"}`
serviceMonitor.selfMonitor.enabledbooltrueCreate a ServiceMonitor when the CRD is available.
serviceMonitor.selfMonitor.pathstring"/metrics"Metrics path scraped by Prometheus.
serviceMonitor.selfMonitor.additionalMetricsRelabelsobject{}Extra metric relabeling rules for scraped metrics.
serviceMonitor.selfMonitor.additionalRelabelinglist`[{"action":"labeldrop","regex":"(instancepod)"}]`
serviceMonitor.selfMonitor.additionalRelabeling[0].regexstring`"(instancepod)"`
serviceMonitor.selfMonitor.labelsobject{}Additional labels added to the ServiceMonitor.
serviceMonitor.selfMonitor.intervalstring"1h"Prometheus scrape interval.
serviceMonitor.selfMonitor.scrapeTimeoutstring"60s"Prometheus scrape timeout.
livenessProbeobject{"httpGet":{"path":"/livez","port":"http"}}Liveness probe configuration for the exporter container.
livenessProbe.httpGet.pathstring"/livez"HTTP path used by the liveness probe.
livenessProbe.httpGet.portstring"http"Named port used by the liveness probe.
readinessProbeobject{"httpGet":{"path":"/healthz","port":"http"}}Readiness probe configuration for the exporter container.
readinessProbe.httpGet.pathstring"/healthz"HTTP path used by the readiness probe.
readinessProbe.httpGet.portstring"http"Named port used by the readiness probe.
nodeSelectorobject{}Node selector for pod scheduling.
tolerationslist[]Tolerations for pod scheduling.
affinityobject{}Affinity rules for pod scheduling.

Deploy csa-exporter with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has csa-exporter on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartcsa-exporter is pinned at v0.1.4 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply