Run a Bastion
Read a Bastion's health, act on its alerts, renew its token without an outage, and disable or remove it.
On this page
Its state on the card
- Who
endpoints:readreads the card;endpoints:writedisables, enables, rotates and deletes- Where
- main installation, Admin area › Bastions
Each card starts folded to one line: name, host, state and actions. A folded card that warns about something names it after the state, in the warning colour, with "+1" where there are more; open the card for the line and what to do.
| Head or warning | Means | Do |
|---|---|---|
| Connected | A replica made contact within five minutes | Nothing |
| No contact yet | No replica has completed a handshake | Read the replica's log and the metrics below |
| Contact lost, "No recent contact" | No replica for five minutes, while not disabled | As for QuaderBastionMainUnreachable |
| "Different versions" | The replicas run different releases | Wait for the rollout to end |
| "Deployment without contact" | One deployment silent beside another | Look at that deployment |
| "Address not listed", "No address listed" | Its callers count as one address | List the address |
| "Ingress below the flood figures" | The edge refuses before the Bastion's figures | Raise edgeLimit.requestsPerSecond |
| "Valkey unreachable", "Valkey of the main installation" | Each replica counts alone | Restore Valkey, or give it one of its own |
| "Web interface not built" | No base URL reported, one missing from additional_base_urls, or no request without a credential admitted |
Switch it on |
| "Files through the main installation" | A connection the direct reads cannot use | What it needs |
| "Token expires soon", "Token expired" | Under 30 days left, or none | Renew the token |
Every replica serves its metrics on the ops listener, port 8081, which the chart's ServiceMonitor scrapes:
| Series | Healthy | Otherwise |
|---|---|---|
quader_bastion_main_reachable |
1 |
The handshake or the feed fails |
quader_bastion_base_url_mismatch |
0 |
The main installation does not write the Bastion's host: check server.additional_base_urls |
quader_bastion_interface_mismatch |
0 |
The two sides speak different interface versions |
quader_bastion_main_token_refused |
0 |
The main installation refuses the token |
quader_bastion_token_remaining_seconds |
positive | Seconds left of the token in use |
While the main installation is unreachable
A replica serves cached artifacts and metadata to callers whose token it has checked, for the answer period plus the grace period
(bastion.answers.period, bastion.answers.grace_period in configuration). A token it has not
seen, and anything not cached, gets 503 with Retry-After: 30. After both periods every read answers 503.
Alerts
With metrics.prometheusRule.enabled the chart renders its rules; metrics.prometheusRule.disabledAlerts leaves one out. The
thresholds come from the Bastion's gauges, not from chart values.
| Alert | Severity | Cause | Action |
|---|---|---|---|
QuaderBastionInterfaceMismatch |
critical | One side was upgraded without the other | Upgrade the other side to the same release (Upgrades) |
QuaderBastionMainUnreachable |
critical | No replica reaches the main installation for 2 minutes | Check the main installation, your egress policy, the trust bundle, and the token and base URL alerts |
QuaderBastionMainUnreachableSingleReplica |
warning | Some replicas do not reach it | That pod's network or node |
QuaderBastionGraceExhausted |
critical | Unreachable beyond both periods: every read answers 503 |
Restore the connection |
QuaderBastionBaseURLMismatch |
critical | The main installation does not write the Bastion's host | Add the base URL to server.additional_base_urls, and list the address it connects from |
QuaderBastionTokenExpiresSoon |
warning | Less than bastion.token.warn_before left |
Renew the token |
QuaderBastionTokenRefused |
critical | Revoked, expired, or its registration deleted | Issue a token and put it into the Secret |
QuaderBastionFeedStale |
warning | The revocation feed lags over 30 seconds | A revoked token reads on from the cache meanwhile: check the connection and the main installation's load |
QuaderBastionMainBudgetSaturated |
warning | The slots to the main installation are used up, clients get 503 busy |
Normal while the cache is cold; raise the slots under Details only after checking the main installation |
QuaderBastionAuditEventsDropped |
warning | The buffer of download events was full | Those downloads miss the audit trail; raise bastion.audit.buffer_events for long outages |
QuaderBastionCacheCorrupt |
warning | A cached object failed its check and was fetched again | Check the disk or bucket and who can write there |
QuaderBastionHandoverFailing |
warning | Direct reads failed for 15 minutes, none succeeded | What it needs, or switch them off |
QuaderBastionCatalogueStale |
warning | A replica's catalogue is older than bastion.gui.stale_after |
As for an unreachable main installation |
QuaderBastionCatalogueMissing |
warning | A replica holds no catalogue for 15 minutes | Its pages answer Not available right now; see Kept or lost across a restart |
QuaderBastionCatalogueOverBound |
warning | The catalogue is above bastion.gui.max_bytes |
Raise it, and bastion.cache.max_bytes with it |
QuaderBastionValkeyUnavailable |
warning | Its Valkey does not answer; silent while the next fires | Limits are per replica meanwhile; restore Valkey |
QuaderBastionValkeyRefused |
critical | Its Valkey is the main installation's | Give it a Valkey of its own, and find why the main installation's admits the Bastion |
QuaderBastionTLSCertificateExpiring |
warning | A certificate it serves or trusts ends within 14 days | Check the issuer and the mounted Secret; a renewed file loads without a restart |
QuaderBastionTLSCertificateExpired |
critical | It has ended and is still served | Renew it at once |
QuaderBastionReplicasNotReady |
warning | Fewer than 2 replicas available for 5 minutes | A drain can now cut clients off: find why pods are not ready |
QuaderBastionCallersPooled (chart quader) |
warning | A Bastion connects from an unlisted address | List the address |
The traffic between the two sides
| Series | Where | What it says |
|---|---|---|
quader_bastion_forwarded_bytes_total{bastion, class} |
Main installation | Bytes sent to the Bastion, by anonymous or authenticated client |
quader_bastion_forwarded_requests_total{bastion, class, egress} |
Main installation | Its requests by answer, and from a listed or unlisted address |
quader_bastion_fill_bytes_total{source, class} |
Bastion | Bytes of the cache's fills from main or the store |
quader_bastion_bytes_served_total{source} |
Bastion | Bytes sent to clients from the cache or the main installation |
quader_bastion_throughput_wait_seconds_total{class} |
Bastion | Seconds downloads waited for the cap: rising by one a second per download means the cap sets the pace |
quader_bastion_throughput_refused_total{class, reason} |
Bastion | Downloads refused at the cap (busy) or for a used-up hour (hour) |
quader_bastion_cache_no_room_total{area} |
Bastion | Files served without being kept: rising for long, the cache churns; raise bastion.cache.max_bytes |
sum by (class) (rate(quader_bastion_forwarded_bytes_total{bastion="partners"}[5m])) (example) is the bandwidth a Bastion takes.
Renew the token
A declared token is rotated through its Secret (Declare the Bastion in the values). A token issued on the screen is renewed with an overlap:
- Before it expires, choose Rotate token in the card's section Tokens. The new token works beside the old one.
- Put it into the Bastion's Secret (
secrets.mainToken). Every replica re-reads the file withinbastion.main.token_reload_intervalof the change, without a restart; Kubernetes takes up to a minute to update the mount. - Wait until the new token's Last used and every replica's Last contact are recent.
- Choose Invalidate on the old token.
The Bastion logs a warning daily, and QuaderBastionTokenExpiresSoon fires, once less than bastion.token.warn_before is left.
Disable or delete a Bastion
Disable… in the card's head stops the Bastion within seconds, over its connection; nothing is deleted and its token keeps working. Soft lets running downloads finish, Hard cuts them. The command line does the same:
quader admin bastion disable partners # example; soft
quader admin bastion disable partners --hard
quader admin bastion enable partners
While disabled it answers every new request 503 with Retry-After, which looks like a short outage to clients and search engines.
Its pods stay ready and its cache stays. The head says Disabling while downloads run, Disabled once every replica confirmed, or
Disable not confirmed after 15 seconds without confirmation: the Bastion then serves its cache for the grace period and applies the
disable at its next contact. A disable survives a restore to an earlier point. Enable reverses it.
If you suspect it was taken over, also Invalidate its tokens and stop its deployment: a Bastion that ignores the disable serves on what it holds.
Delete asks for the name, removes the registration and revokes its tokens; take a declared one out of the values first. Then
helm uninstall the Bastion and remove its address from server.additional_base_urls.