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].pingIntervalandnewtInstances[x].pingTimeoutexplicitly. - 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
| Key | Type | Default | Description |
|---|---|---|---|
| global.additionalAnnotations | object | {} | Additional annotations applied to all rendered resources. |
| global.additionalLabels | object | {} | Additional labels applied to all rendered resources. |
| global.additionalServiceAnnotations | object | {} | Additional annotations applied to external Service resources. |
| global.additionalServiceLabels | object | {} | Additional labels applied to external Service resources. |
| global.affinity | object | {"nodeAffinity":{},"podAffinity":{},"podAntiAffinity":{}} | Pod affinity and anti-affinity |
| global.affinity.nodeAffinity | object | {} | Node affinity rules |
| global.affinity.podAffinity | object | {} | Pod affinity rules |
| global.affinity.podAntiAffinity | object | {} | Pod anti-affinity rules |
| global.deploymentAnnotations | object | {} | Additional annotations applied to Deployment resources. |
| global.deploymentLabels | object | {} | Additional labels applied to Deployment resources. |
| global.extraEnv | object | {} | Extra environment variables injected into all containers (global scope). Map format: KEY: "value" |
| global.fullnameOverride | string | "" | Fully override the computed fullname. |
| global.health | object | {"enabled":false,"path":"/tmp/healthy","readinessFailureThreshold":3} | --------------------------------------------------------------------------- |
| global.health.path | string | "/tmp/healthy" | Health file path checked by probes |
| global.health.readinessFailureThreshold | int | 3 | Readiness probe failure threshold |
| global.image | object | {"digest":"","imagePullPolicy":"IfNotPresent","imagePullSecrets":[],"registry":"docker.io","repository":"fosrl/newt","tag":""} | Global container image configuration used by all chart components. |
| global.image.digest | string | "" | Image digest (overrides tag when set). Format: sha256:<64-hex>. |
| global.image.imagePullPolicy | string | "IfNotPresent" | Image pull policy. |
| global.image.imagePullSecrets | list | [] | Image pull secrets (list of Kubernetes Secret references). Each entry should be an object like: { name: "my-secret" } |
| global.image.registry | string | "docker.io" | Container image registry (e.g., docker.io, ghcr.io, registry.example.com). |
| global.image.repository | string | "fosrl/newt" | Container image repository (e.g., fosrl/newt). |
| global.image.tag | string | "" | Image tag (defaults to Chart.appVersion if empty). |
| global.logLevel | string | "INFO" | Global log level |
| global.metrics | object | {"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.adminAddr | string | ":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.annotations | object | {} | Extra annotations added to metrics-related objects (e.g., Pods/Service depending on chart logic) |
| global.metrics.asyncBytes | bool | false | Enable async bytes metrics (NEWT_METRICS_ASYNC_BYTES) |
| global.metrics.enabled | bool | false | Enable Prometheus-compatible metrics exposure |
| global.metrics.otel | object | {"exporterOtlpEndpoint":"","exporterOtlpHeaders":"","exporterOtlpProtocol":"","serviceName":""} | OTEL exporter configuration (used when otlpEnabled=true) These are passed as environment variables to the container |
| global.metrics.otel.exporterOtlpEndpoint | string | "" | OTLP endpoint (OTEL_EXPORTER_OTLP_ENDPOINT) |
| global.metrics.otel.exporterOtlpHeaders | string | "" | OTLP headers (OTEL_EXPORTER_OTLP_HEADERS) - comma-separated key=value pairs |
| global.metrics.otel.exporterOtlpProtocol | string | "" | OTLP exporter protocol (OTEL_EXPORTER_OTLP_PROTOCOL) - grpc, http/protobuf, or http/json |
| global.metrics.otel.serviceName | string | "" | Service name for OTLP (OTEL_SERVICE_NAME) |
| global.metrics.otlpEnabled | bool | false | Enable OTLP exporter (NEWT_METRICS_OTLP_ENABLED) |
| global.metrics.path | string | "/metrics" | Metrics HTTP path |
| global.metrics.podMonitor | object | {"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.annotations | object | {} | Extra annotations applied to the PodMonitor |
| global.metrics.podMonitor.apiVersion | string | "monitoring.coreos.com/v1" | PodMonitor API version (Prometheus Operator) |
| global.metrics.podMonitor.enabled | bool | false | Create a PodMonitor resource |
| global.metrics.podMonitor.honorLabels | bool | true | Whether to honor labels from the scraped target |
| global.metrics.podMonitor.interval | string | "30s" | Scrape interval (Prometheus duration, e.g., 30s, 1m) |
| global.metrics.podMonitor.labels | object | {} | Extra labels applied to the PodMonitor |
| global.metrics.podMonitor.metricRelabelings | list | [] | Metric relabeling rules (Prometheus Operator schema; treated as opaque objects) |
| global.metrics.podMonitor.namespace | string | "" | Namespace override for PodMonitor (empty = release namespace) |
| global.metrics.podMonitor.path | string | "/metrics" | Metrics path |
| global.metrics.podMonitor.portName | string | "metrics" | Scrape port name (must match a named port on the Pod/Service endpoints) |
| global.metrics.podMonitor.relabelings | list | [] | Relabeling rules (Prometheus Operator schema; treated as opaque objects) |
| global.metrics.podMonitor.scheme | string | "http" | HTTP scheme for scraping |
| global.metrics.podMonitor.scrapeTimeout | string | "10s" | Scrape timeout (must be <= interval) |
| global.metrics.port | int | 9090 | DEPRECATED: 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.portName | string | "metrics" | Optional Service port name (used when creating a Service) |
| global.metrics.pprofEnabled | bool | false | Enable pprof endpoints (NEWT_PPROF_ENABLED). Disabled by default. |
| global.metrics.prometheusRule | object | {"apiVersion":"monitoring.coreos.com/v1","enabled":false,"labels":{},"namespace":"","rules":[]} | --------------------------------------------------------------------------- |
| global.metrics.prometheusRule.apiVersion | string | "monitoring.coreos.com/v1" | PrometheusRule API version (Prometheus Operator) |
| global.metrics.prometheusRule.enabled | bool | false | Create a PrometheusRule resource |
| global.metrics.prometheusRule.labels | object | {} | Extra labels applied to the PrometheusRule |
| global.metrics.prometheusRule.namespace | string | "" | Namespace override for PrometheusRule (empty = release namespace) |
| global.metrics.prometheusRule.rules | list | [] | Rule groups/rules (templated). Structure is PrometheusRule-compatible; treated as opaque objects. |
| global.metrics.region | string | "" | Region for metrics/telemetry (NEWT_REGION) |
| global.metrics.service | object | {"annotations":{},"enabled":false,"port":2112,"portName":"metrics","type":"ClusterIP"} | --------------------------------------------------------------------------- |
| global.metrics.service.annotations | object | {} | Additional Service annotations |
| global.metrics.service.enabled | bool | false | Create a dedicated Service for metrics scraping |
| global.metrics.service.port | int | 2112 | Service port exposed for scraping (matches adminAddr default port 2112) |
| global.metrics.service.portName | string | "metrics" | Service port name |
| global.metrics.service.type | string | "ClusterIP" | Kubernetes Service type |
| global.metrics.serviceMonitor | object | {"apiVersion":"monitoring.coreos.com/v1","enabled":false,"interval":"30s","jobLabel":"","labels":{},"metricRelabelings":[],"namespace":"","relabelings":[],"sampleLimit":0,"scheme":"http","scrapeTimeout":"10s","targetLabels":[]} | --------------------------------------------------------------------------- |
| global.metrics.serviceMonitor.apiVersion | string | "monitoring.coreos.com/v1" | ServiceMonitor API version (Prometheus Operator) |
| global.metrics.serviceMonitor.enabled | bool | false | Create a ServiceMonitor resource |
| global.metrics.serviceMonitor.interval | string | "30s" | Scrape interval (Prometheus duration, e.g., 30s, 1m) |
| global.metrics.serviceMonitor.jobLabel | string | "" | Job label override (if your Prometheus setup uses a custom jobLabel) |
| global.metrics.serviceMonitor.labels | object | {} | Extra labels applied to the ServiceMonitor |
| global.metrics.serviceMonitor.metricRelabelings | list | [] | Metric relabeling rules (Prometheus Operator schema; treated as opaque objects) |
| global.metrics.serviceMonitor.namespace | string | "" | Namespace override for ServiceMonitor (empty = release namespace) |
| global.metrics.serviceMonitor.relabelings | list | [] | Relabeling rules (Prometheus Operator schema; treated as opaque objects) |
| global.metrics.serviceMonitor.sampleLimit | int |
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.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartnewt is pinned at v1.6.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- 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