dnsbl-exporter

by christianhuth

Helm chartv1.4.1App v0.7.0-rc3Verified publisher

Prometheus compatible exporter to query DNSBLs/RBLs.

About this chart

dnsbl-exporter

Prometheus compatible exporter to query DNSBLs/RBLs.

TL;DR;

helm repo add christianhuth https://charts.christianhuth.de
helm repo update
helm install my-release christianhuth/dnsbl-exporter

Or install it from the OCI registry:

helm install my-release oci://ghcr.io/christianhuth/helm-charts/dnsbl-exporter

Introduction

This chart bootstraps the Prometheus DNS Blacklist Exporter using the Helm package manager.

Prerequisites

  • Kubernetes 1.19+

Installing the Chart

To install the chart with the release name my-release:

helm repo add christianhuth https://charts.christianhuth.de
helm repo update
helm install my-release christianhuth/dnsbl-exporter

The chart is also published as an OCI artifact which can be installed like this:

helm install my-release oci://ghcr.io/christianhuth/helm-charts/dnsbl-exporter

These commands deploy the DNS Blacklist Exporter on the Kubernetes cluster in the default configuration. The Values section lists the values that can be configured during installation.

Tip: List all releases using helm list

Uninstalling the Chart

To uninstall the my-release deployment:

helm uninstall my-release

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

Values

KeyTypeDefaultDescription
affinityobject{}Affinity settings for pod assignment
autoscaling.enabledboolfalse
autoscaling.maxReplicasint100
autoscaling.minReplicasint1
autoscaling.targetCPUUtilizationPercentageint80
deploymentStrategyobject{}Update strategy for the deployment
dnsblConfig.log.debugboolfalseEnable debug log level
dnsblConfig.log.formatstring"text"Define the log format. Valid values are text or json
dnsblConfig.rbl.domainBasedboolfalse
dnsblConfig.rbl.rblslist[]List of Relay Block Lists (RBLs) that should be checked
dnsblConfig.resolverstring""The URL of the DNS resolver that should be used. If unbound is enabled (unbound.enabled) this will be ignored
dnsblConfig.targetslist[]List of Targets that should be checked for in the RBLs
extraEnvlist[]Additional environment variables that will be added to the deployment
fullnameOverridestring""String to fully override "dnsbl-exporter.fullname"
image.pullPolicystring"Always"image pull policy
image.registrystring"ghcr.io"image registry
image.repositorystring"luzilla/dnsbl_exporter"image repository
image.tagstring"v0.7.0-rc3"Overrides the image tag
imagePullSecretslist[]If defined, uses a Secret to pull an image from a private Docker registry or repository.
ingress.annotationsobject{}
ingress.classNamestring""
ingress.enabledboolfalse
ingress.hosts[0].hoststring"chart-example.local"
ingress.hosts[0].paths[0].pathstring"/"
ingress.hosts[0].paths[0].pathTypestring"ImplementationSpecific"
ingress.tlslist[]
livenessProbe.enabledbooltrueEnable the livenessProbe
livenessProbe.failureThresholdint5Failure threshold for livenessProbe
livenessProbe.initialDelaySecondsint30Initial delay seconds for livenessProbe
livenessProbe.periodSecondsint30Period seconds for livenessProbe
livenessProbe.successThresholdint1Success threshold for livenessProbe
livenessProbe.timeoutSecondsint10Timeout in seconds for livenessProbe
nameOverridestring""Provide a name in place of dnsbl-exporter
nodeSelectorobject{}Node labels for pod assignment
podAnnotationsobject{}Annotations to be added to pods
podSecurityContextobject{}pod-level security context
readinessProbe.enabledbooltrueEnable the readinessProbe
readinessProbe.failureThresholdint5Failure threshold for readinessProbe
readinessProbe.initialDelaySecondsint30Initial delay seconds for readinessProbe
readinessProbe.periodSecondsint30Period seconds for readinessProbe
readinessProbe.successThresholdint1Success threshold for readinessProbe
readinessProbe.timeoutSecondsint10Timeout in seconds for readinessProbe
replicaCountint1Number of replicas
resourcesobject{"limits":{"cpu":"200m","memory":"256Mi"},"requests":{"cpu":"100m","memory":"128Mi"}}Resource limits and requests for the dnsbl exporter pods.
revisionHistoryLimitint0The number of old ReplicaSets to retain
route.main.additionalRuleslist[]Additional custom rules that can be added to the route
route.main.annotationsobject{}Add annotations to the route
route.main.apiVersionstring"gateway.networking.k8s.io/v1"Set the route apiVersion, e.g. gateway.networking.k8s.io/v1 or gateway.networking.k8s.io/v1alpha2
route.main.enabledboolfalseEnables or disables the route
route.main.filterslist[]Filters define the filters that are applied to requests that match this rule.
route.main.hostnameslist[]Hostnames to be matched
route.main.httpsRedirectboolfalseadds a filter for redirecting to https (HTTP 301 Moved Permanently). To redirect HTTP traffic to HTTPS, you need to have a Gateway with both HTTP and HTTPS listeners. Matches and filters do not take effect if enabled. Ref. https://gateway-api.sigs.k8s.io/guides/http-redirect-rewrite/
route.main.kindstring"HTTPRoute"Set the route kind Valid options are GRPCRoute, HTTPRoute, TCPRoute, TLSRoute, UDPRoute
route.main.labelsobject{}Add labels to the route
route.main.matcheslistsee values.yamldefine conditions used for matching the rule against incoming HTTP requests.
route.main.parentRefslist[]Parent references (Gateway)
route.main.timeoutsobject{}defines the timeouts that can be configured for an HTTP request
securityContextobject{"capabilities":{"drop":["ALL"]},"readOnlyRootFilesystem":true,"runAsGroup":65534,"runAsNonRoot":true,"runAsUser":65534}container-level security context
service.portint80Kubernetes port where service is exposed
service.typestring"ClusterIP"Kubernetes service type
serviceAccount.annotationsobject{}Annotations to add to the service account
serviceAccount.createbooltrueSpecifies whether a service account should be created
serviceAccount.namestring""The name of the service account to use. If not set and create is true, a name is generated using the fullname template
serviceMonitor.additionalLabelsobject{}Prometheus ServiceMonitor labels
serviceMonitor.enabledboolfalseEnable a prometheus ServiceMonitor
serviceMonitor.intervalstring"60s"Prometheus ServiceMonitor interval
serviceMonitor.metricRelabelingslist[]Prometheus [MetricRelabelConfigs] to apply to samples before ingestion
serviceMonitor.namespacestring""Prometheus ServiceMonitor namespace
serviceMonitor.relabelingslist[]Prometheus [RelabelConfigs] to apply to samples before scraping
serviceMonitor.scrapeTimeoutstring"20s"How long until a scrape request times out. It cannot be greater than the scrape interval
serviceMonitor.selectorobject{}Prometheus ServiceMonitor selector
tolerationslist[]Toleration labels for pod assignment
unbound.enabledbooltrueEnable the integrated unbound DNS resolver
unbound.image.pullPolicystring"Always"image pull policy for the unbound image
unbound.image.registrystring"ghcr.io"image registry for the unbound image
unbound.image.repositorystring"luzilla/unbound"image repository for the unbound image
unbound.image.tagstring"v0.7.0-rc3"Overrides the image tag for the unbound image
unbound.livenessProbe.enabledbooltrueEnable the livenessProbe of unbound
unbound.livenessProbe.failureThresholdint5Failure threshold for livenessProbe of unbound
unbound.livenessProbe.initialDelaySecondsint10Initial delay seconds for livenessProbe of unbound
unbound.livenessProbe.periodSecondsint30Period seconds for livenessProbe of unbound
unbound.livenessProbe.successThresholdint1Success threshold for livenessProbe of unbound
unbound.livenessProbe.timeoutSecondsint2Timeout in seconds for livenessProbe of unbound
unbound.readinessProbe.enabledbooltrueEnable the readinessProbe of unbound
unbound.readinessProbe.failureThresholdint5Failure threshold for readinessProbe of unbound
unbound.readinessProbe.initialDelaySecondsint10Initial delay seconds for readinessProbe of unbound
unbound.readinessProbe.periodSecondsint30Period seconds for readinessProbe of unbound
unbound.readinessProbe.successThresholdint1Success threshold for readinessProbe of unbound
unbound.readinessProbe.timeoutSecondsint2Timeout in seconds for readinessProbe of unbound
unbound.resourcesobject{"limits":{"cpu":"200m","memory":"200Mi"},"requests":{"cpu":"100m","memory":"32Mi"}}Resource limits and requests for the unbound pods.
unbound.securityContextobject{"capabilities":{"add":["NET_ADMIN"],"drop":["ALL"]},"readOnlyRootFilesystem":false,"runAsGroup":101,"runAsNonRoot":true,"runAsUser":100}container-level security context for the unbound DNS resolver

Specify each parameter using the --set key=value[,key=value] argument to helm install.

Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,

helm install my-release -f values.yaml christianhuth/dnsbl-exporter

Deploy dnsbl-exporter with OpenTenant

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