Skip to content
Docs
Release candidateThese docs are for Napwake 0.2.0-rc.9, a release candidate, and may change before it's released. Read the docs for the latest release.

Reference

Configuration reference

Every flag of the binary, with its default, for running Napwake from your own manifests.

View .mdAsk Claude (opens claude.ai)Ask ChatGPT (opens chatgpt.com)

The binary is /manager. The Helm chart sets its flags from its values, so you need them only for your own manifests.

Flag Default Description
#--metrics-bind-address 0 (disabled) Metrics address, :8443 for HTTPS or :8080 for HTTP. The chart and the Kustomize manifests use :8443
#--metrics-secure true HTTPS, only to callers allowed to get /metrics (TokenReview, SubjectAccessReview). A scraper needs such a token, which the chart’s metrics.readerSubjects binds (Monitoring). false is plain HTTP. See TLS configuration
#--metrics-cert-path Metrics TLS certificate directory. Without it, a self-signed one is generated
#--metrics-cert-name tls.crt Certificate file
#--metrics-cert-key tls.key Key file
#--enable-http2 false Allow HTTP/2 for metrics
#--health-probe-bind-address :8081 Probe address. See Endpoints
Flag Default Description
#--leader-elect false One replica reconciles. A leader that stops releases its lease, so the next, or a rollout’s new one, takes over at once. Ignored by the doorman, where every replica serves traffic. See Leader election
#--max-concurrent-reconciles 8 ManagedWorkloads reconciled at once, so a slow metrics or Prometheus query doesn’t hold up wakes, which queue ahead of periodic checks. At least 1
#--timezone UTC IANA zone, such as Europe/London, for forecasts’ hours and weekdays, so they follow daylight saving. Zone database built in
#--kubeconfig in-cluster Kubeconfig path, outside the cluster only
Flag Default Description
#--prometheus-url Prometheus API base URL, http or https with a host, such as http://prometheus.monitoring.svc:9090. Needed for idlePolicy.activity.prometheus. Starts each new workload’s forecast from up to four weeks of CPU history. See Learning from history
#--prometheus-selector Matchers added to the operator’s own (history) query, such as cluster="staging". Written as inside PromQL’s braces, with =, !=, =~ or !~ and a double-quoted or backquoted value, comma-separated. For a Prometheus with several clusters’ series, so another cluster’s same-named pods aren’t read as this one’s. Workloads’ activity queries run as written. Needs --prometheus-url
Flag Default Description
#--watch-namespaces every namespace Comma-separated namespaces to work in, a Role in each
#--protected-namespaces Comma-separated patterns, such as prod-*, of namespaces never managed, as if labelled napwake.dev/protected=true, unless labelled napwake.dev/allow-protected=true. kube-*, $POD_NAMESPACE and the doorman’s namespace are always protected. See Protected namespaces

For workloads opted in with the label, when neither they nor their namespace set it.

Flag Default Description
#--default-idle-after 1h Idle time before pausing. At least 1m
#--default-cpu-threshold 10 CPU % of requests that counts as active. 0.1 to 100, at most two decimal places
#--default-dry-run false Measure without pausing, unless napwake.dev/dry-run is set
#--default-pause-early false Let a confident forecast of quiet hours pause before idleAfter runs out, unless napwake.dev/pause-early is set. See Pausing early
#--default-forecast balanced How soon the forecast acts, eager, balanced or cautious, unless napwake.dev/forecast is set
#--default-wake request What wakes a paused workload through the doorman, request or ask, unless napwake.dev/wake is set. See Asking before waking
Flag Default Description
#--doorman-service napwake-doorman The doorman’s Service, where paused workloads are routed. Empty turns off wake on request
#--doorman-ports-per-workload 32 Most doorman ports per workload, one per routed Service port. Over it, it isn’t routed (WakeOnRequest=False, reason TooManyPorts)
#--doorman-ports-per-namespace 256 Most doorman ports per namespace, its workloads together
#--doorman-namespace $POD_NAMESPACE, else napwake-system The doorman Service’s namespace
#--doorman-health-check-user-agents Comma-separated User-Agent prefixes of health checkers and scrapers, besides the built-in ones, whose GET and HEAD don’t wake a workload. Helm value doorman.healthCheckUserAgents
#--wake-key-secret The doorman’s. A Secret in its namespace holding the key it signs the Wake it button with, which it fills when empty. Every replica must share it, since a click can reach any of them. Without it, each signs with its own, which works only for one replica. The chart sets <fullname>-doorman-wake-key
Flag Default Description
#--neg-forwarder false Route Services behind GKE NEGs through a forwarder Deployment the operator runs in each paused workload’s namespace, instead of leaving them unrouted. Needs create and delete on Deployments. Helm value doorman.negForwarder.enabled. See GKE container-native load balancing
#--neg-forwarder-image The forwarders’ image, the operator’s own. Required with --neg-forwarder
#--neg-forwarder-replicas 2 Pods per forwarder. At least 1
#--neg-forwarder-resources {"requests":{"cpu":"10m","memory":"32Mi"},"limits":{"memory":"64Mi"}} Each forwarder pod’s resources, as JSON
#--neg-forwarder-doorman-service napwake-doorman-pods Headless Service in --doorman-namespace selecting the doorman’s pods, whose DNS name forwarders resolve
Flag Default Description
#--doorman false Run as the doorman instead of the operator. The doorman Deployment sets it
#--forwarder false Run as a forwarder instead of the operator. The operator’s forwarder Deployments set it, with --forward (routes, comma-separated listen=doorman port pairs) and --forwarder-doorman (the doorman pods’ DNS name)
#--guard Run as the chart’s uninstall or upgrade hook (guard.uninstall, guard.upgrade). Waits up to two and a half minutes for ManagedWorkloads being deleted, then exits 1, listing those left without an operator. uninstall counts every one in --watch-namespaces (all when empty) or with the napwake.dev/cleanup finalizer. upgrade counts those with the finalizer outside the new --watch-namespaces

The operator exits with an error naming the flag.

Flag Refused when
--protected-namespaces A pattern isn’t a valid glob
--prometheus-url Not http or https with a host
--prometheus-selector Not label matchers, or set without --prometheus-url
--default-idle-after Under 1m
--default-cpu-threshold Outside 0.1 to 100, or more than two decimal places
--default-forecast Not eager, balanced or cautious
--default-wake Not request or ask
--max-concurrent-reconciles, --doorman-ports-per-workload, --doorman-ports-per-namespace Below 1
--timezone Not a known IANA zone
Endpoint Port Answers
#/healthz 8081 Liveness. 200 while the process runs
#/readyz 8081 Readiness. For the doorman, 200 once its routes are loaded and it reached the API server in the last 30 seconds. Fails while it can’t listen on a routed port for over 30 seconds, and while shutting down
/readyz, a forwarder’s 8081, or the next port the workload doesn’t serve, for both its probes 200 while it reaches the doorman on every port it passes connections to. Fails once it starts shutting down
#/metrics 8443 in the chart Prometheus metrics, HTTPS by default. See Metrics
--leader-elect=true

For HA, with more than one replica. The leader holds the Lease 479a98fc.napwake.dev in the operator’s namespace. A standby takes over if it fails.

--metrics-secure=false --metrics-bind-address=:8080

Plain HTTP. Not for production.

--metrics-cert-path=/certs/metrics

Your own certificate, not a self-signed one.

Flag Default Description
#--zap-log-level info debug, info, error, panic, or a whole number above 0 for more verbose debug levels
#--zap-encoder json json, or console for logs to read by eye (--zap-encoder=console, the chart’s logEncoder: console). The operator and the doorman log through logr (controller-runtime)
#--zap-devel false Development defaults, with console encoding, debug level and stack traces from warnings
#--zap-stacktrace-level error The level stack traces start at, info, error or panic
#--zap-time-encoding RFC 3339 epoch, millis, nano, iso8601, rfc3339 or rfc3339nano

The key fields in log entries.

Field What it holds
name, namespace The object reconciled, such as the ManagedWorkload. controller-runtime adds them to all its entries, with controller and reconcileID
workload The workload or ManagedWorkload an entry names itself, with its namespace
from, to Phases of a phase transition entry
reason What caused a phase transition
phase Phase after a reconcile, on reconciled entries at debug level (--zap-log-level=debug)
error What went wrong, on failure entries