newt

by Fossorial

Helm chartv1.6.0App 1.20.0MITVerified publisher

Helm chart to deploy Newt (fosrl/newt) client instance

About this chart

Newt Helm Chart

Helm chart to deploy Newt (fosrl/newt) client instance

✨ Features

  • Env var or CLI flag configuration
  • Newt 1.11+ provisioning support (key-based bootstrap)
  • First-class writable config persistence for CONFIG_FILE (emptyDir or existing PVC)
  • Provisioning blueprint support (single-use)
  • Optional mTLS (PKCS12) secret mount
  • Optional up/down script injection
  • Native WireGuard (privileged) mode (opt-in)
  • Health file based probes & helm test Jobs
  • RBAC Role/ClusterRole (opt-in)
  • NetworkPolicy (opt-in)
  • Prometheus metrics, PodMonitor, ServiceMonitor, PrometheusRule (opt-in)
  • Optional pprof endpoint enablement (opt-in)
  • Multi-instance (array-driven) deployments with per-instance overrides

Prerequisites

  • Kubernetes >= 1.30.14
  • Helm 3.x
  • kubectl >= v1.30.14
  • Newt Credentials from Pangolin

Quick Start

See QUICKSTART-NEWT.md for detailed instructions.

Newt 1.11.0 notes (Chart version 1.3.0+)

  • This chart targets Newt 1.11.0 by default.
  • Upstream ping defaults changed in Newt 1.11.0. If you rely on the older 1.10.1 behavior, set newtInstances[x].pingInterval and newtInstances[x].pingTimeout explicitly.
  • Legacy installs using ID/secret (including auth.existingSecretName) still work unchanged.

Provisioning examples

Provisioning (emptyDir) + writable config persistence

newtInstances:
  - name: main-tunnel
    enabled: true
    pangolinEndpoint: https://pangolin.example.com
    provisioningKey: "YOUR_PROVISIONING_KEY"
    newtName: "my-site"

    # Required for provisioning-based installs so Newt can write credentials
    configPersistence:
      enabled: true
      type: emptyDir
      mountPath: /var/lib/newt
      fileName: config.json

Provisioning (existing PVC) + writable config persistence

newtInstances:
  - name: main-tunnel
    enabled: true
    pangolinEndpoint: https://pangolin.example.com
    provisioningKey: "YOUR_PROVISIONING_KEY"
    newtName: "my-site"

    configPersistence:
      enabled: true
      type: persistentVolumeClaim
      existingClaim: my-newt-config
      mountPath: /var/lib/newt
      fileName: config.json

Provisioning blueprint (single-use)

newtInstances:
  - name: main-tunnel
    enabled: true
    pangolinEndpoint: https://pangolin.example.com
    provisioningKey: "YOUR_PROVISIONING_KEY"
    newtName: "my-site"

    configPersistence:
      enabled: true
      type: emptyDir

    provisioningBlueprintFile: /etc/newt/provisioning-blueprint.yaml
    provisioningBlueprintData: |
      version: 1
      routes: []

pprof enablement

global:
  metrics:
    pprofEnabled: true

Values

KeyTypeDefaultDescription
global.additionalAnnotationsobject{}Additional annotations applied to all rendered resources.
global.additionalLabelsobject{}Additional labels applied to all rendered resources.
global.additionalServiceAnnotationsobject{}Additional annotations applied to external Service resources.
global.additionalServiceLabelsobject{}Additional labels applied to external Service resources.
global.affinityobject{"nodeAffinity":{},"podAffinity":{},"podAntiAffinity":{}}Pod affinity and anti-affinity
global.affinity.nodeAffinityobject{}Node affinity rules
global.affinity.podAffinityobject{}Pod affinity rules
global.affinity.podAntiAffinityobject{}Pod anti-affinity rules
global.deploymentAnnotationsobject{}Additional annotations applied to Deployment resources.
global.deploymentLabelsobject{}Additional labels applied to Deployment resources.
global.extraEnvobject{}Extra environment variables injected into all containers (global scope). Map format: KEY: "value"
global.fullnameOverridestring""Fully override the computed fullname.
global.healthobject{"enabled":false,"path":"/tmp/healthy","readinessFailureThreshold":3}---------------------------------------------------------------------------
global.health.pathstring"/tmp/healthy"Health file path checked by probes
global.health.readinessFailureThresholdint3Readiness probe failure threshold
global.imageobject{"digest":"","imagePullPolicy":"IfNotPresent","imagePullSecrets":[],"registry":"docker.io","repository":"fosrl/newt","tag":""}Global container image configuration used by all chart components.
global.image.digeststring""Image digest (overrides tag when set). Format: sha256:<64-hex>.
global.image.imagePullPolicystring"IfNotPresent"Image pull policy.
global.image.imagePullSecretslist[]Image pull secrets (list of Kubernetes Secret references). Each entry should be an object like: { name: "my-secret" }
global.image.registrystring"docker.io"Container image registry (e.g., docker.io, ghcr.io, registry.example.com).
global.image.repositorystring"fosrl/newt"Container image repository (e.g., fosrl/newt).
global.image.tagstring""Image tag (defaults to Chart.appVersion if empty).
global.logLevelstring"INFO"Global log level
global.metricsobject{"adminAddr":":2112","annotations":{},"asyncBytes":false,"enabled":false,"otel":{"exporterOtlpEndpoint":"","exporterOtlpHeaders":"","exporterOtlpProtocol":"","serviceName":""},"otlpEnabled":false,"path":"/metrics","podMonitor":{"annotations":{},"apiVersion":"monitoring.coreos.com/v1","enabled":false,"honorLabels":true,"interval":"30s","labels":{},"metricRelabelings":[],"namespace":"","path":"/metrics","portName":"metrics","relabelings":[],"scheme":"http","scrapeTimeout":"10s"},"port":9090,"portName":"metrics","pprofEnabled":false,"prometheusRule":{"apiVersion":"monitoring.coreos.com/v1","enabled":false,"labels":{},"namespace":"","rules":[]},"region":"","service":{"annotations":{},"enabled":false,"port":2112,"portName":"metrics","type":"ClusterIP"},"serviceMonitor":{"apiVersion":"monitoring.coreos.com/v1","enabled":false,"interval":"30s","jobLabel":"","labels":{},"metricRelabelings":[],"namespace":"","relabelings":[],"sampleLimit":0,"scheme":"http","scrapeTimeout":"10s","targetLabels":[]},"targetPortName":""}--------------------------------------------------------------------------- @section Global Metrics
global.metrics.adminAddrstring":2112"Address Newt binds for the metrics/admin server (NEWT_ADMIN_ADDR). AUTHORITATIVE for the metrics port: the container port, the Service targetPort and the prometheus.io/port annotation are all derived from it, so they cannot drift apart the way they did before (#16). ":2112" listens on all interfaces, which in-cluster Prometheus scraping requires. "127.0.0.1:2112" restricts to loopback and therefore disables scraping.
global.metrics.annotationsobject{}Extra annotations added to metrics-related objects (e.g., Pods/Service depending on chart logic)
global.metrics.asyncBytesboolfalseEnable async bytes metrics (NEWT_METRICS_ASYNC_BYTES)
global.metrics.enabledboolfalseEnable Prometheus-compatible metrics exposure
global.metrics.otelobject{"exporterOtlpEndpoint":"","exporterOtlpHeaders":"","exporterOtlpProtocol":"","serviceName":""}OTEL exporter configuration (used when otlpEnabled=true) These are passed as environment variables to the container
global.metrics.otel.exporterOtlpEndpointstring""OTLP endpoint (OTEL_EXPORTER_OTLP_ENDPOINT)
global.metrics.otel.exporterOtlpHeadersstring""OTLP headers (OTEL_EXPORTER_OTLP_HEADERS) - comma-separated key=value pairs
global.metrics.otel.exporterOtlpProtocolstring""OTLP exporter protocol (OTEL_EXPORTER_OTLP_PROTOCOL) - grpc, http/protobuf, or http/json
global.metrics.otel.serviceNamestring""Service name for OTLP (OTEL_SERVICE_NAME)
global.metrics.otlpEnabledboolfalseEnable OTLP exporter (NEWT_METRICS_OTLP_ENABLED)
global.metrics.pathstring"/metrics"Metrics HTTP path
global.metrics.podMonitorobject{"annotations":{},"apiVersion":"monitoring.coreos.com/v1","enabled":false,"honorLabels":true,"interval":"30s","labels":{},"metricRelabelings":[],"namespace":"","path":"/metrics","portName":"metrics","relabelings":[],"scheme":"http","scrapeTimeout":"10s"}---------------------------------------------------------------------------
global.metrics.podMonitor.annotationsobject{}Extra annotations applied to the PodMonitor
global.metrics.podMonitor.apiVersionstring"monitoring.coreos.com/v1"PodMonitor API version (Prometheus Operator)
global.metrics.podMonitor.enabledboolfalseCreate a PodMonitor resource
global.metrics.podMonitor.honorLabelsbooltrueWhether to honor labels from the scraped target
global.metrics.podMonitor.intervalstring"30s"Scrape interval (Prometheus duration, e.g., 30s, 1m)
global.metrics.podMonitor.labelsobject{}Extra labels applied to the PodMonitor
global.metrics.podMonitor.metricRelabelingslist[]Metric relabeling rules (Prometheus Operator schema; treated as opaque objects)
global.metrics.podMonitor.namespacestring""Namespace override for PodMonitor (empty = release namespace)
global.metrics.podMonitor.pathstring"/metrics"Metrics path
global.metrics.podMonitor.portNamestring"metrics"Scrape port name (must match a named port on the Pod/Service endpoints)
global.metrics.podMonitor.relabelingslist[]Relabeling rules (Prometheus Operator schema; treated as opaque objects)
global.metrics.podMonitor.schemestring"http"HTTP scheme for scraping
global.metrics.podMonitor.scrapeTimeoutstring"10s"Scrape timeout (must be <= interval)
global.metrics.portint9090DEPRECATED: use adminAddr, which is what Newt actually binds. Kept for compatibility: when set to a non-default value while adminAddr is still ":2112", it is used as the listen port so existing values files render the same port numbers as before. It no longer defines the container port on its own.
global.metrics.portNamestring"metrics"Optional Service port name (used when creating a Service)
global.metrics.pprofEnabledboolfalseEnable pprof endpoints (NEWT_PPROF_ENABLED). Disabled by default.
global.metrics.prometheusRuleobject{"apiVersion":"monitoring.coreos.com/v1","enabled":false,"labels":{},"namespace":"","rules":[]}---------------------------------------------------------------------------
global.metrics.prometheusRule.apiVersionstring"monitoring.coreos.com/v1"PrometheusRule API version (Prometheus Operator)
global.metrics.prometheusRule.enabledboolfalseCreate a PrometheusRule resource
global.metrics.prometheusRule.labelsobject{}Extra labels applied to the PrometheusRule
global.metrics.prometheusRule.namespacestring""Namespace override for PrometheusRule (empty = release namespace)
global.metrics.prometheusRule.ruleslist[]Rule groups/rules (templated). Structure is PrometheusRule-compatible; treated as opaque objects.
global.metrics.regionstring""Region for metrics/telemetry (NEWT_REGION)
global.metrics.serviceobject{"annotations":{},"enabled":false,"port":2112,"portName":"metrics","type":"ClusterIP"}---------------------------------------------------------------------------
global.metrics.service.annotationsobject{}Additional Service annotations
global.metrics.service.enabledboolfalseCreate a dedicated Service for metrics scraping
global.metrics.service.portint2112Service port exposed for scraping (matches adminAddr default port 2112)
global.metrics.service.portNamestring"metrics"Service port name
global.metrics.service.typestring"ClusterIP"Kubernetes Service type
global.metrics.serviceMonitorobject{"apiVersion":"monitoring.coreos.com/v1","enabled":false,"interval":"30s","jobLabel":"","labels":{},"metricRelabelings":[],"namespace":"","relabelings":[],"sampleLimit":0,"scheme":"http","scrapeTimeout":"10s","targetLabels":[]}---------------------------------------------------------------------------
global.metrics.serviceMonitor.apiVersionstring"monitoring.coreos.com/v1"ServiceMonitor API version (Prometheus Operator)
global.metrics.serviceMonitor.enabledboolfalseCreate a ServiceMonitor resource
global.metrics.serviceMonitor.intervalstring"30s"Scrape interval (Prometheus duration, e.g., 30s, 1m)
global.metrics.serviceMonitor.jobLabelstring""Job label override (if your Prometheus setup uses a custom jobLabel)
global.metrics.serviceMonitor.labelsobject{}Extra labels applied to the ServiceMonitor
global.metrics.serviceMonitor.metricRelabelingslist[]Metric relabeling rules (Prometheus Operator schema; treated as opaque objects)
global.metrics.serviceMonitor.namespacestring""Namespace override for ServiceMonitor (empty = release namespace)
global.metrics.serviceMonitor.relabelingslist[]Relabeling rules (Prometheus Operator schema; treated as opaque objects)
global.metrics.serviceMonitor.sampleLimitint

Deploy newt with OpenTenant

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