Reference
Labels and annotations
Every label, annotation and finalizer Napwake reads or writes: the values it takes, where it goes, and what it does.
Labels
Section titled “Labels”| Label | Value | On | Description |
|---|---|---|---|
#napwake. |
"true" |
Deployments, StatefulSets, Namespaces | Opts in the workload, or every Deployment and StatefulSet in the namespace, with a ManagedWorkload made from its annotations. "false" on a workload leaves it out of a managed namespace, like napwake.dev/ignore. Other values don’t opt in, and an event says so (Opting in) |
#napwake. |
"true" |
Deployments, StatefulSets | Leaves the workload out, even in a managed namespace, scaled back up first if paused. A ManagedWorkload you wrote for it does nothing and reports TargetAvailable=False, reason TargetIgnored |
#napwake. |
"true" |
Namespaces | Nothing here is managed, whatever its labels, and what was paused wakes. kube-* and Napwake’s own namespace are protected without it (Protected namespaces) |
#napwake. |
"true" |
Namespaces | Lets Napwake manage a namespace labelled protected, matching protectedNamespaces, or always protected, such as kube-system or its own. The operator’s and doorman’s Deployments are never managed. Set it on purpose. Napwake never does |
#napwake. |
"true" |
ManagedWorkloads | On ManagedWorkloads made from the managed label, the only ones Napwake updates and deletes. Those without it are yours |
#napwake. |
ManagedWorkload name | EndpointSlices | On the EndpointSlices routing a paused workload’s Services to the doorman or its forwarder, with endpointslice.kubernetes.io/managed-by: doorman.napwake.dev. Names over 63 characters are shortened with a hash. Removed once Running |
#napwake. |
namespace | EndpointSlices, forwarder pods | The install’s namespace, on the doorman EndpointSlices an operator writes and its forwarders’ pods. Another install doesn’t move them to its doorman (More than one install) |
#napwake. |
"true" |
EndpointSlices | On a doorman EndpointSlice pointing a Service behind GKE NEGs at the workload’s forwarder, not the doorman |
#app. |
napwake-forwarder |
Deployments, pods | On each forwarder Deployment the operator runs beside a paused workload behind GKE NEGs, and its pods. The Deployment also has napwake.dev/ignore: "true", so Napwake doesn’t manage it in a namespace opted in by label |
kubectl label deployment my-api napwake.dev/managed=truekubectl label namespace preview-42 napwake.dev/managed=trueOpt in a workload, or a namespace.
kubectl label deployment my-critical-service napwake.dev/ignore=trueLeave one out of a managed namespace.
kubectl get managedworkloads -l napwake.dev/from-label=true --all-namespacesList the ManagedWorkloads made from labels.
Settings annotations
Section titled “Settings annotations”On an opted-in Deployment or StatefulSet, or its Namespace for all its workloads. A setting is the first of these that can be read (Opting in, Helm defaults).
- 1The workload's annotation
- 2Its namespace's
- 3The Helm defaultsonly
idle-after,cpu-threshold,dry-run,pause-early,forecastandwakehave one - 4The built-in default
| Annotation | Accepted values | Default | Description |
|---|---|---|---|
#napwake. |
exactly "true" or "false" |
"false" |
Measure without pausing |
#napwake. |
a Go duration of at least 1m, such as "90m" or "2h" |
1h |
Time without activity before pausing |
#napwake. |
a percentage from "0.1" to "100", to two places, such as "10" or "0.5" |
10 |
CPU % of requests above which the workload is active |
#napwake. |
exactly "true" or "false" |
"false" |
Wake ahead of forecast demand |
#napwake. |
exactly "true" or "false" |
"false" |
Pause after 20 idle minutes, before idle-after, when a confident forecast expects quiet until then and the doorman would wake it. Sets spec.idlePolicy.pauseEarly (Pausing early). Never with napwake.dev/wake: "ask" |
#napwake. |
exactly "eager", "balanced" or "cautious" |
"balanced" |
How soon the forecast acts, at confidence 60, 75 or 85. Eager acts sooner, waking it for nothing more often. Cautious acts later, for workloads costly to keep awake. Sets spec.prediction.mode, which spec.prediction.confidence overrides (Forecast setting) |
#napwake. |
comma-separated kind/name or namespace/kind/name, kind deployment or statefulset |
none | Workloads this one needs. Empty declares none, dropping the namespace’s. On a namespace, it leaves out the workloads it names and those they depend on by their own depends-on, as dependencies rather than dependents. One in another namespace needs its napwake.dev/dependents-from |
#napwake. |
exactly "request" or "ask" |
"request" |
What wakes it through the doorman. "request" is any request. "ask" is only a person’s click on Wake it. Sets spec.wake.mode (Asking before waking) |
#napwake. |
a Go duration above zero, at most 1h |
2m |
How long a request is held while it wakes |
#napwake. |
exactly "true" or "false" |
"true" |
Show browsers a waking-up page |
Values that can’t be read, such as "True", "yes", "soon" or "0".
| Annotation | A value that can’t be read |
|---|---|
| Any setting | Skipped, with an InvalidSetting warning event on the workload. The setting comes from the next place in the order, never the default in place of a namespace’s value. Others still apply |
dry-run |
Turns dry-run on, wherever it is. A typo in the setting meant to stop pauses must never start them |
wake |
Asks before waking, wherever it is. A typo in the setting meant to keep robots out must never let them in |
depends-on |
A bad entry is skipped, the rest apply. Only a value with no readable entry falls through to the namespace’s |
Activity annotations
Section titled “Activity annotations”| Annotation | Value | On | Description |
|---|---|---|---|
#napwake. |
RFC 3339 time | ManagedWorkloads, Deployments, StatefulSets | Activity another tool saw, such as a developer portal. A future time counts as now. A change while paused wakes it (Activity annotations) |
#napwake. |
RFC 3339 time | ManagedWorkloads, Deployments, StatefulSets | Awake until then, woken if paused |
#napwake. |
RFC 3339 time | ManagedWorkloads | Set by the doorman when it holds a request for a paused workload, and with doorman.admissionPolicy.enabled by no one else. To wake a workload yourself, set wake-requested. Wakes it like last-activity, the clock recording request (Wake on request) |
#napwake. |
IP address | ManagedWorkloads | Where the waking request came from, set by the doorman with last-request and, like it, by no one else. The operator learns from it which workload depends on this one |
| The three that take a time | not an RFC 3339 time, such as epoch seconds | as above | Ignored. It neither keeps the workload awake nor wakes it, and an InvalidActivityAnnotation warning event on the ManagedWorkload says so, once per value |
Other annotations
Section titled “Other annotations”| Annotation | Value | On | Description |
|---|---|---|---|
#napwake. |
any value that differs from the last request’s, such as the time | ManagedWorkloads | Pause now, as if the idle clock had run out. Set by kubectl napwake pause. Each value acts once, recorded in status.lastPauseRequest. An annotation, so a GitOps tool owning the spec leaves it alone (Pause now) |
#napwake. |
"true" |
ManagedWorkloads | With a pause request, pauses even when a confident forecast expects demand within the hour. Without it, such a request is declined, saying when. It applies to the request it comes with, so set or remove it with each. kubectl napwake pause --yes sets it (Pause now) |
#napwake. |
any value that differs from the last request’s, such as the time | ManagedWorkloads | Wake now, whatever the wake setting, as for a pull request bot, a portal or a chat command. An awake workload’s idle clock restarts. Set by kubectl napwake wake. Each value acts once, recorded in status.lastWakeRequest, and the WakeRequest condition says what came of it. An annotation, so a GitOps tool owning the spec leaves it alone (Wake now) |
#napwake. |
comma-separated namespace names, or "*" for any |
Namespaces | Lets those namespaces’ workloads depend on this one’s. A dependency in another namespace, declared or learned, is held awake, woken and waited for only if its namespace lists the dependent’s. Otherwise the dependent reports DependencyNotAllowed=True (Across namespaces) |
#napwake. |
JSON, set by Napwake | Deployments, StatefulSets | What the pause changed, the replicas and the KEDA ScaledObject with its own paused-replicas. Written before scaling to zero, removed when handed back. If the ManagedWorkload’s status is lost while paused, as in a backup restored without status, Napwake takes the pause up from it, so it still wakes to its replicas. Don’t set or edit it |
#napwake. |
JSON, set by the doorman | ManagedWorkloads | Where the doorman counts the requests it turned away during a pause, for a workload with wake.mode: Ask. The operator copies it into status.turnedAway. Don’t set or edit it (What it turns away) |
#napwake. |
comma-separated namespace/name, or a name in the workload’s own namespace |
Deployments, StatefulSets, ManagedWorkloads | Dependencies Napwake shouldn’t learn |
#napwake. |
namespace, set by Napwake | ManagedWorkloads | The install that took it on, written with its napwake.dev/cleanup finalizer. Other installs leave it alone and don’t count it in their uninstall and upgrade guards (More than one install) |
#napwake. |
comma-separated port names or numbers | Services | Ports the doorman never routes, such as a metrics port scraped elsewhere. They fail while paused (what wakes a workload) |
Finalizers
Section titled “Finalizers”| Finalizer | On | Description |
|---|---|---|
#napwake. |
ManagedWorkloads | Added by the operator, and removed once a paused workload is scaled back up and its Services stop routing to the doorman, so the ManagedWorkload can be deleted |