freebox-exporter

by captnbp

Helm chartv1.0.0App 1.0.0Verified publisher

freebox-exporter is a simple Prometheus exporter for the Freebox

About this chart

freebox-exporter

freebox-exporter is a simple Prometheus exporter for the Freebox.

Overview of freebox-exporter

Trademarks: This software listing is packaged. The respective trademarks mentioned in the offering are owned by the respective companies, and use of them does not imply any affiliation or endorsement.

Introduction

This chart bootstraps freebox-exporter on Kubernetes using the Helm package manager.

Prerequisites

  • Kubernetes 1.24+
  • Helm 3.8.0+
  • IPv6 enabled Kubernetes cluster

Installing the Chart

To install the chart with the release name freebox-exporter:

  1. Install the freebox-exporter localy to retreive the token.json file with the API credentials :
    go install github.com/trazfr/freebox-exporter@latest
    
  2. Run the binary create the token.json file :
    freebox-exporter -httpDiscovery token.json
    
  3. Create the Kubernetes secret which will contain the token.json
    kubectl create namespace freebox-exporter
    kubectl create secret generic -n freebox-exporter freebox-exporter-token --from-file=token.json
    
  4. Install the chart
    helm install -n freebox-exporter freebox-exporter --set configuration.existingSecret=freebox-exporter-token oci://registry-1.docker.io/captnbp/freebox-exporter
    

The command deploys freebox-exporter on the Kubernetes cluster in the default configuration. The configuration section lists the parameters that can be configured during installation.

Uninstalling the Chart

To uninstall/delete the freebox-exporter release:

helm delete -n freebox-exporter freebox-exporter

The command removes all the Kubernetes components associated with the chart and deletes the release.

Parameters

Global parameters

NameDescriptionValue
global.imageRegistryGlobal Docker image registry""
global.imagePullSecretsGlobal Docker registry secret names as an array[]
global.storageClassGlobal StorageClass for Persistent Volume(s)""

Common parameters

NameDescriptionValue
kubeVersionForce target Kubernetes version (using Helm capabilities if not set)""
nameOverrideString to partially override freebox-exporter.name template with a string (will prepend the release name)""
fullnameOverrideString to fully override freebox-exporter.fullname template with a string""
namespaceOverrideString to fully override common.names.namespace""
commonLabelsAdd labels to all the deployed resources{}
commonAnnotationsAdd annotations to all the deployed resources{}
diagnosticMode.enabledEnable diagnostic mode (all probes will be disabled and the command will be overridden)false
diagnosticMode.commandCommand to override all containers in the the deployment(s)/statefulset(s)["sleep"]
diagnosticMode.argsArgs to override all containers in the the deployment(s)/statefulset(s)["infinity"]

freebox-exporter parameters

NameDescriptionValue
configuration.existingSecretSecret with token.json configuration file (replaces the configuration.config value)""
configuration.configContent of the generated token.json file""
hostAliasesAdd deployment host aliases[]
serviceAccount.createSpecifies whether a ServiceAccount should be createdtrue
serviceAccount.nameName of the service account to use. If not set and create is true, a name is generated using the fullname template.""
serviceAccount.automountServiceAccountTokenAutomount service account token for the server service accountfalse
serviceAccount.annotationsAnnotations for service account. Evaluated as a template. Only used if create is true.{}
image.registryfreebox-exporter image registrydocker.io
image.repositoryfreebox-exporter image repositorycaptnbp/freebox-exporter
image.digestfreebox-exporter image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag""
image.pullPolicyfreebox-exporter image pull policyIfNotPresent
image.pullSecretsSpecify docker-registry secret names as an array[]
extraArgsAdditional command line arguments to pass to freebox-exporter{}
commandOverride default container command (useful when using custom images)["/app/freebox-exporter"]
argsOverride default container args (useful when using custom images)["-httpDiscovery","/opt/freebox-exporter/token.json"]
lifecycleHooksfor the freebox-exporter container(s) to automate configuration before or after startup{}
extraEnvVarsArray with extra environment variables to add to freebox-exporter nodes[]
extraEnvVarsCMName of existing ConfigMap containing extra env vars for freebox-exporter pod(s)""
extraEnvVarsSecretName of existing Secret containing extra env vars for freebox-exporter pod(s)""
extraVolumesOptionally specify extra list of additional volumes for the freebox-exporter pod(s)[]
extraVolumeMountsOptionally specify extra list of additional volumeMounts for the freebox-exporter container(s)[]
sidecarsAdd additional sidecar containers to the freebox-exporter pod(s)[]
initContainersAdd additional init containers to the freebox-exporter pod(s)[]
podSecurityContext.enabledEnabled freebox-exporter pods' Security Contexttrue
podSecurityContext.fsGroupSet freebox-exporter pod's Security Context fsGroup1001
containerSecurityContext.enabledEnabled freebox-exporter containers' Security Contexttrue
containerSecurityContext.runAsUserSet freebox-exporter containers' Security Context runAsUser1001
containerSecurityContext.runAsNonRootSet freebox-exporter container's Security Context runAsNonRoottrue
service.typeKubernetes service typeClusterIP
service.ports.httpfreebox-exporter service port9091
service.nodePorts.httpSpecify the nodePort value for the LoadBalancer and NodePort service types.""
service.clusterIPSpecific cluster IP when service type is cluster IP. Use None for headless service""
service.loadBalancerIPloadBalancerIP if service type is LoadBalancer""
service.loadBalancerSourceRangesAddress that are allowed when svc is LoadBalancer[]
service.externalTrafficPolicyfreebox-exporter service external traffic policyCluster
service.extraPortsExtra ports to expose (normally used with the sidecar value)[]
service.annotationsAdditional annotations for freebox-exporter service{}
service.labelsAdditional labels for freebox-exporter service{}
service.sessionAffinitySession Affinity for Kubernetes service, can be "None" or "ClientIP"None
service.sessionAffinityConfigAdditional settings for the sessionAffinity{}
service.ipFamilyPolicyController Service ipFamilyPolicy (optional, cloud specific)PreferDualStack
service.ipFamilies

Deploy freebox-exporter with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has freebox-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 chartfreebox-exporter is pinned at v1.0.0 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