promlens

by christianhuth

Helm chartv1.7.1App v0.4.0Verified publisher

PromLens is a tool that makes learning and using PromQL easier and more productive

About this chart

promlens

PromLens is a tool that makes learning and using PromQL easier and more productive

TL;DR;

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

Or install it from the OCI registry:

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

Introduction

This chart bootstraps Promlens - The query builder, analyzer, and explainer for PromQL 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/promlens

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/promlens

These commands deploy Promlens 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
config.grafana.apiTokenstring""The auth token to pass to the Grafana API, see https://grafana.com/docs/grafana/latest/http_api/auth/
config.grafana.defaultDatasourceIdstring""The default Grafana datasource ID to use (overrides Grafana's own default).
config.grafana.enabledboolfalseEnable integration with Grafana
config.grafana.existingSecretstring""An existing secret containing the auth token, key needs to be api-token
config.grafana.urlstring""The URL of your Grafana installation
config.log.formatstring"json"Output format of log messages. One of: [logfmt, json]
config.log.levelstring"info"Only log messages with the given severity or above. One of: [debug, info, warn, error]
config.sharedLinks.gcs.bucketstring""Name of the GCS bucket for storing shared links
config.sharedLinks.gcs.enabledboolfalseEnable Link Sharing via Google Storage Bucket
config.sharedLinks.gcs.existingSecretstring""An existing secret containing the credentials for the storage-account as json, key needs to be gcs-cred.json
config.sharedLinks.gcs.storageAccountstring""Google Cloud Storage Account key
config.sharedLinks.sql.createTablesbooltrueWhether to automatically create the required tables when using a SQL database for shared links.
config.sharedLinks.sql.driverstring"sqlite"The SQL driver to use for storing shared links in a SQL database. Supported values: [mysql, sqlite].
config.sharedLinks.sql.dsnstring"/tmp/promlens-links.db"SQL Data Source Name when using a SQL database to shared links (see https://github.com/go-sql-driver/mysql#dsn-data-source-name) for MySQL, https://github.com/glebarez/go-sqlite#example for SQLite)
config.sharedLinks.sql.enabledboolfalseEnable Link Sharing via SQL database
config.sharedLinks.sql.existingSecretstring""An existing secret containing the dsn for the link storage backend, key needs to be dsn
config.sharedLinks.sql.retentionstring"0"The maximum retention time for shared links when using a SQL database (e.g. '10m', '12h'). Set to 0 for infinite retention.
config.web.defaultPrometheusUrlstring""The default Prometheus URL to load PromLens with.
config.web.externalUrlstring""The URL under which PromLens is externally reachable (for example, if PromLens is served via a reverse proxy). Used for generating relative and absolute links back to PromLens itself. If the URL has a path portion, it will be used to prefix all HTTP endpoints served by PromLens. If omitted, relevant URL components will be derived automatically.
config.web.routePrefixstring""
deploymentStrategyobject{}Update strategy for the deployment
fullnameOverridestring""String to fully override "promlens.fullname"
image.pullPolicystring"Always"image pull policy
image.registrystring"docker.io"image registory
image.repositorystring"prom/promlens"image repository
image.tagstring"v0.4.0"Overrides the image tag
imagePullSecretslist[]If defined, uses a Secret to pull an image from a private Docker registry or repository.
ingress.annotationsobject{}Annotations to add to the ingress
ingress.classNamestring""Ingress class name
ingress.enabledboolfalseEnable ingress
ingress.hosts[0].hoststring"chart-example.local"
ingress.hosts[0].paths[0].pathstring"/"
ingress.hosts[0].paths[0].pathTypestring"ImplementationSpecific"
ingress.tlslist[]
nameOverridestring""Provide a name in place of promlens
nodeSelectorobject{}Node labels for pod assignment
podAnnotationsobject{}Annotations to be added to exporter pods
podSecurityContextobject{}Pod-level security context
priorityClassNamestring""Priority class name for the pod
replicaCountint1Number of replicas
resourcesobject{}Resource limits and requests for the pods.
revisionHistoryLimitint10The 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{}container-level security context
service.portint8080Kubernetes 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
tolerationslist[]Toleration labels for pod assignment

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/promlens

Deploy promlens with OpenTenant

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