mirror of
https://github.com/block/buzz.git
synced 2026-11-28 04:01:45 +00:00
## Summary Follows https://github.com/block/buzz/pull/9771 (merged), which added the acceptance CronJob. Some NIP-FI issuers bind each key to one identity. A deployment that mints a new identity for each run then needs a new key for each run, written next to the assertion before the probe starts. The probe could only take its key from an argument or the environment, which a Kubernetes init container can't set. - **Probe:** `--private-key-file` (`BUZZ_PRIVATE_KEY_FILE`) reads the key (hex or nsec) from a file. It conflicts with `--private-key`. - **Shared read:** the key file and the assertion file use one bounded reader, `acceptance::read_secret_file`. It needs a regular, non-empty file under a size cap. - **Report:** the JSON report now includes `pubkey`, the hex key the probe ran as. An operator can match a run to the identity that was minted for it. - **Chart:** `acceptance.privateKeyFile` is passed as `--private-key-file`, not as an env var, so a probe that predates the flag fails instead of running with a new key. Exactly one of it and `acceptance.privateKeySecret.name` must be set; rendering fails with neither or both. - **A new key per run needs an agent assertion** (`nip-fi-agent+jwt` whose `nostr_owner_pubkey` is a relay member). A members-only relay refuses a new person key, and an open relay joins it to every auto-join channel. The README and `values.yaml` say so. - **Connect address:** `--connect-addr` (`BUZZ_ACCEPTANCE_CONNECT_ADDR`) dials a plaintext `host:port` for every WebSocket connection and for the NIP-11 fetch, for a probe that can't reach the relay's public host. The relay URL still sets the `Host` header, the NIP-42 relay tag and the NIP-11 `Host`, so the relay serves the same community. On that path, NIP-11 uses no proxy, follows no redirect and requires a 2xx answer. The chart passes `acceptance.connectAddr` as `--connect-addr`, not as an env var, so a probe that predates the flag fails the run instead of checking the public URL. The default is empty. `NostrWsConnection::connect_to_addr` now takes upgrade headers, so the NIP-FI assertion goes on this path too; loadgen passes none. (Folded in from #9830.) - **Chart version 0.1.13** with an `artifacthub.io/changes` entry. It publishes the acceptance CronJob from #9771, the key file and the connect address. - **Follow-up test from the #9767 review:** the fake relay gets an `accept_mismatched` setting, and `access_control_fails_when_the_relay_accepts_another_keys_write` expects `access_control` to fail at `pubkey_mismatch_rejected`. A `pubkey_mismatch_rejected` stage that always returns Ok now fails a test. ## What got simpler The assertion reader's inline bounded read is now the shared `read_secret_file`, so both secret files follow one rule instead of two copies of it. The probe's four connection call sites now share one `open` helper, and `connect_to_addr` reuses the same `upgrade_request` path as `connect_with_headers`. ## Testing - `e2e_acceptance`: `the_binary_authenticates_with_the_key_from_its_key_file` passes against a live relay with the key path in `BUZZ_PRIVATE_KEY_FILE` (the same clap argument as `--private-key-file`). It checks that the report's `pubkey` is the file's key, so a probe that ignored the file and made a new key fails. - `e2e_acceptance`: `the_binary_exits_2_when_it_cannot_run` covers a bad key, a bad key file, a missing key file, and both key flags at once. Each exits 2 with no report and no metrics. - Existing unit tests cover the shared reader through the assertion file (missing, empty, oversized, directory, FIFO). - `connect_addr_dials_the_address_and_keeps_the_relay_url`: the probe runs at an unresolvable `wss://relay.invalid` with the fake relay's address. Every upgrade has `Host: relay.invalid` and the assertion's bearer header, and every AUTH relay tag is `wss://relay.invalid`. - `nip11_goes_to_the_connect_addr_with_the_relay_host` (`GET /relay?route=probe`, `Host: relay.invalid:8443`) and `nip11_at_the_connect_addr_does_not_follow_a_redirect` (a 301 fails `nip11` with no version). - `caller_user_agent_replaces_default` now covers `connect_to_addr` too. - `tests/acceptance_test.yaml`: `acceptance.connectAddr` renders `--connect-addr <addr>` in the args, and the default args do not have it. The key file renders as `--private-key-file <path>` in the args, with neither `BUZZ_PRIVATE_KEY_FILE` nor `BUZZ_PRIVATE_KEY`, a Secret plus a file fails, and no key source fails. 🤖 Generated with [Claude Code](https://claude.com/claude-code) buzz-review-completed --------- Signed-off-by: Elrond <28d6302a099e5225b02c4155ac4236e4912603df2ab08dbfc2f4fef08ce598c8@buzz.block.builderlab.xyz> Signed-off-by: Luke Tornquist <tornquist@squareup.com> Co-authored-by: Elrond <28d6302a099e5225b02c4155ac4236e4912603df2ab08dbfc2f4fef08ce598c8@buzz.block.builderlab.xyz> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
390 lines
15 KiB
JSON
390 lines
15 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"title": "Buzz Helm chart values",
|
|
"description": "Schema for values.yaml. Catches misconfiguration at `helm install` time before _validate.tpl runtime fails. Both layers are intentional: schema rejects malformed inputs; templates reject inconsistent combinations.",
|
|
"type": "object",
|
|
"additionalProperties": true,
|
|
"properties": {
|
|
"quickstart": {
|
|
"type": "boolean",
|
|
"description": "Master toggle for evaluation profile (enables postgresql + redis subcharts and chart-side autogen). Not GitOps-safe."
|
|
},
|
|
"image": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"repository": { "type": "string", "minLength": 1 },
|
|
"tag": { "type": "string" },
|
|
"digest": {
|
|
"type": "string",
|
|
"pattern": "^$|^sha256:[0-9a-f]{64}$",
|
|
"description": "Optional immutable OCI image digest. When set, the chart renders repository@digest and ignores tag."
|
|
},
|
|
"pullPolicy": { "type": "string", "enum": ["Always", "IfNotPresent", "Never"] },
|
|
"pullSecrets": {
|
|
"type": "array",
|
|
"items": { "type": "object", "required": ["name"], "properties": { "name": { "type": "string" } } }
|
|
}
|
|
},
|
|
"required": ["repository", "pullPolicy"]
|
|
},
|
|
"replicaCount": {
|
|
"type": "integer",
|
|
"minimum": 1,
|
|
"description": "Replica count for the relay Deployment. replicaCount > 1 requires Redis (for buzz-pubsub) — enforced by _validate.tpl. Git storage does NOT need ReadWriteMany: git state is object-store-backed and repo names live in Postgres, so ReadWriteOnce is fine per replica."
|
|
},
|
|
"relayUrl": {
|
|
"type": "string",
|
|
"pattern": "^(wss?://.+)?$",
|
|
"description": "Public wss:// URL clients connect to. Required (validated by _validate.tpl). Drives RELAY_URL, default mediaBaseUrl, default ingress host."
|
|
},
|
|
"mediaBaseUrl": {
|
|
"type": "string",
|
|
"pattern": "^(https?://.+)?$"
|
|
},
|
|
"ownerPubkey": {
|
|
"type": "string",
|
|
"pattern": "^([0-9a-f]{64})?$",
|
|
"description": "64-char lowercase hex Nostr pubkey of the relay operator. Required when relay.requireRelayMembership=true."
|
|
},
|
|
"secrets": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"existingSecret": { "type": "string", "description": "Name of an externally managed Secret. Production / GitOps path." },
|
|
"relayPrivateKey": { "type": "string" },
|
|
"gitHookHmacSecret": { "type": "string" }
|
|
}
|
|
},
|
|
"relay": {
|
|
"type": "object",
|
|
"additionalProperties": true,
|
|
"properties": {
|
|
"bindAddr": { "type": "string", "minLength": 1 },
|
|
"maxConnections": { "type": "integer", "minimum": 1 },
|
|
"maxConcurrentHandlers": { "type": "integer", "minimum": 1 },
|
|
"sendBuffer": { "type": "integer", "minimum": 1 },
|
|
"drainJitterMs": { "type": "integer", "minimum": 0 },
|
|
"requireAuthToken": { "type": "boolean" },
|
|
"requireRelayMembership": { "type": "boolean" },
|
|
"allowNipOaAuth": { "type": "boolean" },
|
|
"huddleAudioAvailable": {
|
|
"type": ["boolean", "null"],
|
|
"description": "Whether relay huddle audio is available. null means chart default: true for one replica, false for replicaCount > 1. Explicit true with replicaCount > 1 means the operator accepts/owns external multi-pod audio/SFU behavior."
|
|
},
|
|
"pubkeyAllowlist": { "type": "boolean" },
|
|
"corsOrigins": {
|
|
"type": "array",
|
|
"items": { "type": "string" }
|
|
},
|
|
"ephemeralTtlOverride": { "type": "integer", "minimum": 0 },
|
|
"command": {
|
|
"type": "array",
|
|
"items": { "type": "string" },
|
|
"description": "Optional relay container entrypoint override. Empty preserves the image default."
|
|
},
|
|
"args": {
|
|
"type": "array",
|
|
"items": { "type": "string" },
|
|
"description": "Optional relay container arguments override. Empty preserves the image default."
|
|
},
|
|
"extraVolumeMounts": {
|
|
"type": "array",
|
|
"items": { "type": "object" },
|
|
"description": "Raw Kubernetes volumeMount fragments appended to the relay container."
|
|
}
|
|
}
|
|
},
|
|
"extraInitContainers": {
|
|
"type": "array",
|
|
"items": { "type": "object" },
|
|
"description": "Raw Kubernetes init-container fragments appended to the relay Pod."
|
|
},
|
|
"extraVolumes": {
|
|
"type": "array",
|
|
"items": { "type": "object" },
|
|
"description": "Raw Kubernetes volume fragments appended to the relay Pod."
|
|
},
|
|
"service": {
|
|
"type": "object",
|
|
"additionalProperties": true,
|
|
"properties": {
|
|
"type": { "type": "string", "enum": ["ClusterIP", "NodePort", "LoadBalancer"] },
|
|
"port": { "type": "integer", "minimum": 1, "maximum": 65535 },
|
|
"healthPort": { "type": "integer", "minimum": 1, "maximum": 65535 },
|
|
"metricsPort": { "type": "integer", "minimum": 1, "maximum": 65535 }
|
|
}
|
|
},
|
|
"serviceAccount": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"create": { "type": "boolean" },
|
|
"name": { "type": "string" },
|
|
"annotations": { "type": "object" }
|
|
}
|
|
},
|
|
"podDisruptionBudget": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"enabled": { "type": "boolean" },
|
|
"minAvailable": { "oneOf": [{ "type": "integer" }, { "type": "string" }] },
|
|
"maxUnavailable": { "oneOf": [{ "type": "integer" }, { "type": "string" }] }
|
|
}
|
|
},
|
|
"ingress": {
|
|
"type": "object",
|
|
"additionalProperties": true,
|
|
"properties": {
|
|
"enabled": { "type": "boolean" },
|
|
"className": { "type": "string" },
|
|
"annotations": { "type": "object" },
|
|
"hosts": { "type": "array" },
|
|
"tls": { "type": "array" }
|
|
}
|
|
},
|
|
"httproute": {
|
|
"type": "object",
|
|
"additionalProperties": true,
|
|
"properties": {
|
|
"enabled": { "type": "boolean" },
|
|
"parentRefs": { "type": "array" },
|
|
"hostnames": { "type": "array", "items": { "type": "string" } },
|
|
"rules": { "type": "array" }
|
|
}
|
|
},
|
|
"persistence": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"git": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"enabled": { "type": "boolean" },
|
|
"mountPath": { "type": "string", "minLength": 1 },
|
|
"storageClass": { "type": "string" },
|
|
"accessMode": { "type": "string", "enum": ["ReadWriteOnce", "ReadWriteMany", "ReadOnlyMany", "ReadWriteOncePod"] },
|
|
"size": { "type": "string", "pattern": "^[0-9]+(\\.[0-9]+)?(E|P|T|G|M|K|Ei|Pi|Ti|Gi|Mi|Ki)?$" },
|
|
"annotations": { "type": "object" },
|
|
"existingClaim": { "type": "string" }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"postgresql": {
|
|
"type": "object",
|
|
"additionalProperties": true,
|
|
"properties": { "enabled": { "type": "boolean" } }
|
|
},
|
|
"externalPostgresql": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"url": { "type": "string", "pattern": "^(postgres(ql)?://.+)?$" }
|
|
}
|
|
},
|
|
"redis": {
|
|
"type": "object",
|
|
"additionalProperties": true,
|
|
"properties": { "enabled": { "type": "boolean" } }
|
|
},
|
|
"externalRedis": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"url": { "type": "string", "pattern": "^(rediss?://.+)?$" }
|
|
}
|
|
},
|
|
"s3": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"endpoint": { "type": "string", "pattern": "^(https?://.+)?$" },
|
|
"bucket": { "type": "string", "minLength": 1 },
|
|
"region": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"description": "S3 region used for SigV4 signing by the relay and deletion operator. Defaults to us-east-1 for bundled MinIO/local deployments; set the provider region explicitly when it differs."
|
|
},
|
|
"addressingStyle": {
|
|
"type": "string",
|
|
"enum": ["path", "virtual"],
|
|
"description": "S3 URL style shared by media and Git/CAS clients. Defaults to path for bundled MinIO compatibility."
|
|
},
|
|
"accessKey": { "type": "string" },
|
|
"secretKey": { "type": "string" }
|
|
}
|
|
},
|
|
"acceptance": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"enabled": { "type": "boolean" },
|
|
"schedule": { "type": "string", "minLength": 1 },
|
|
"activeDeadlineSeconds": { "type": "integer", "minimum": 1 },
|
|
"successfulJobsHistoryLimit": { "type": "integer", "minimum": 0 },
|
|
"failedJobsHistoryLimit": { "type": "integer", "minimum": 0 },
|
|
"relayUrl": { "type": "string" },
|
|
"connectAddr": { "type": "string" },
|
|
"stageTimeoutSeconds": { "type": "integer", "minimum": 1 },
|
|
"privateKeySecret": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"name": { "type": "string" },
|
|
"key": { "type": "string", "minLength": 1 }
|
|
}
|
|
},
|
|
"privateKeyFile": { "type": "string" },
|
|
"assertionFile": { "type": "string" },
|
|
"statsdAddr": { "type": "string" },
|
|
"metricPrefix": { "type": "string", "minLength": 1 },
|
|
"tags": { "type": "array", "items": { "type": "string", "pattern": "^[a-z](_?[a-z0-9./-])*:.+$" } },
|
|
"serviceAccountName": { "type": "string" },
|
|
"podLabels": { "type": "object" },
|
|
"podAnnotations": { "type": "object" },
|
|
"extraInitContainers": { "type": "array", "items": { "type": "object" } },
|
|
"extraVolumes": { "type": "array", "items": { "type": "object" } },
|
|
"extraVolumeMounts": { "type": "array", "items": { "type": "object" } },
|
|
"resources": { "type": "object" }
|
|
}
|
|
},
|
|
"storageAccounting": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"enabled": { "type": "boolean" },
|
|
"schedule": { "type": "string", "minLength": 1 },
|
|
"maxObjects": { "type": "integer", "minimum": 1 },
|
|
"activeDeadlineSeconds": { "type": "integer", "minimum": 1 },
|
|
"successfulJobsHistoryLimit": { "type": "integer", "minimum": 0 },
|
|
"failedJobsHistoryLimit": { "type": "integer", "minimum": 0 },
|
|
"relayMode": { "type": "string", "enum": ["inline", "external", "off"] },
|
|
"serviceAccountName": { "type": "string" },
|
|
"podLabels": {
|
|
"type": "object",
|
|
"description": "Extra Pod labels. The chart owns tags.datadoghq.com/version and derives it from the deployed image identity, so a value supplied here for that one key is ignored."
|
|
},
|
|
"podAnnotations": { "type": "object" },
|
|
"resources": { "type": "object" }
|
|
}
|
|
},
|
|
"operatorJobs": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"deletionDrain": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"enabled": { "type": "boolean" },
|
|
"schedule": { "type": "string", "minLength": 1 },
|
|
"activeDeadlineSeconds": { "type": "integer", "minimum": 1, "maximum": 86400 },
|
|
"successfulJobsHistoryLimit": { "type": "integer", "minimum": 0, "maximum": 10 },
|
|
"failedJobsHistoryLimit": { "type": "integer", "minimum": 0, "maximum": 10 },
|
|
"terminationGracePeriodSeconds": { "type": "integer", "minimum": 1, "maximum": 300 },
|
|
"serviceAccountName": { "type": "string" },
|
|
"podLabels": {
|
|
"type": "object",
|
|
"additionalProperties": { "type": "string" }
|
|
},
|
|
"podAnnotations": {
|
|
"type": "object",
|
|
"additionalProperties": { "type": "string" }
|
|
},
|
|
"resources": { "type": "object" }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"minio": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"enabled": { "type": "boolean" },
|
|
"image": { "type": "string", "minLength": 1 },
|
|
"mcImage": { "type": "string", "minLength": 1 },
|
|
"persistence": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"enabled": { "type": "boolean" },
|
|
"size": { "type": "string", "pattern": "^[0-9]+(\\.[0-9]+)?(E|P|T|G|M|K|Ei|Pi|Ti|Gi|Mi|Ki)?$" }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"git": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"maxPackBytes": { "type": "integer", "minimum": 1 },
|
|
"packCachePath": { "type": "string", "minLength": 1 },
|
|
"packCacheMaxBytes": { "type": "integer", "minimum": 0 },
|
|
"packCacheMaxConcurrentPopulations": { "type": "integer", "minimum": 1 },
|
|
"packCacheVolumeSize": { "type": "string", "pattern": "^[0-9]+(\\.[0-9]+)?(E|P|T|G|M|K|Ei|Pi|Ti|Gi|Mi|Ki)?$" },
|
|
"maxReposPerPubkey": { "type": "integer", "minimum": 1 },
|
|
"maxConcurrentOps": { "type": "integer", "minimum": 1 }
|
|
}
|
|
},
|
|
"migrate": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"autoMigrate": { "type": "boolean" },
|
|
"preUpgradeJob": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"enabled": { "type": "boolean" },
|
|
"resources": { "type": "object" },
|
|
"backoffLimit": { "type": "integer", "minimum": 0 },
|
|
"activeDeadlineSeconds": { "type": "integer", "minimum": 1 }
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"serviceMonitor": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"enabled": { "type": "boolean" },
|
|
"namespace": { "type": "string" },
|
|
"interval": { "type": "string" },
|
|
"scrapeTimeout": { "type": "string" },
|
|
"labels": { "type": "object" }
|
|
}
|
|
},
|
|
"pairingRelay": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"enabled": { "type": "boolean" },
|
|
"url": {
|
|
"type": "string",
|
|
"pattern": "^(wss?://.+)?$",
|
|
"description": "Public WebSocket URL advertised to clients for NIP-AB device pairing."
|
|
},
|
|
"replicaCount": { "type": "integer", "minimum": 1 },
|
|
"service": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"type": { "type": "string", "enum": ["ClusterIP", "NodePort", "LoadBalancer"] },
|
|
"port": { "type": "integer", "minimum": 1, "maximum": 65535 },
|
|
"annotations": { "type": "object" }
|
|
}
|
|
},
|
|
"podAnnotations": { "type": "object" },
|
|
"podLabels": { "type": "object" },
|
|
"resources": { "type": "object" }
|
|
}
|
|
},
|
|
"extraManifests": {
|
|
"type": "array"
|
|
}
|
|
}
|
|
}
|