Configuration Reference¶
All infrastructure configuration lives in Pulumi.<stack-name>.yaml. See Pulumi.example.yaml for a fully documented reference with all available options.
Required Settings¶
| Config Key | Description | Example |
|---|---|---|
hawk:domain |
Root domain — Hawk prepends hawk. to form service URLs (e.g. api.hawk.example.com) |
example.com |
hawk:publicDomain |
Public domain for DNS zones | example.com |
hawk:primarySubnetCidr |
VPC CIDR block | 10.0.0.0/16 |
Domain & DNS¶
Hawk's services live under hawk.<hawk:domain> — for example, with hawk:domain: example.com the API is at api.hawk.example.com (Pulumi adds the hawk. segment automatically; do not include it in the config value). DNS delegation must work before ACM TLS certificates can validate. Four paths — pick one before deploying:
How hawk:domain and hawk:publicDomain must relate
Service hostnames are built as *.hawk.<hawk:domain> and the load balancer's certificates cover platform.<hawk:domain> and *.hawk.<hawk:domain> — and both certificates validate via DNS records in the hawk:publicDomain Route 53 zone. So hawk:domain must equal or be a subdomain of hawk:publicDomain; anything else puts the validation records in a zone that can't serve them, and cert validation hangs (preflight checks this).
When you delegate only a single subdomain (e.g. a Cloudflare parent with just hawk.example.com delegated to Route 53), set both values to that subdomain — hawk:domain: hawk.example.com and hawk:publicDomain: hawk.example.com. Service URLs then look like api.hawk.hawk.example.com (the doubled hawk is cosmetic and expected).
| Option | When | What to set |
|---|---|---|
| A. Route 53 Domains | New setup, simplest path. AWS handles registration, hosted zone, and delegation in a single step. | hawk:createPublicZone: "false" (the default) — Pulumi looks up the existing zone created by registration. |
| B. Existing registrar + manual delegation | You already own the domain at Namecheap/GoDaddy/etc. and want to keep it there. | Create/import the Route 53 public hosted zone first, update your registrar to its four NS records, and leave hawk:createPublicZone: "false". |
| C. Cloudflare delegation | Parent domain is in Cloudflare and you want a subdomain delegated to AWS. | Create/import the Route 53 public hosted zone first, then create NS records in Cloudflare before deploy. |
| D. HTTP-only (testing only) | Smoke-testing without a real domain. | hawk:skipTlsCerts: "true". Services reachable only via the raw ALB DNS name. Not for real use. |
Cert-validation hang gotcha
If DNS isn't working when pulumi up runs, the wildcard ACM certificate validation will hang for ~75 minutes (default timeout) before failing. Get delegation in place first and run scripts/dev/preflight.sh before deploy.
Leave createPublicZone disabled for strict preflight
scripts/dev/preflight.sh validates that hawk:publicDomain is already delegated to the expected Route 53 hosted zone before pulumi up. If hawk:createPublicZone: "true", Pulumi would create a new zone whose NS records cannot be known or delegated before the run, so strict preflight fails. Create/import the public hosted zone first, delegate DNS, and leave createPublicZone: "false".
Authentication¶
When none of the required OIDC keys are set, Hawk provisions a Cognito user pool during pulumi up and uses it as the auth provider. Create your first user with scripts/dev/create-cognito-user.sh <stack> <email> after the deploy finishes.
To use your own OIDC provider (Okta, Auth0, etc.), set all eight required keys. Hawk skips Cognito only when every one of them is set. It does not fetch the issuer's /.well-known/openid-configuration during pulumi preview. Setting some of them and leaving any required key empty fails preview with "OIDC config is partially set".
From the repo root, print the keys and paste them under config::
| Config Key | Description |
|---|---|
hawk:oidcClientId |
OIDC client ID |
hawk:oidcAudience |
OIDC audience for access tokens. A whitespace-delimited list of client IDs; Hawk advertises the first to interactive clients and accepts tokens for any listed ID. |
hawk:oidcIssuer |
OIDC issuer URL |
hawk:oidcScopes |
Scopes requested at login, space-separated |
hawk:oidcEmailField |
JWT claim used for the user's email, by the API, the relay, and Middleman. See Usage attribution by user. The discovery script prints email. |
hawk:oidcJwksUri |
JWKS URI |
hawk:oidcTokenEndpoint |
Token endpoint |
hawk:oidcAuthorizationEndpoint |
Authorization endpoint |
The IdP app itself needs specific grant types, redirect URIs, and JWT claims — see Security: OIDC App Requirements for what to configure in Okta/Auth0/etc. before deploying.
CPU architecture¶
hawk:cpuArchitecture selects the architecture for every Hawk-owned image and the placement of runners and the janitor. It defaults to arm64 (AWS Graviton); amd64 remains fully supported.
Karpenter always exposes both CPU architectures. The historical default and gvisor NodePools remain amd64 with their names and templates unchanged. The additive default-arm64 and gvisor-arm64 counterparts carry a hawk.metr.org/architecture=arm64:NoSchedule taint. Hawk pins its managed workloads to the selected architecture and adds the ARM toleration when needed, so architecture-unpinned pods remain on x86 without replacing existing NodeClaims.
With Datadog enabled, the Hawk CPU Architecture dashboard (in the Hawk Platform dashboard list) counts running runners, sandboxes and ready nodes per architecture, and surfaces containers stuck waiting under one architecture — the usual sign of an image that exists for only the other. The agent maps the kubernetes.io/arch node label to the kube_arch tag, so any metric attributed to a node can be grouped by it in your own queries too.
Eval task and custom runner images¶
hawk:evalTaskArchitecture controls the default placement of CPU sandbox services and defaults to amd64, independently of cpuArchitecture. Set it to arm64 only when every image in each sandbox supports arm64 or is multi-arch:
Tasks may override the architecture per service. A native Kubernetes values.yaml sets nodeSelector: {kubernetes.io/arch: arm64}; a Compose file sets the Compose-native platform: linux/arm64 (or linux/amd64), which Hawk translates into that same selector before conversion. Services that declare neither use evalTaskArchitecture. Hawk preserves explicit selectors and injects the ARM toleration for a service that selects arm64. GPU sandbox services remain amd64 because Hawk's NVIDIA NodeClass uses an x86_64 accelerated AMI; a GPU service that selects arm64 is rejected, as is any platform other than linux/amd64 or linux/arm64. See Sandbox architecture for the task-author view.
Custom runner images must be multi-arch or match cpuArchitecture, because the runner Job itself is pinned to the deployment architecture.
Build host architecture¶
For native builds, cpuArchitecture should match the machine running pulumi up. A mismatch cross-builds every Hawk image under QEMU emulation, which is very slow and can hang the deploy because there is no per-image build timeout. Use amd64 on an amd64/x86_64 build host, or deploy the default arm64 configuration from an arm64 host. Preflight reports mismatches in either direction.
Quota increases (sizing Path A)¶
The Quick Start's sizing section offers two paths for fresh AWS accounts; this is the detail for Path A (raising the quotas to fit Hawk's default footprint). Request all three on day one — approval can take days:
# Fargate On-Demand vCPUs (Hawk needs ≥ ~9 for a comfortable default deploy)
aws service-quotas request-service-quota-increase \
--service-code fargate --quota-code L-3032A538 --desired-value 32 --region <region>
# EC2 Standard On-Demand vCPUs (runner nodes)
aws service-quotas request-service-quota-increase \
--service-code ec2 --quota-code L-1216C47A --desired-value 32 --region <region>
# Fargate Spot vCPUs (the eval-log importer Batch job needs 8)
aws service-quotas request-service-quota-increase \
--service-code fargate --quota-code L-36FBB829 --desired-value 32 --region <region>
Brand-new accounts are often denied ("use 90% of your current capacity, then re-request after the next billing cycle"). If that happens, escalate through your AWS account team or AWS Sales contact — they can approve increases that automated support won't — or start with Path B from the Quick Start sizing section in the meantime. The commands may also fail immediately with QuotaExceededException: maximum number of open service quota increase (SQI) requests — brand-new accounts can already be at the open-request cap from AWS's own auto-filed requests; that's fine, proceed on Path B and re-request once the pre-existing requests resolve.
Sizing beyond the defaults¶
The --desired-value 32 above is a try-out number. For real workloads, the quota that scales with usage is EC2 Standard On-Demand — each concurrent eval consumes a runner node plus its sandbox pods (typically 4-8 vCPUs together), on top of a ~6-vCPU cluster baseline. Fargate does not scale with eval count (it runs only the fixed services and importer jobs), so ~32 Fargate vCPUs is enough for any deployment size; a high Fargate quota simply stops it from ever being the constraint.
Rough tiers to anchor a request:
| Tier | Fargate OD / Spot | EC2 Standard On-Demand | G/VT On-Demand (GPU) |
|---|---|---|---|
| Try-out (Path B) | 4 (default) | 8 (default) | 0 — set hawk:enableGpuOperator: "false" |
| Small team (~5 concurrent evals) | 32 | 64 | 64 if you run GPU tasks |
| Production-scale eval org | 1,000+ | 1,000-6,000 | 256-768 |
AWS approves increases step-wise: request 2-4× your current need, generate usage, and re-request as you grow — jumping straight from 8 to thousands will be denied. The production-scale column is what a mature account with billing history can reach, usually via the account-team route rather than the self-service console.
Runner memory¶
Every eval set gets one runner pod, and hawk:runnerMemory is its memory limit. Kubernetes copies a limit into the request when no request is given, so by default each runner reserves its full limit on a node whether or not it uses it. Raising the limit to cover the occasional heavy eval therefore shrinks how many runners fit on a node, and node count is what consumes the EC2 Standard On-Demand quota above.
hawk:runnerMemoryRequest decouples the two. Set it below runnerMemory and the scheduler reserves only that much, while runners can still grow into the limit:
hawk:runnerMemory: "64Gi" # ceiling a runner may reach
hawk:runnerMemoryRequest: "8Gi" # what the scheduler sets aside per runner
An eval set that sets runner.memory itself is scheduled against its value, not the deployment request — a job that names its memory has stated what it needs, and reserving less would place it on a node too small to hold it. The deployment request only applies to eval sets that express no preference.
CPU follows the same split: hawk:runnerCpu is the limit (default 4, burst headroom for runners driving hundreds of sandboxes) and hawk:runnerCpuRequest is what the scheduler reserves (default 2, so the higher limit doesn't change which nodes runners pack onto). An eval set that sets runner.cpu is scheduled against that value.
Pick the request from observed runner memory use, not from the limit. Runners are mostly coordination processes, so typical peak usage is far below the limit that the rare heavy eval set needs. Leave real headroom above the typical peak: this is deliberate overcommit, and if enough runners grow at once the node runs out of memory and the kernel may kill pods that were behaving. Eval sets with genuinely large runners should set runner.memory so they are scheduled honestly.
GPU quotas¶
If your evals request GPUs, you also need the G and VT instance quota — its fresh-account default is 0, and Hawk's default GPU NodePool uses on-demand capacity:
# G/VT On-Demand vCPUs (g4dn GPU nodes; a g4dn.xlarge is 4 vCPUs)
aws service-quotas request-service-quota-increase \
--service-code ec2 --quota-code L-DB2E81BA --desired-value 64 --region <region>
GPU quota increases are the slowest and most-denied category — request them well before you need them, and expect anything beyond ~100 vCPUs to require your AWS account team. Note that with the quota at 0, a task requesting a GPU doesn't fail — Karpenter retries provisioning silently forever and the pod stays Pending; if you don't run GPU tasks, set hawk:enableGpuOperator: "false" and skip this entirely.
Infrastructure Options¶
| Config Key | Default | Description |
|---|---|---|
hawk:eksK8sVersion |
1.35 |
Kubernetes version for EKS |
hawk:eksSchedulerStrategy |
unset (MostAllocated in example config) |
MostAllocated favors fuller nodes; LeastAllocated favors emptier ones, based on requested CPU and memory. Affects new pods only. Leave unset to preserve current scheduling. Requires EKS 1.31+. |
hawk:eksPublicEndpoint |
true |
Set to false to make the EKS API endpoint private (requires Tailscale or VPN to reach kubectl) |
hawk:albIdleTimeout |
3600 |
ALB idle timeout in seconds |
hawk:albInternal |
false |
Set to true to make the ALB internal (requires VPN) |
hawk:albAllowedCidrs |
unset | Only these source IPv4 ranges (YAML list in CIDR form; a.b.c.d/32 for one address) may reach the internet-facing ALB. It does not cover Hawk's other public surfaces — the EKS public endpoint has its own control (eksPublicAccessCidrs); the jumphost NLB currently has none. Omit to leave it open to the whole internet; an empty list is an error; ignored when albInternal is true. Hawk's own components are always admitted (they reach each other through the same ALB), so list only your users' networks — Tailscale clients are not admitted automatically, since they reach the public ALB from their own egress IP. Each entry costs 2 rules against albSgInboundRuleQuota (1 with skipTlsCerts), as do the VPC, the NAT gateway and each eksPrivateSubnetCidrs entry, plus two fixed rules; pulumi preview refuses a list that will not fit |
hawk:albSgInboundRuleQuota |
60 |
Inbound rules the ALB security group may hold, AWS's default per-group quota. Raise it only after raising the account quota (Service Quotas L-0EA8095F); the allow-list is refused at preview when it would need more. Edits add the new rules before removing the old ones, so near the limit remove entries in one pulumi up before adding others |
hawk:cloudwatchLogsRetentionDays |
14 |
CloudWatch log retention |
hawk:podLogArchiveEnabled |
true |
Run a Fluent Bit DaemonSet that copies runner and sandbox container output to the {env}/hawk/pod-logs log group, kept for cloudwatchLogsRetentionDays. Without it a job's logs disappear when Kubernetes deletes its pods, about an hour after the job finishes. Applies only to stacks that create the EKS cluster; dev envs on a shared cluster use that cluster's archive. CloudWatch bills ingest per GB. Turning it off later deletes the log group and every archived line in it, not just the collector. With hawk:enableGloveboxKata it also ships the glovebox nodes' kernel and runtime journals to {env}/hawk/glovebox-node-logs, with alarms on them (see A sandbox VM died); turning it off removes those too. |
hawk:clusterLogsRetentionDays |
unset (never expire) | Retention, in days, of the log groups EKS (control-plane, including audit) and Aurora write to. It must be a CloudWatch Logs retention period (1, 3, 5, 7, 14, 30, 60, 90, 180, 365, …). Setting it on an existing stack also applies it to existing logs, so older events are deleted. Clearing it again leaves that retention in place rather than restoring never-expire. |
hawk:autoExcludeEksZones |
false (true in Pulumi.example.yaml) |
Auto-exclude the region's known EKS-unsupported AZs when EKS is enabled. Required for a new stack in us-east-1 / us-west-1 / ca-central-1 — without it the deploy fails at apply with UnsupportedAvailabilityZoneException. The code default is false only so that upgrading an existing stack never reshuffles its AZ set. |
hawk:excludeZoneIds |
[] |
AZ zone IDs (e.g. use1-az3) to exclude from VPC/EKS subnets. Merged with the auto-excluded zones when autoExcludeEksZones is true (it does not replace them); used on its own when it's false. |
hawk:enableHawkApi |
true |
Deploy the Hawk API and its related services. Requires createRds. |
hawk:enableMiddleman |
true |
Deploy Middleman. Requires enableHawkApi. |
hawk:createRds |
true |
Provision Aurora PostgreSQL. Set to false only when API and Middleman are disabled. |
hawk:enableGvisor |
false |
Install the gvisor RuntimeClass and a dedicated AL2023 Karpenter node class. |
hawk:gvisorRelease |
20260914.0 |
gVisor release the gVisor nodes install at boot, as a dated release name such as 20260914.0. Releases before and after gVisor's move to tarball-only artifacts (20260831.0) both install, so setting an older one rolls a bad runtime back without a code change. Changing it replaces every gVisor node, each only once no sandbox is running on it. |
hawk:sandboxDefaultCpu |
unset (the sandbox chart's 500m) |
CPU request and limit, kept equal, for the sandbox's default service (where tools run unless the task picks another sandbox) when it sets no resources, such as "1". Memory keeps the chart's 2Gi. Other services keep 500m, so give any other service the agent works in its own resources. Changing it changes the compute those tasks run with, so results before and after are not directly comparable. |
hawk:enableGloveboxKata |
false |
Install glovebox's three Kata RuntimeClasses, their admission policies, and a nested-virtualization amd64 Karpenter pool where each sandbox pod runs in its own Kata microVM. See Kata microVMs. |
hawk:gloveboxAddressGrants |
/24,/64 |
The widest address range one pod's allow_cidr grant may name on a glovebox node, as glovebox's --address-grants prefix lengths /V4,/V6, or none to refuse every grant. The API refuses a wider range at submission. Needs hawk:enableGloveboxKata. Changing it rewrites the glovebox EC2NodeClass's userData, so every glovebox node is replaced, each only once no sandbox is running on it. See Kata microVMs. |
hawk:karpenterAmiFamily |
unset | Optional amiFamily override for the default EC2NodeClass. Normally inferred from the Bottlerocket AMI alias; set Bottlerocket to replace a stale live value such as AL2023. GPU and gVisor node classes are unaffected. |
hawk:karpenterInstanceGenerations |
{"amd64": ["7"], "arm64": ["7", "8"]} |
Allowed CPU worker generations by architecture. Each provided list replaces that architecture's default; omitted architectures retain their defaults. Applies to ordinary and gVisor pools at every disk size. See worker instance generations. |
hawk:karpenterNodeDataVolumeSize |
200Gi |
Sets the disk size for ordinary and gVisor workers. You can specify a single string, such as "200Gi", or an array of sizes, such as ["200Gi", "500Gi", "2000Gi"]. When creating new workers, Hawk prefers smaller disks that have enough space for the requested workloads. See worker disk pools. |
hawk:karpenterNodeDataVolumeThroughput |
unset | Optional gp3 throughput in MiB/s for ordinary data disks and gVisor root disks at every configured size. When unset, Karpenter uses its default. |
hawk:karpenterNodeDataVolumeIops |
unset | Optional gp3 IOPS for ordinary data disks and gVisor root disks at every configured size. When unset, Karpenter uses its default. |
hawk:karpenterNodePoolConsolidateAfter |
30s |
Idle window before the CPU NodePools (all configured disk sizes for ordinary and enabled gVisor workers, and glovebox) consolidate an empty or underutilized node away. Takes a NodePool duration (60m, 1h30m) or Never. A longer window keeps warm nodes, and the images already pulled onto them, between bursts of eval work, paid for in idle node-hours. GPU pools are unaffected. |
hawk:karpenterNodePoolExpireAfter |
unset (Karpenter's 720h) |
Lifetime of a node in the CPU NodePools (all configured disk sizes for ordinary and enabled gVisor workers, and glovebox), as a NodePool duration (1440h, 1h30m) or Never. Runner and sandbox pods are do-not-disrupt and the pools set no termination grace period, so an expired node stops taking new pods but cannot drain until its last eval pod finishes, which can take weeks for long evals. A longer lifetime leaves fewer nodes expired and busy at once. Never removes the age cap entirely: drift and consolidation also wait for a node's eval pods, so a node that never empties is never replaced and stays on the AMI it launched with. Changing the value marks existing CPU nodes Drifted; nodes running eval pods keep the lifetime they launched with, and a node is replaced only once it has no eval pods, 10% of a pool at a time, rounded up to at least one node. GPU pools are unaffected. |
hawk:karpenterNodePoolCpuLimit |
1000 (uncapped on prd/production) |
vCPU cap per NodePool, or unlimited; 0 blocks new nodes. Each disk size adds 2 CPU pools, or 4 with gVisor, and each pool has its own cap. With hawk:enableGloveboxKata on, glovebox adds one more pool with its own cap. Keep the combined CPU caps, plus the controller nodegroup, within your EC2 vCPU quota. The prd/production default is deprecated and warns at preview. |
hawk:karpenterNodePoolCpuLimitOverrides |
unset | Caps for individual NodePools, keyed by name (default, default-arm64, gvisor, gvisor-arm64, glovebox, a disk-size pool such as default-500gi, g4dn, or a hawk:karpenterGpuPools name); each value is a vCPU count or unlimited. Unknown names fail the preview. |
hawk:scanAllTargetMinutes |
15 |
Wall-clock target, in minutes, for a hawk scan run --all scan. The API divides the corpus CPU-hours by it and by the per-worker CPU (runner.cpu, or the CPU of the size tier the whole corpus would get on one runner) to pick the worker count N. Exported as HAWK_API_SCAN_ALL_TARGET_MINUTES. |
hawk:scanAllMaxShards |
16 |
Upper bound on N, the number of worker pods one --all scan runs. runner.shards in the scan config overrides N, and hawk scan resume --shards N overrides it for one resume. Under hawk:kueueAdmissionEnabled the worker Job is admitted as a whole, so keep this bound times the largest worker tier (30 CPU and 220Gi on standard nodes) within the runner queue's budget; a plan the queue can never admit waits for its six-hour no-worker limit and fails. Exported as HAWK_API_SCAN_ALL_MAX_SHARDS. |
hawk:scanAllCpuHoursPerTbJson |
50 |
Allocated CPU-hours needed to scan 1 TB of corpus JSON, used to size N from the corpus bytes. A regex scanner measured 41 at 4-CPU workers and 51 at 14 CPU; heavier scanners need runner.shards. Exported as HAWK_API_SCAN_ALL_CPU_HOURS_PER_TB_JSON. |
hawk:basePythonImage |
dhi.io/python:3.13-dev@sha256:cacda18986eefebc42b0c6c03565ec2d65a4507b6adff559e4daf0f1e2bfe338 |
Full Python base-image reference for the runner image build. |
hawk:cpuArchitecture |
arm64 |
CPU architecture for every Hawk image and the placement of Hawk runners and the janitor. arm64 uses the additive Graviton pools; set amd64 to keep Hawk on x86. Must match the architecture of the host running pulumi up, or every image cross-builds under QEMU. See CPU architecture. |
hawk:evalTaskArchitecture |
amd64 |
Default architecture for CPU eval sandbox services. GPU services remain amd64; tasks may override it per service (nodeSelector in a native values.yaml, platform: in Compose). Set arm64 only when those images support it or are multi-arch. |
hawk:ciliumVersion |
1.18.15 |
Cilium Helm chart version. |
hawk:ciliumRolloutMaxUnavailable |
10% |
maxUnavailable for the cilium and cilium-envoy DaemonSet rollouts, as a node count or percentage. |
hawk:ciliumExclusive |
false |
Use Cilium's VXLAN overlay and retire aws-node. The default retains AWS VPC CNI chaining. |
hawk:ciliumPodCidr |
172.16.0.0/12 |
IPv4 Cilium pod pool in exclusive mode; it must not overlap hawk:primarySubnetCidr. |
hawk:humanEvalSshIngressFromEndpoints |
unset | Pods a human eval's sandbox admits on TCP 2222 besides world, as a list of matchLabels selectors that each name their io.kubernetes.pod.namespace. Set it when the jumphost reaches sandboxes through an in-cluster router (a Tailscale subnet router, say): SNAT gives the connection the router pod's identity, which world never matches. |
hawk:dbMinCapacity |
0 |
Aurora Serverless v2 minimum ACUs (0 lets the cluster auto-pause) |
hawk:dbMaxCapacity |
8 |
Aurora Serverless v2 maximum ACUs |
hawk:dbPgAudit |
false |
Load the pgaudit extension on the warehouse cluster and emit AUDIT: log lines. Two-step lifecycle: to enable, set the flag, deploy, reboot the writer, then deploy again (the first deploy stages shared_preload_libraries and sets pgaudit.log; the second creates the extension and per-role audit settings). Deploy again right after the reboot: auditing starts at the reboot, and until the second deploy every login, the service logins included, is audited at the cluster-wide classes. To disable, unset the flag and deploy first (drops the extension while the library is still loaded, before any other statement), then reboot the writer. If the writer restarts before that deploy has dropped the extension, DDL fails until the next deploy, which drops it first thing. Dev stacks don't inherit this flag from staging; set it on the dev stack itself. The AUDIT: lines go to the cluster's postgresql log group, next to dbLogAllStatements' lines; restrict who can read it with IAM, since CloudWatch Logs can't do it on the group (see Warehouse database log). |
hawk:dbPgAuditLog |
read,write,ddl,role |
pgaudit.log statement classes audited while dbPgAudit is on. They apply to the logins people use; the shared writer logins (the API's, Middleman's and any other read-write user) are always write,ddl,role, and the importer, the Middleman traffic ingester and the model-group audit login none. Dev stacks read it from their own config only. |
hawk:protectResources |
true (non-dev), false (dev envs) |
When true, S3 buckets and secrets are protected from accidental deletion (Pulumi protect + force_destroy=false). Unset defaults to protected except on dev envs; set explicitly to override. |
hawk:runnerMemory |
16Gi (app default) |
Per-runner-pod memory limit. Raise for large eval sets. |
hawk:runnerMemoryRequest |
unset (request = limit) | Per-runner-pod memory request (what the scheduler reserves). Set below runnerMemory to overcommit: runners schedule against this but can burst to the limit. Ignored for eval sets that set runner.memory themselves. Clamped to the effective limit. See Runner memory. |
hawk:runnerCpu |
4 (app default) |
Per-runner-pod CPU limit. Burst headroom for runners driving many concurrent sandboxes; the runner also sizes its k8s_sandbox helm concurrency from it. |
hawk:runnerCpuRequest |
2 (app default) |
Per-runner-pod CPU request (what the scheduler reserves). Kept at 2 so the 4-core limit doesn't change node packing (a 4000m request no longer fits a 4-vCPU node). Ignored for eval sets that set runner.cpu themselves. Clamped to the effective limit. |
hawk:evalSetMaxSamplesCeiling |
unset (the API's 1000) |
Highest max_samples an eval set may request. A launch asking for more is rejected with a 422, and an eval set that omits it runs at no more than this. See Platform ceilings. |
hawk:evalSetMaxTasksCeiling |
unset (the API's 1000) |
The same ceiling for max_tasks. |
hawk:evalSetMaxSandboxesCeiling |
unset (the API's 500) |
The same ceiling for max_sandboxes. When an eval set omits it, the runner's derived value is capped at the lower of this and 500, so raising the ceiling only lets eval sets ask for more. The runner applies this to an omitted knob, so it doesn't bind eval sets pinned to an older runner image. |
hawk:evalSetMaxSubprocessesCeiling |
unset (no limit) | The same ceiling for max_subprocesses. When an eval set omits it, the runner uses the smaller of its CPU count and this; eval sets pinned to an older runner image use their CPU count. |
hawk:runnerEnvStrategy |
prebuilt |
Reuse the runner image's dependency environment. Set to fresh for rollback or dependency debugging. Dev stacks do not inherit this setting from staging. |
hawk:inspectTasksExtraPolicyStatements |
unset | Raw IAM policy statements appended after AllowNodePull to the {env}/inspect-tasks ECR repository policy. |
hawk:scanImporterMemorySize |
3008 |
Scan importer Lambda memory in MB |
hawk:scanImporterEphemeralStorageSize |
3008 |
Scan importer Lambda ephemeral storage in MB |
hawk:enableS3ObjectLambda |
false |
Create S3 Object Lambda Access Points for permission-filtered eval log reads. With protectResources, turning it off keeps the reader's log group /aws/lambda/<env>-inspect-ai-eval_log_reader as an audit trail, whose records still expire after hawk:cloudwatchLogsRetentionDays. Before turning it back on, import that group into the stack with pulumi import, or delete it once its records are no longer needed. CloudWatch can't rename a log group, and the deploy fails while the group exists outside the stack. |
hawk:enableInspectDataBucketDeny |
false |
Add a bucket-policy Deny on the inspect-data bucket's data plane (GetObject*, ListBucket*, PutObject*, DeleteObject*, multipart, restore, replication) for every principal except hawk's own workload roles, the account root and hawk:inspectDataBucketBreakGlassPrincipalArns. AdministratorAccess is denied too. Reads through the eval log reader's Object Lambda access point are exempt. Dev stacks inherit the stg value. |
hawk:inspectDataBucketBreakGlassPrincipalArns |
[] |
aws:PrincipalArn patterns (role ARNs with their path; wildcards allowed) exempt from that Deny, and required when it is on: the break-glass role and every role that deploys or refreshes the stack, or that role's refresh gets a 403 on HeadBucket and drops the bucket from state. Dev stacks inherit the stg value; an explicit local [] overrides it. |
hawk:s3VersionRetentionDays |
90 |
Days a noncurrent (overwritten or deleted) object version survives in the inspect data bucket before it is deleted. This is the undelete window for eval logs. Noncurrent versions tier to STANDARD_IA at 30 days and GLACIER at 60; a window shorter than a tier's age simply skips that tier. |
hawk:s3MaxNoncurrentVersions |
3 |
How many old versions of a single key are kept. Set to 0 to keep every version for the full retention window. |
hawk:publicModelsOnly |
false |
Lock the deployment to public-group model data only — token broker forces model-access-public, OLAP restricts to public groups, RLS bypass is removed from non-admin DB users |
hawk:codeAccessGitHosts |
["github.com", "gitlab.com"] |
Git hosts supported by submission source checks, using GitHub/GitLab-style repository naming. |
hawk:highAvailability |
false |
Run 3 replicas of stateless services (API, Middleman) across AZs instead of 1. Middleman HA requires Valkey (valkeyEnabled or valkeyUrl; non-dev stacks with the relay on get one automatically). |
hawk:apiMinReplicas |
3 (HA), 1 otherwise |
Hawk API autoscaling floor (ECS Application Auto Scaling minimum task count). Unset derives from highAvailability. |
hawk:apiMaxReplicas |
max(3, apiMinReplicas * 2) |
Hawk API autoscaling ceiling. Set this rather than editing the scalable target by hand — a manual override is reverted on the next pulumi up. |
hawk:middlemanMaxReplicas |
max(3, floor * 2) |
Middleman autoscaling ceiling; the floor is always the highAvailability replica count (3 or 1) and is not configurable. Must not be below the floor (checked at preview). |
hawk:middlemanDatabaseIdleSessionTimeoutMs |
unset | PostgreSQL idle_session_timeout for Middleman's connection pool, in milliseconds, passed as MIDDLEMAN_DATABASE_IDLE_SESSION_TIMEOUT_MS. The server closes pooled connections left idle this long. Unset leaves the server's own setting, so each Middleman worker keeps its connection open. 0 disables the timeout. Middleman fails to start unless the variable is unset, blank, or ASCII digits up to 2147483647. Needs PostgreSQL 14+. |
hawk:valkeyEnabled |
on when the relay and the API are on and no valkeyUrl is set (non-dev stacks); off on dev envs |
Provision a shared ElastiCache Serverless Valkey cluster and wire it into the API, Middleman and the relay. Required for the relay on non-dev stacks; Middleman HA needs it or valkeyUrl. Dev envs read this from their own config only. |
hawk:valkeyUrl |
(unset) | Use an external Valkey/Redis for Middleman's cache bus instead of the provisioned one. The API and the relay only use a provisioned cluster. Empty disables it. Dev envs inherit it from staging config. With it set nothing is provisioned automatically, so a non-dev stack that keeps the relay on must also set valkeyEnabled, which provisions a managed cluster next to the external one (the relay does not use the external URL). |
hawk:relayEnabled |
true |
Deploy the hawk-relay ECS service that backs hawk acp / hawk attach (operator attach to a running eval's pod). Set false to skip its Fargate task + image build if you never attach. On non-dev stacks its session limit needs Valkey, which is provisioned automatically unless valkeyEnabled or an external valkeyUrl is set; an explicit valkeyEnabled: "false" with the relay on is rejected at pulumi preview. Turning the relay off later removes an automatically provisioned cache, which the API and Middleman also use. |
hawk:requireJobToken |
false |
Enforce (true) that the token broker reject requests whose projected K8s ServiceAccount identity token doesn't match the requested job (403). Permissive (false, default) logs identity mismatches; output credentials still require a matching pod-bound token when the worker lacks write and execute access to every result group. Enable global enforcement after the audit logs are clean. |
hawk:tokenBrokerCredentialDurationSeconds |
3600 |
STS credential lifetime issued by the token broker. Accepted range: 1800..3600; 1800 seconds lets the runner credential cache reuse issued credentials. The broker Lambda uses temporary execution-role credentials to call AssumeRole, so role chaining caps the session at one hour even if the target role's max_session_duration is higher. |
hawk:runnerStorageGrants |
(unset) | Named storage grants an eval-set may request via runner.storage_grants: [<name>], giving its runner (never the sandbox) read-only access to the grant's S3 bucket at runtime; the token broker attaches one read-only session policy per requested grant after re-checking the submitter's permissions and verified job identity. Each grant sets bucketArn (required), permission (required; validated at pulumi preview and API startup to be a single token, not a model-access-*/OAuth-scope name, and disjoint from the default permissions), mode (only read), optional kmsKeyArn (Decrypt via S3 only; prefer a key dedicated to the bucket), and optional env injected into opted-in runners. Unset ⇒ feature off. Grant problems never cost a runner its base credentials: a grant that is unknown to the broker (e.g. removed from the config while runs using it were live), unverified, or unauthorized is dropped from the session with an error log and a StorageGrantUnknown/StorageGrantsDenied metric, so the run continues but loses access to that bucket mid-flight — prefer draining runs that requested a grant before removing it. |
hawk:registryCredentialsSecretArn |
(unset) | Optional existing Secrets Manager ARN for sandbox image-pull credentials. Unset or empty creates <env>/hawk/registry-credentials initialized to {}, which leaves pulls unauthenticated until an administrator fills it. |
hawk:runnerEnvStrategy controls dependency preparation for evaluations, scans, and scan resumes. Official runner images reuse their prebuilt environment by default; an unavailable or invalid prebuilt environment falls back to a fresh one. Dependency conflicts still fail the job. To roll back, set this key to fresh and deploy the API; the change applies to newly launched jobs. Submitted runner.environment values and secrets cannot override it. For the same rollback when running the API locally, set HAWK_API_RUNNER_ENV_STRATEGY=fresh explicitly; scripts/dev/generate-env.py --api does not copy this setting from the stack.
A --all scan runs as N worker pods plus a small orchestrator pod. Operator notes:
- Each worker is sized in tiers up to the API's
HAWK_API_RUNNER_MAX_NODE_CPUceiling (32 vCPU, the largest standard node), and arunner.cpunot below that ceiling is refused. - Under
hawk:kueueAdmissionEnabledthe worker Job is admitted as a whole: keephawk:scanAllMaxShardstimes the largest worker tier within the runner queue's budget, or the scan waits for an admission that never comes. - While a failed or completed sharded scan still has a worker Pending or live,
hawk scan resumeanswers 409 untilhawk deleteor the janitor removes it. - If the worker Job is suspended and resumed (a Kueue eviction or a manual suspend), its re-created workers find their indexes already claimed and exit 0, so the scan fails;
hawk scan resumefinishes it. - If the orchestrator pod dies, its workers finish the chunks they already hold and then idle until their credentials stop refreshing (up to
hawk:tokenBrokerCredentialDurationSeconds; 47 minutes in a dev test);hawk deleteends them at once and makes the scan resumable. - The orchestrator fails the scan if no worker registers within an hour of its plan, or six hours under
hawk:kueueAdmissionEnabled, where the worker Job can queue behind other runners. hawk traceandhawk stacktraceattach to one worker of a sharded scan.- The
runner_podsgauge counts N+1 pods per sharded scan.
hawk:ciliumExclusive is for new or deliberately migrated clusters. With the default value, the existing AWS VPC CNI chaining behavior and default 10.0.0.0/8 Cilium pod IP pool are unchanged. Exclusive mode uses the configured RFC 1918 hawk:ciliumPodCidr pool and VXLAN encapsulation instead.
Registry credentials
- Setup: edit the secret in AWS Secrets Manager to contain
{"docker.io": {"username": "...", "password": "..."}}, adding other registry hosts as needed. Pulumi preserves manual edits.{}disables deployment credentials; malformed or unreadable secrets fail eval launches. - Updates: new launches pick up edits after the API's five-minute credential cache expires. Existing jobs keep their credentials; an empty secret creates no Kubernetes pull secret or pod reference.
- Docker Hub: key it as
docker.io(or any common alias); Hawk writes both forms Kubernetes needs to match Docker Hub pulls. - Scope: any eval can read the credential from its sandbox namespace, so every eval can pull whatever the token can. A Docker Hub personal access token covers every repository its account can read, so use
Repo Public Read-onlywhen the goal is rate-limit relief; for private repositories, use an organization access token scoped to those repositories, or a dedicated account that can read nothing else. - KMS: if the secret uses a customer-managed key, grant the API task role
kms:Decrypton it. - Rotation: create the new token before revoking the old one, and keep both valid longer than your longest eval-set plus the API's five-minute credential cache. kubelet doesn't fall back to anonymous pulls, so revoking first breaks every sandbox's pulls.
EKS-unsupported availability zones
Some AZs don't support the EKS control plane, and a cluster that lands on one fails with UnsupportedAvailabilityZoneException: Cannot create cluster ... in us-east-1e .... Setting hawk:autoExcludeEksZones: "true" makes Hawk drop the region's known-bad AZs (use1-az3/us-east-1, usw1-az2/us-west-1, cac1-az3/ca-central-1) before it picks subnets, so a new deployment in an affected region needs no further action:
Pulumi.example.yaml ships with it on, and in these three regions a new stack needs it — every private subnet becomes an EKS control-plane subnet, so leaving it off puts one in the unsupported AZ and the apply fails. The code default is false only so that upgrading Hawk can't change a deployed stack's AZ set behind your back (see the upgrade warning below). If you write your stack config from this table rather than copying the example, set it explicitly.
Auto-exclusion only kicks in when EKS is being created (hawk:createEks, the default); a VPC-only stack keeps its full AZ layout either way. Note the corollary: on an opted-in stack in an affected region, later toggling hawk:createEks changes the AZ set too, with the same replacement consequences.
Use hawk:excludeZoneIds to exclude additional zones — a newly-unsupported AZ that isn't in Hawk's list yet, or one you're avoiding for capacity reasons. Entries are merged with the auto-excluded ones (they don't replace them), so a known-bad zone stays excluded whether or not you list it:
Verify against the live AWS error message — supported AZs change over time.
AWS added an AZ to your region
Nothing changes for a deployed stack whose EKS cluster exists (stacks with createEks: "false" still use the live zone list). Once the cluster exists, Hawk reads the AZ set back from the existing subnets instead of asking AWS for the current zone list, so a new zone can't shift subnet CIDRs or touch the cluster. pulumi up prints a warning naming the new zone's ID; the stack keeps running on the zones it was created with (adopting the new zone would mean recreating the cluster). On such a deployed stack, excludeZoneIds entries matching zones already in its set have no effect on the layout (pulumi up prints a warning saying so) — the key's remaining roles are silencing the new-zone warning and shaping brand-new stacks. To silence the warning, add the zone ID to hawk:excludeZoneIds:
The pin needs the cluster to exist. Two states have a VPC without a cluster: a stack that deployed with createEks: "false" and later flips it to "true", and a first pulumi up that failed after creating the VPC but before creating the cluster. In both, the next pulumi up enumerates zones live, and a zone added since the VPC was created shifts the existing subnets' CIDRs. Add the new zone to hawk:excludeZoneIds before that pulumi up.
If you hit this on an older Hawk version, the failed pulumi up may have left the stack half-updated — and a second pulumi up can then report "No changes needed" even though the cluster is broken, because Pulumi's view of the subnets is stale. Run pulumi refresh (optionally pulumi refresh --target <cluster urn>) so Pulumi re-reads the real state, add the new zone to hawk:excludeZoneIds, then run pulumi up again.
Editing EKS_UNSUPPORTED_ZONE_IDS changes deployed stacks
The opt-in flag protects the transition, not the contents. Once a stack sets autoExcludeEksZones: "true", its AZ set is a function of the hardcoded table in infra/lib/eks_zones.py — so any edit to that table moves the AZ set of every opted-in stack in the affected region whose EKS cluster doesn't exist yet on the next routine pulumi up, with the same destructive subnet replacement described below. A stack whose EKS cluster is already deployed is shielded: its AZ set is read back from its own subnets (see the note above), so a table edit leaves the layout alone and pulumi up prints warnings instead. For the unshielded class, removing an entry (because AWS added support for a zone) is just as disruptive as adding one: the AZ comes back, takes its old position, and everything after it renumbers.
Treat the table as append-only in practice. If AWS adds support for a listed zone, the safe migration for existing stacks is to leave the table alone and let them keep the AZ set they have; only remove the entry if you're prepared to do the staged migration below on every affected stack.
Turning autoExcludeEksZones on for an existing stack is a migration, not a config change
Enabling it on a deployed stack in us-east-1 / us-west-1 / ca-central-1 forces destructive subnet replacement, and pulumi up will most likely fail partway rather than complete. Subnet CIDRs are assigned by AZ position (infra/core/vpc.py) while subnet resources are keyed by AZ name, so dropping an AZ leaves each surviving later AZ pointing at its neighbour's CIDR. Pulumi creates replacements before deleting the originals, so:
- the new subnet collides with the live one still holding that CIDR (
InvalidSubnet.Conflict); and - the old subnets can't be deleted anyway while ALB, EKS/Karpenter, RDS and VPC-endpoint ENIs reference them (
DependencyViolation).
If the excluded zone happens to sort first in your account, the NAT gateway's subnet changes too and it is replaced along with them.
pulumi preview shows the replacements but not either of those failures, so a clean preview is not evidence the apply will succeed. Measured on a fresh us-east-1 stack (sandbox account, where use1-az3 is us-east-1e and sorts 5th of 6): 440 resources with the flag off vs 435 with it on — the delta is 2 subnets, 1 route table and 2 associations, all in us-east-1e, with us-east-1f renumbered from 10.0.80.0/20 to 10.0.64.0/20. Where the bad zone sorts in your account determines how much moves.
What to do instead, in order of preference:
- Leave the flag unset. A working cluster already avoids the bad AZ, so there's nothing to gain. This is the supported steady state, not a deprecated one.
- Pin the AZ set explicitly with
hawk:excludeZoneIdsif you want it recorded in config rather than implied. Matching your current AZ set produces no diff. - Rebuild the VPC if you genuinely need the AZ set to change (e.g. the stack's EKS creation previously failed because its VPC spans the unsupported AZ). Plan it as a staged migration with downtime, not an in-place
pulumi up.
Fresh deployments need none of this — nothing exists to replace.
Minimum of two availability zones
Hawk refuses to plan a stack whose exclusions leave fewer than two AZs, failing with a clear error instead of letting pulumi preview succeed and the apply die on the ALB, the EKS control plane or the RDS subnet group.
This is most likely in us-west-1, where AWS exposes only two of the three physical zones to any given account and which two varies: an account mapped to usw1-az1 + usw1-az2 loses half its zones to the auto-exclusion default. If you hit it, drop entries from hawk:excludeZoneIds, set hawk:autoExcludeEksZones to false, or deploy to a region where your account sees more zones.
Worker instance generations¶
Set hawk:karpenterInstanceGenerations in the stack that owns the EKS cluster to choose the allowed CPU worker generations. For example, this enables generations 6 and 8 for x86 workers while keeping the ARM defaults:
The accepted architecture keys are amd64 and arm64. Each supplied value must be a non-empty list of distinct positive integer strings. Quote the generation numbers. An omitted architecture keeps its default: ["7"] for amd64, ["7", "8"] for arm64. An empty object keeps both defaults. Generation numbers refer to AWS instance families, for example m6a and m6g are generation 6.
The setting applies to ordinary and gVisor CPU pools at every disk size. It leaves GPU pools, the glovebox Kata pool, and the fixed controller node group unchanged. Ordinary and gVisor x86 pools exclude Flex instances regardless of generation. Other requirements, including instance category, CPU count, architecture, Nitro and capacity type, still apply. The selected generations must offer matching instances in your region. Shared dev stacks use their owning cluster's worker pools.
Review pulumi preview and apply with pulumi up. Adding generations keeps existing matching nodes eligible. Removing a generation can make nodes drift and eligible for replacement under Karpenter's disruption rules.
Worker disk pools¶
hawk:karpenterNodeDataVolumeSize sets the ordinary worker's data disk and the gVisor worker's root disk. A string is equivalent to a one-item list. Use several quantities to offer a choice of disk sizes:
The first entry uses the default and gvisor resource names. These base names do not imply a disk size. Later entries use capacity suffixes, such as default-200gi and gvisor-500gi. ARM pools add -arm64. The first entry retains its configured spelling in the disk template; later entries are rendered in GiB. All values must be positive whole-GiB capacities. Arrays accept 1–10 distinct capacities; equivalent quantities such as 1Ti and 1024Gi count as duplicates.
Within each runtime, smaller disks have higher provisioning weights, regardless of array order. Ordinary pool weights start at 20 and gVisor weights at 10, decreasing by one for each larger size. When a workload qualifies for both runtimes, ordinary pools have higher priority. Existing larger workers can still receive small jobs. Each capacity has x86 and ARM pools, plus two gVisor pools when enabled. Each pool has its own CPU cap, set by karpenterNodePoolCpuLimit or a karpenterNodePoolCpuLimitOverrides entry under its full name. Account for their combined usage when setting limits. Ordinary data disks and gVisor root disks share the configured throughput and IOPS; unset settings use gp3 defaults. GPU pools are unaffected.
Changing the first entry or removing capacities can replace workers or delete pools. Review the preview and finish or drain affected jobs before applying. Changes to disk templates do not resize existing volumes in place.
Sandboxes request storage through resources.requests.ephemeral-storage in their native Kubernetes configuration. Leave room for system reservations: a 500 GiB request needs a disk larger than 500 GiB. Image downloads also consume node disk, but image sizes are not inferred from image names or counted against each pod's storage limit. Allow for image storage when choosing worker capacity.
Kata microVMs¶
hawk:enableGloveboxKata: true installs glovebox's three Kata RuntimeClasses (kata-lockdown, kata-peer and kata-open), the admission policies that patch their pods, and a glovebox Karpenter pool of amd64 nodes with nested virtualization. Each sandbox pod on one of these classes runs in its own microVM.
Before you enable it, set hawk:eksK8sVersion to 1.36 or later, since the default is 1.35. Also install kubectl on the host that runs pulumi up: the deploy uses it, with uv and the AWS CLI that Hawk's setup already needs, to wait until the cluster enforces the admission policies. pulumi preview refuses a VPC or pod range that uses public addresses; an ordinary private VPC passes. It also refuses hawk:createEks on an existing VPC (hawk:createVpc: false): that stack runs no subnet router, so the kata-peer class would have no address the human-eval jumphost's SSH arrives from. A stack that only shares a cluster (hawk:createEks: false) is unaffected.
Each node in the pool runs glovebox's provisioner as root at boot, fetched at the commit pinned in infra/k8s/karpenter/kata.py. Changing that pin changes what runs as root on these nodes. The pool's CPU cap is keyed glovebox in hawk:karpenterNodePoolCpuLimitOverrides.
A node refuses a pod whose allow_cidr range is wider than its --address-grants width lets a grant be, and always refuses the cluster's own ranges. Hawk boots every node with /24,/64, glovebox's own default, and tells the API the same width, so a wider range is refused at submission rather than by the node. hawk:gloveboxAddressGrants sets another width, such as /16,/48, or none to allow no range at all; changing it replaces every glovebox node.
Each node runs at most 4 sandbox VMs, enforced as its kubelet maxPods beside its agents. glovebox ends a VM whose recorded traffic passes about 8 GiB, and the next VM to write once a node's running recordings pass 32 GiB, so at 4 VMs one sandbox's traffic cannot end another's. maxPods counts pods, not VMs: while one of a node's agents is not running (on a new node before the agent starts, during its rollout, or on a node booted before it was turned off), a sandbox can take its slot, so a node that starts while sandboxes are waiting usually runs more than 4. A node-critical agent then preempts a sandbox, and any other agent waits for one to end. Turning one of those agents on or off replaces every glovebox node, each only once no sandbox is running on it.
Authentication (advanced)¶
The eight keys in the Authentication section are required for an external OIDC provider. These are optional. Empty device, revocation, and scopes-supported values are fine. Team attribution has defaults and is not part of the all-or-nothing check.
| Config Key | Default | Description |
|---|---|---|
hawk:oidcTeamsClaim |
teams |
JWT claim listing the user's team groups, used by Middleman to attribute token usage by team. Set to the empty string ("") to disable team attribution. See Usage attribution by team. |
hawk:oidcTeamsGroupPrefix |
team- |
Prefix stripped from each group in the teams claim to produce the displayed team name. |
hawk:oidcDeviceAuthorizationEndpoint |
unset | Device-code endpoint. Leave empty when the issuer has none (Cognito user pools do not). |
hawk:oidcRevocationEndpoint |
unset | Token revocation endpoint. Leave empty when the issuer has none. |
hawk:oidcScopesSupported |
[] |
JSON list of scopes the issuer advertises. Omitted or empty is an empty list. |
hawk:defaultPermissions |
model-access-public |
Space-separated permissions granted to authenticated users whose tokens carry no honoured permission — no permissions / cognito:groups claim and no allowlisted (public) scp value (e.g. Cognito users who aren't in any group). Set to the empty string ("") to grant no default permissions. |
hawk:refreshTokenLifetimeDays |
90 |
Refresh-token lifetime in days, mirroring your IdP's refresh-token lifetime. Advertised to the CLI so its pre-submit preflight can tell when a token will expire. |
hawk:expectedLongestRunDays |
30 |
Longest a run is expected to stay alive, in days; the CLI forces a re-login before submitting a run whose token wouldn't survive it. Must not exceed hawk:refreshTokenLifetimeDays (the CLI re-login cadence is the difference between the two). Raising it also widens ECR runner-image retention, which is this value plus 7 days. |
Run the OIDC autodiscovery script
python scripts/dev/discover-oidc.py <issuer-url> <client-id> <audience> prints the full set of hawk:oidc* config values to paste into your stack file.
Observability¶
| Config Key | Default | Description |
|---|---|---|
hawk:enableDatadog |
false |
Enable Datadog metrics, logs, and APM. See Datadog below. |
hawk:datadogSite |
datadoghq.com |
Datadog site (e.g. datadoghq.eu, us3.datadoghq.com). |
hawk:createDatadogAwsIntegration |
false |
When true, Pulumi provisions the Datadog ↔ AWS integration role. |
hawk:hawkSentryDsn |
unset | Sentry DSN for the Hawk API + Lambdas. |
hawk:middlemanSentryDsn |
unset | Sentry DSN for Middleman. |
hawk:otelTracingEnabled |
false |
Send OTLP traces from API/Middleman/Lambdas to AWS X-Ray. |
hawk:otelSpanSamplingPercentage |
100 |
Sampling rate (0–100) when OTel tracing is enabled. |
hawk:stuckEvalWebhookUrl |
unset | HTTPS webhook subscribed to the stuck-eval-set SNS alert topic (prd-only monitor for eval-sets whose samples stop progressing). The same topic also carries the approval-waiting alarm, which fires when an eval-set has a sample blocked on a human tool-call approval for 10+ minutes. |
Optional Integrations¶
These are all disabled by default. Enable them in your stack config when needed.
Datadog¶
Monitoring, APM, and log forwarding:
Requires <env>/platform/datadog-api-key and <env>/platform/datadog-app-key secrets in AWS Secrets Manager.
Cloudflare¶
Option C from the Domain & DNS table above, for when your parent domain is in Cloudflare and you want a subdomain delegated to AWS.
There are two mutually exclusive ways to do this. Pick one. In both, hawk:publicDomain must be a subdomain of the Cloudflare parent domain.
Manual delegation (strict-preflight compatible, recommended)¶
Leave hawk:createPublicZone: "false" and do not set the hawk:cloudflare* keys. Create or import the Route 53 public hosted zone first, then create NS records in your Cloudflare parent zone (pointing the subdomain at that zone's four nameservers) before deploy. If the subdomain was delegated before (e.g. an earlier deployment attempt), replace the old NS records — adding new ones alongside stale ones yields a mixed nameserver set and intermittent SERVFAIL. No Cloudflare API token is needed, and scripts/dev/preflight.sh can verify the delegation before pulumi up.
When only this single subdomain is delegated to Route 53, set both hawk:publicDomain and hawk:domain to it (e.g. both hawk.example.com) — service certs validate in the publicDomain zone, so hawk:domain must live inside it; the resulting api.hawk.hawk.example.com-style URLs are cosmetic. See the domain-relationship warning in Domain & DNS above.
Pulumi-managed delegation (incompatible with strict preflight)¶
Let Pulumi create the Route 53 public zone and manage the Cloudflare NS records for you. This requires hawk:createPublicZone: "true", so the zone's nameservers don't exist until the run — strict preflight will fail the DNS check (see the createPublicZone warning above).
hawk:publicDomain must be a subdomain of hawk:cloudflareParentDomain (Pulumi raises a ValueError otherwise).
hawk:createPublicZone: "true"
hawk:cloudflareZoneId: "your-zone-id"
hawk:cloudflareParentDomain: "example.com"
hawk:publicDomain: "hawk.example.com"
Before pulumi up, create a Cloudflare API token (Zone:DNS:Edit on the parent zone) and store it in AWS Secrets Manager:
aws secretsmanager create-secret \
--name "<env>/platform/cloudflare-api-token" \
--secret-string "<token>"
<env> defaults to your Pulumi stack name. The deploy will fail with a "secret not found" error if this isn't set up first.
Tailscale¶
VPN overlay for private service access:
Set hawk:albInternal: "true". Put the auth key's secret ARN in hawk:tailscaleAuthKeysSecretArn. The subnet router advertises hawk:primarySubnetCidr and any hawk:eksPrivateSubnetCidrs on the tailnet. This makes all services accessible only through your Tailscale network.
CrowdStrike Falcon¶
Endpoint protection for EKS nodes and the Tailscale subnet router:
Requires a <env>/platform/crowdstrike secret in AWS Secrets Manager with:
{
"cid": "YOUR-CUSTOMER-ID",
"client_id": "YOUR-API-CLIENT-ID",
"client_secret": "YOUR-API-CLIENT-SECRET",
"base_url": "https://api.us-2.crowdstrike.com",
"image_tag": "7.31.0-18410-1"
}
image_tag picks the node sensor version for the DaemonSet, and must be a multi-arch tag. For 7.31 and later, CrowdStrike publishes node-sensor images only to a repository shared by all clouds, with tags like 7.31.0-18410-1. Hawk still accepts the per-cloud tags of 7.30 and earlier, such as 7.20.0-17306-1.falcon-linux.Release.US-2, and pulls them from the per-cloud repository. Deploys fail if the tag isn't in the registry for both amd64 and arm64.
Pulumi doesn't wait for the DaemonSet to roll out. After changing image_tag, run kubectl -n falcon-system rollout status ds/falcon-sensor. If pods stay in ImagePullBackOff or CrashLoopBackOff, put the previous tag back and redeploy. image_tag doesn't change which kernel nodes boot: see Endpoint Protection for the Bottlerocket pin on Kubernetes 1.36 and later.
Setup:
- In the CrowdStrike Falcon console, go to Support and resources > API clients and keys and create a client with Sensor Download: Read scope.
- Copy your CID from Host setup and management > Deploy > Sensor downloads.
- Your
base_urlmatches your Falcon console URL (e.g.falcon.us-2.crowdstrike.com→https://api.us-2.crowdstrike.com).
When enabled, this installs the Falcon sensor on:
- All EKS nodes (Bottlerocket and AL2023) — via the falcon-sensor DaemonSet, which requires the Falcon Images Download API scope, part of the Falcon Cloud Security with Containers add-on.
- Tailscale subnet router (AL2023 ARM64) — via cloud-init at instance boot, since it has no DaemonSet to rely on.
EKS nodes get the sensor from the DaemonSet alone. Do not add a host-RPM install to a node pool's userData as well: a node cannot run both, and the containerized sensor will sit in CrashLoopBackOff.
Budget Alerts¶
When integrations are disabled, services fall back to simpler alternatives (CloudWatch instead of Datadog, no DNS delegation, etc.).