Reference
API reference
Every field of the ManagedWorkload resource: its type, its default and what it does.
- Group
napwake.dev- Version
v1alpha1- Kind
ManagedWorkload- Scope
- Namespaced
Columns
Section titled “Columns”What kubectl get managedworkloads shows.
| Column | Shows |
|---|---|
Phase |
The phase |
Freed |
What pausing freed this month |
Saved |
What of that it saved |
Would Free |
What dry-run measured it would free. Blank outside dry-run |
Age |
Age |
Spec (ManagedWorkloadSpec)
Section titled “Spec (ManagedWorkloadSpec)”| Field | Type | Default | Description |
|---|---|---|---|
#target |
WorkloadRef |
required | The workload. Can’t be changed once set |
#target. |
Deployment or StatefulSet |
Deployment |
Its kind |
#target. |
string | required | Its name, same namespace |
#idlePolicy |
IdlePolicySpec |
Idle detection. Without it, never paused automatically | |
#idlePolicy. |
duration, at least 1m |
1h |
Time without activity before pausing |
#idlePolicy. |
int or string, 0.1-100, to two places | 10 |
CPU % of requests above which it’s active. A decimal is written as a string, such as "0.5" |
#idlePolicy. |
string | required in each entry | PromQL instant query. Above zero is activity. At most 10 |
#idlePolicy. |
bool | false |
Wake ahead of confident forecast demand |
#idlePolicy. |
bool | false |
Pause after 20 idle minutes, before idleAfter, if a confident forecast expects quiet until then and the doorman would wake it. See Pausing early |
#dependsOn[] |
DependencyRef |
Workloads this one needs. At most 20 | |
#dependsOn[]. |
string | this namespace | Its namespace |
#dependsOn[]. |
Deployment or StatefulSet |
required | Its kind |
#dependsOn[]. |
string | required | Its name |
#dependsOn[]. |
bool | false |
Hold this one’s resume until it’s Ready |
#wake |
WakeSpec |
What wakes it through the doorman while paused | |
#wake. |
Request or Ask |
Request |
What wakes it through the doorman. Request is any request but a known probe’s. Ask is only a person’s click on Wake it, and anything else gets a 503. See Asking before waking |
#wake. |
duration, at most 1h |
2m |
How long a request is held while it wakes |
#wake. |
bool | true |
Answer a browser’s page load with the waking-up page, instead of holding it. With mode: Ask, a browser always gets a page |
#prediction |
PredictionSpec |
{} |
The forecast. Left out or {}, it takes the defaults |
#prediction. |
eager, balanced or cautious |
balanced |
How soon the forecast acts, at confidence 60, 75 or 85. See Forecast setting |
#prediction. |
int, 50-100 | the mode’s | Accuracy (1 − WAPE, %) a season’s forecasts must reach to drive decisions. Overrides the mode’s |
#costTracking |
CostTrackingSpec |
Your own cost rates | |
#costTracking. |
CostRates |
node list prices, then AWS defaults | Custom rates, none negative |
#dryRun |
bool | false |
Measure without pausing. Turning it on wakes a paused workload. See Dry run |
Durations
Section titled “Durations”| Duration | |
|---|---|
45s, 90m, 1h30m |
Go durations above zero work |
1d, 2w, spaces |
Days, weeks and spaces don’t. Write 24h or 168h |
| Anything else | The API server rejects it |
CostRates
Section titled “CostRates”For costTracking.rates and cost.listRates.
| Field | Type | Default | Description |
|---|---|---|---|
#cpuPerHour |
quantity | 0.031 |
USD per vCPU-hour |
#memoryPerHour |
quantity | 0.004 |
USD per GiB-hour |
#storagePerMonth |
quantity | 0.08 |
USD per GiB-month |
Status (ManagedWorkloadStatus)
Section titled “Status (ManagedWorkloadStatus)”| Field | Type | Description |
|---|---|---|
#phase |
WorkloadPhase |
Current lifecycle phase |
#conditions[] |
Condition |
Standard Kubernetes conditions. See Conditions and events |
#lastActedAt |
time | Last pause or wake, by Napwake or a scale-up from zero outside it |
#lastPauseRequest |
string | Last napwake.dev/pause-requested value acted on, so each acts once. Outcome in the PauseRequest condition. See Pause now |
#lastWakeRequest |
string | Last napwake.dev/wake-requested value acted on, so each acts once. Outcome in the WakeRequest condition. See Wake now |
#turnedAway |
TurnedAway |
With wake.mode: Ask, what the doorman turned away during the current pause, or the last once it’s awake. pausedAt, when that pause began, and requests. Brought up to date about once a minute. See What it turns away |
#lastTransitionTime |
time | Last phase change |
#learnedDependencies |
LearnedDependencies |
Found by Napwake, held and woken like dependsOn. Fields from, at and dependencies, each with namespace, kind, name and source, which is environment (with via, address) or wake (with lastSeen). See Learned dependencies |
#lastScaledUp |
ScaledUp |
Last scale-up outside Napwake while paused, which wakes it. Fields at, replicas, by (field manager, such as argocd-controller, or unknown through the scale subresource, as kubectl scale, which records none) and gitOps (Argo CD, Flux, Fleet, kapp or Kluctl, if from Git). See GitOps tools |
#doorman[] |
DoormanRoute |
Service ports routed to the doorman while paused, with service, portName, doormanPort and forwarded (behind GKE NEGs, through the forwarder) |
#doormanDraining[] |
DrainingPort |
Doorman ports that routed it until it woke, with port and until. No other workload gets the port before until, so a late client never reaches another. Kept in status, so an operator that restarts or becomes leader honours it |
activity
Section titled “activity”| Field | Type | Description |
|---|---|---|
#activity. |
time | Latest activity, any source |
#activity. |
string | created, woke, request, cpu, rollout, annotation, prometheus, unobserved or scaled-up |
#activity. |
time | When it pauses without more activity |
#activity. |
time | Last activity check |
#activity. |
string | Pod template fingerprint, to detect deploys |
#activity. |
[]string | Awake dependents keeping it from pausing (HeldByDependents), as namespace/name. At most 10, first by name |
#activity. |
time | Start of the hour of expected demand, while the forecast holds off the pause (IdleVetoed) |
#activity. |
time | End of the quiet hours expected when the forecast brought the pause forward (PausedEarly). Kept until the pause, or dry-run’s would-be pause, ends |
| Field | Type | Description |
|---|---|---|
#pause |
PauseStatus |
What a pause changed, from before scaling to zero until running again |
#pause. |
int32 | Replicas before the pause, restored on resume |
#pause. |
time | When the pause began, as it went Pausing, before anything was scaled. Or when Napwake took up a pause whose record was lost. The asleep page’s Wake it button is good for this pause alone. See The Wake it button |
#pause. |
time | When the doorman’s routes for this pause were stored in status, which every doorman pod listens on. Its EndpointSlices go in 5 seconds after. Unset for a workload the doorman doesn’t route |
#pause. |
time | When the doorman’s EndpointSlices first stood in front of its Services for this pause, beside its pods. It’s scaled to zero a few seconds after. Unset for a workload the doorman doesn’t route. See What happens in a pause |
#pause. |
bool | The pause was asked for, with napwake.dev/pause-requested, not decided by the idle clock or the forecast |
#pause. #pause. |
string | The most CPU it used, as a percentage of its requests. cpuBefore is through the stretch without activity that ran its clock out. cpuJustBefore is in its last 15 minutes, or idleAfter if shorter. Unset when none was measured. See Paused while in use |
#pause. |
time | When scaled to zero, unset before. Paused once its pods stop |
#pause. |
time | When the current resume scaled it up. Scaled to zero after that, not by Napwake, it’s left off |
#pause. |
time | When the current resume first saw a replica Ready. The rest get 2 minutes more |
#pause. |
string | KEDA ScaledObject held at zero while paused. See HPA and KEDA |
#pause. |
string | Its own autoscaling.keda.sh/paused-replicas before the pause, put back after |
#pause. |
ResourceSnapshot |
What it ran as the pause began, the base for savings. replicas, per replica cpuMillis, memoryBytes, claims’ storageBytes, and nodePools (name, "" without a pool label, and its pods) |
#pause. |
object | Activity annotations on the ManagedWorkload (workload) and target (target) as the pause began. A change wakes it |
#pause. |
bool | A Prometheus activity query has been active at every check since a requested pause began. They don’t wake it until a check finds all quiet |
idleWait
Section titled “idleWait”| Field | Type | Description |
|---|---|---|
#idleWait |
IdleWaitStatus |
Pauses made while it was in use, which lengthen its idle clock, and its CPU use idle. See Paused while in use |
#idleWait. |
int32 | Pauses in a row its own use undid soon after they began. Each doubles how long the idle clock waits, up to idleAfter plus an hour. A pause that holds sets it back to zero |
#idleWait. |
WrongPause |
The latest. pausedAt, after (how soon it was undone), by (request, click, wakeRequest or annotation), from (the caller’s address, for a request), and inUseCPU |
#idleWait. #idleWait. |
string, time | The most CPU it used, as a percentage of its requests, before its pauses that held, over the last week. idleCPUAt is when it was last measured |
dryRun
Section titled “dryRun”| Field | Type | Description |
|---|---|---|
#dryRun |
DryRunStatus |
What dry-run measured. Only while spec.dryRun is true |
#dryRun. |
time | When measuring started |
#dryRun. |
int32 | Would-be pauses, including one under way |
#dryRun. |
duration | Total length of finished would-be pauses |
#dryRun. #dryRun. |
quantity | vCPU-hours and GiB-hours requested during slept |
#dryRun. |
string | Those hours priced, for display, counting a would-be pause under way to the last status write. What pausing would have freed. The Would Free column |
#dryRun. |
ResourceSnapshot |
What it ran as the current would-be pause began |
#dryRun. |
bool | As pause.queryActiveSincePause, since the would-be pause under way was asked for. Queries don’t end it until all are quiet |
prediction
Section titled “prediction”| Field | Type | Description |
|---|---|---|
#prediction. #prediction. |
string | Each season’s phase, Observing, Suggesting or Active |
#prediction. #prediction. |
int | Accuracy % over the last 24 and 168 observed hours |
#prediction. |
string | IANA zone for hours and weekdays, such as Europe/London. The operator’s --timezone (Helm value timezone) |
#prediction. |
int | Confidence it acts at, spec.prediction.confidence or the mode’s |
#prediction. |
bool | Whether it drives decisions, holding off pauses and, with autoResume, waking ahead of demand |
#prediction. |
time | When it should start acting, if the coming days repeat the last week. Unset while acting, or if not within four weeks |
#prediction. #prediction. |
string | Why it is or isn’t acting, as Acting, Observing, EarningConfidence, Relearning or NotLearning, and a sentence. See When it acts |
#prediction. |
PredictionHistory |
What it learned from Prometheus history when management began. Fields reason (Learned, NoPrometheusURL, NoHistory, NoCPURequests, QueryFailed), hours, from, to, message. See Learning from history |
#prediction. |
string | Learned state, gzipped and base64-encoded |
| Field | Type | Description |
|---|---|---|
#cost |
CostStatus |
This calendar month’s cost, in UTC. See Cost tracking |
#cost. |
duration | How much of the month the totals cover |
#cost. |
time | When totals were last brought up to date |
#cost. #cost. |
quantity | vCPU-hours and GiB-hours requested while awake |
#cost. |
quantity | GiB-hours of claims its pods mount, in every phase |
#cost. #cost. |
quantity | vCPU-hours and GiB-hours the paused replicas had requested, while paused. What pausing freed |
#cost. #cost. |
quantity | Its share of the paused requests its node pools’ spare capacity can’t hold, every 5 minutes. What pausing saved, at least. See How saved is measured |
#cost. |
string | Awake and storage hours, priced |
#cost. |
string | Paused hours, priced |
#cost. |
string | Saved hours, priced. unknown while savingsUnknown is set |
#cost. |
string | Why saved can’t be measured, such as pods outside watchNamespaces being invisible. Unset when measured |
#cost. |
string | costThisMonth plus freedThisMonth |
#cost. #cost. #cost. |
string | The month so far, carried to a full month. pending until a day is tracked |
#cost. |
ResourceSnapshot |
What it ran when last brought up to date while awake |
#cost. #cost. |
time, string | When requests and list rates were last read, and the pod template then |
#cost. |
CostRates |
List rates of the nodes its pods last ran on, spot at spot. Unset without a list price |
#cost. |
string | Which list prices listRates are, OnDemand, Spot or SpotAndOnDemand. Unset with it |
#cost. |
ResourceReduction |
What the current pause freed, as cpuMillis, memoryBytes and replicas. Only while paused |
WorkloadPhase values
Section titled “WorkloadPhase values”| Value | Meaning |
|---|---|
#Running #Idle #Pausing #Paused #Resuming |
The phases. Lifecycle says what each means |
| No phase | Until the first reconcile |
Creating |
Accepted by the schema but never set |