klens

Helm chart

The values of the klens Helm chart and the rules it checks at render time.

The chart is published to oci://ghcr.io/marcocondrache/charts/klens and lives in charts/klens. It needs Kubernetes 1.25 or later. Deploy klens on Kubernetes walks through an install.

Resources

The chart creates these resources:

ResourceCreated when
DeploymentAlways.
Service <fullname>Always. It serves the UI port.
Service <fullname>-mcpconfig.mcp is set, or mcp.enabled is true. It serves only /mcp.
ConfigMapexistingConfigMap is empty. It holds config as config.yaml.
Secretsecret.existingSecret is empty and secret.stringData has keys.
ServiceAccountserviceAccount.create is true.
Ingressingress.enabled is true.
HTTPRoutehttpRoute.enabled is true.
Test podhelm test runs. It requests /health.

The Deployment sets KLENS_CONFIG_PATH to /config/config.yaml and mounts the ConfigMap there.

Render checks

When the chart owns the ConfigMap, helm install and helm template fail in these cases:

  • config.bind is empty.
  • config.bind or config.mcp.bind is a loopback address, which the Service cannot reach.
  • The port in config.bind differs from service.port.
  • The port in config.mcp.bind differs from mcp.service.port.
  • mcp.enabled is true and config.mcp is not set.

The chart does not check the rest of config, and it checks nothing in an existingConfigMap. klens checks the file at startup.

Values

Image

ValueDefaultDescription
image.repositoryghcr.io/marcocondrache/klensThe image repository.
image.tag""The image tag. Empty uses the chart appVersion.
image.digest""A digest, sha256:…, that pins the image. It overrides image.tag.
image.pullPolicyIfNotPresentThe image pull policy.
imagePullSecrets[]The pull secrets for a private registry.
nameOverride""Replaces the chart name in resource names.
fullnameOverride""Replaces the full release name.
replicaCount1The number of pods. Sessions live in process memory, so a user who reaches another pod signs in again.

Configuration

ValueDefaultDescription
config{bind: 0.0.0.0:8080, log_level: info, clusters: {}}The klens configuration as a map. The chart writes it to config.yaml.
existingConfigMap""An existing ConfigMap with a config.yaml key, used in place of config.
env{}Extra environment variables as a map. Templated.
extraEnv[]Extra environment variables as a list. Templated.
envFrom[]Extra envFrom sources. Templated.
secret.existingSecret""An existing Secret whose keys become environment variables.
secret.stringData{}Keys for a Secret the chart creates. Ignored when secret.existingSecret is set.

A secret in config reads one of these environment variables with {env: NAME}.

Services and routes

ValueDefaultDescription
service.typeClusterIPThe type of the UI Service.
service.port8080The port of the UI Service. Must match the port in config.bind.
service.annotations{}Annotations on the UI Service.
mcp.enabledfalseCreate the MCP Service for an existingConfigMap that has an mcp block. With the inline config, a config.mcp block creates it.
mcp.service.typeClusterIPThe type of the MCP Service. It is separate from service.type, so a public UI does not make the tools public.
mcp.service.port8090The port of the MCP Service. Must match the port in config.mcp.bind.
mcp.service.annotations{}Annotations on the MCP Service.
ingress.enabledfalseCreate an Ingress for the UI.
ingress.className""The IngressClass name.
ingress.annotations{}Annotations on the Ingress.
ingress.hostsOne host, klens.example.com, with path / of type PrefixThe hosts and their paths.
ingress.tls[]The TLS settings of the Ingress.
httpRoute.enabledfalseCreate a Gateway API HTTPRoute for the UI.
httpRoute.apiVersion""The HTTPRoute API version. Empty uses gateway.networking.k8s.io/v1.
httpRoute.kind""The route kind. Empty uses HTTPRoute.
httpRoute.annotations{}Annotations on the HTTPRoute.
httpRoute.labels{}Labels on the HTTPRoute.
httpRoute.parentRefs[]The Gateways the route attaches to.
httpRoute.hostnames[]The hostnames the route matches. Templated.
httpRoute.additionalRules[]Rules placed before the default rule. Templated.
httpRoute.filters[]Filters on the default rule.
httpRoute.matchesPath prefix /The matches of the default rule.
httpRoute.httpsRedirectfalseAnswer with a 301 redirect to HTTPS in place of the backend.

Route the path prefix / to klens, so that the UI routes and /api both reach the pod. Without config.auth, list every Ingress host and HTTPRoute hostname in config.allowed_hosts.

Probes

ValueDefaultDescription
startupProbeGET /health, every 5s, 36 failuresPasses once the process listens.
livenessProbeGET /health, every 20sRestarts a process that stops answering.
readinessProbeGET /ready, every 10sPasses once klens has read the topology of every configured cluster.

Pod

ValueDefaultDescription
serviceAccount.createtrueCreate a ServiceAccount.
serviceAccount.automountfalseMount the API token. klens does not call the Kubernetes API.
serviceAccount.annotations{}Annotations on the ServiceAccount.
serviceAccount.name""The ServiceAccount name. Empty uses the full name.
deploymentAnnotations{}Annotations on the Deployment.
podAnnotations{}Annotations on the pod. Templated.
podLabels{}Labels on the pod. Templated.
podSecurityContextNon-root user and group 65532, RuntimeDefault seccompThe pod security context.
securityContextNo privilege escalation, read-only root file system, all capabilities droppedThe container security context.
resources{}Resource requests and limits.
volumes[]Extra volumes, such as a Secret of TLS PEM files.
volumeMounts[]Extra volume mounts on the container.
nodeSelector{}The node selector. Templated.
tolerations[]Tolerations. Templated.
affinity{}Affinity rules. Templated.
topologySpreadConstraints[]Topology spread constraints. Templated.
priorityClassName""The PriorityClass. Empty uses the cluster default.
terminationGracePeriodSeconds30The grace period for shutdown.

Tests

ValueDefaultDescription
tests.image.repositorymirror.gcr.io/curlimages/curlThe image of the helm test pod.
tests.image.tag8.22.0@sha256:…The tag and digest of that image.
tests.image.pullPolicyIfNotPresentThe pull policy of that image.

klens serves no /metrics route, and the chart creates no ServiceMonitor.

On this page