Read the apps check address from a Worker secret (#5)
A monitor's target can be secret:NAME: the worker reads the address from the Worker secret NAME at check time, bound in deploy.tf from the GitHub Actions secret of the same name. The address never appears in this repository, and any error text that mentions it is scrubbed before it's stored or shown. Apps in US East now checks a real app this way.
This commit is contained in:
1 parent
035d23d1e3
commit
cf977e65da
4 files changed
+50
-5
No files matched your search
+5
-4
@@ -43,14 +43,15 @@ const workerConfig: WorkerConfig = {
|
||||
headers: { 'User-Agent': 'cottage-status (+https://status.cottage.host)' },
|
||||
},
|
||||
{
|
||||
// A small app Cottage runs for itself on the region's servers (ntfy, "Status canary" on
|
||||
// Cottage's own internal account), so this checks the whole path a customer's app takes:
|
||||
// Cloudflare, the node's proxy, Harbor and a running container.
|
||||
// A real app running on the region's servers (on Cottage's own internal account), so this
|
||||
// checks the whole path a customer's app takes: Cloudflare, the node's proxy, Harbor and a
|
||||
// running container. Its address is private: the worker reads it from the Worker secret
|
||||
// APPS_US_EAST_TARGET (GitHub Actions secret of the same name, bound in deploy.tf).
|
||||
id: 'apps-us-east',
|
||||
name: 'Apps in US East',
|
||||
tooltip: 'Customer apps hosted in Virginia',
|
||||
method: 'GET',
|
||||
target: 'https://status-canary-m7ec.cottagehost.com/v1/health',
|
||||
target: 'secret:APPS_US_EAST_TARGET',
|
||||
expectedCodes: [200],
|
||||
timeout: 10000,
|
||||
headers: { 'User-Agent': 'cottage-status (+https://status.cottage.host)' },
|
||||
|
||||
Reference in new issue
Block a user