Kubernetes cert-manager Certificate Renewal Failure and Expiration Sentinel
Audits cert-manager for failed TLS/SSL certificate issuance and renewal cycles to prevent production HTTPS outages.
Detect Vertica projections that are not up to date, refresh them behind an approval gate then re-read the catalog to prove the refresh landed.
Create or alter a projection on a Vertica table that already holds rows and the new projection arrives empty. The catalog marks it is_up_to_date = false and Vertica will not let the optimizer use it until someone refreshes it from the anchor table. Nothing breaks. Queries keep returning correct answers off the older projection, just slower. The physical design you just deployed buys nothing. The only signal is a WARNING 4468 at create time, which is long gone by the time anyone wonders why the new sort order made no difference.
This guard reads v_catalog.projections, keeps every row where is_up_to_date is false, joins v_catalog.tables for the anchor schema and v_monitor.projection_storage for the number of rows the refresh has to rebuild, then alerts Slack. When you let it, it asks a human first, then runs SELECT REFRESH() once per anchor table rather than once per projection, because REFRESH takes a table and refreshes every stale projection on it. It then reads is_up_to_date again for exactly the projections it targeted and fails the run if any of them is still false.
This blueprint was created by zkasuran.
| Finding | Meaning |
|---|---|
| Projection not up to date | A projection exists in the catalog but holds no data for part or all of its anchor table. The optimizer skips it, so the sort order, encoding or segmentation it was created for is not being used. Until it is refreshed the work spent designing and deploying it is wasted. |
REFRESH rebuilds a projection by reading the whole anchor table, so the cost scales with the table. That is why the report carries the anchor row count and why the refresh sits behind a Pause. The guard stays read-only until auto_remediate is true and dry_run is false. Even then it waits for a human to resume the approval gate. An unanswered pause reads as a refusal. The refresh loop runs one anchor table at a time so two rebuilds do not compete for the same resource pool. The re-verify is scoped to the projections the run reported, so a projection created stale somewhere else while the run was in flight does not fail it.
The re-verify is not a formality. REFRESH is a meta-function that reports its outcome in the result row instead of raising, so a refresh the database refused still looks like a successful query to the driver. Reading is_up_to_date again is the only way to tell the two apart.
audit (io.kestra.plugin.jdbc.vertica.Query, read-only) reads v_catalog.projections for is_up_to_date = false, joins v_catalog.tables on anchor_table_id for the anchor schema and v_monitor.projection_storage for the anchor row count, filters by anchor_schema_filter and builds a SELECT REFRESH(...) statement per anchor table.targets groups the findings by anchor table, keeps the quoted projection keys for the re-verify and totals the rows the refresh has to rebuild. summary logs the stale projections with their anchor row counts and how each one was created.route (io.kestra.plugin.core.flow.If) branches on whether anything was found.alert posts to Slack. remediate_gate runs only when auto_remediate is true and dry_run is false.approval_gate (io.kestra.plugin.core.flow.Pause) holds the run until a human resumes it with approved: true. apply reads that answer and treats anything else as a refusal.remediate (io.kestra.plugin.core.flow.Loop, concurrencyLimit: 1) runs one SELECT REFRESH() per anchor table.reverify and verify_result read is_up_to_date again for the targeted projections and fail the run through io.kestra.plugin.core.execution.Fail if any is still false.errors posts a Slack alert when any task fails.CREATE PROJECTION or Database Designer.Vertica never refreshes a projection on its own. It also never fails a query because of a stale one, so there is no alert to react to and nothing in a dashboard goes red. The check is a catalog read nobody remembers to run. The fix is expensive enough that it should not run unattended. Kestra puts the read on a schedule, reports the cost before the write, holds the write behind an approval, serialises the refreshes then proves the result by reading the catalog again, with the whole history kept per run.
On Kestra 2.0.5 OSS against Vertica Community Edition 9.2 (database docker, schema analytics), with the shared HTTP sink standing in for Slack. analytics.orders was loaded with 50000 rows by COPY, then CREATE PROJECTION analytics.orders_by_cust on the populated table landed is_up_to_date = false. A second table analytics.customers carried a projection created while it was empty and then populated, which stays up to date and was never touched, so the detector had something to be wrong about. is_up_to_date was read directly in vsql before and after every run.
| Run | Inputs | Result |
|---|---|---|
| 1 | clean database, every projection refreshed | SUCCESS (5eI5EjHfmOqv17PBUfso1J). audit returned 0 rows. Clean path logged |
| 2 | degraded, dry_run true | SUCCESS (2IhNSswkaDG3Ll4XRs9qmY). 1 projection reported (analytics.orders_by_cust, 50000 anchor rows, created by CREATE PROJECTION). Slack alert sent. is_up_to_date stayed f |
| 3 | auto_remediate true, dry_run true | SUCCESS (7DXSdw7jBe3si9XCeB6WCp). Same report. dry_run held the gate closed, so the run never paused and is_up_to_date stayed f |
| 4 | auto_remediate true, dry_run false, resumed with approved false | SUCCESS (7C1GT7wDyTmZ1VzPonknqm). Paused at approval_gate, the refusal was recorded by declined and is_up_to_date stayed f |
| 5 | auto_remediate true, dry_run false, resumed with approved true | SUCCESS (7cacKOIoBn80h8iYjIYSXO). One REFRESH on analytics.orders. The re-verify came back empty. is_up_to_date went f to t and the projection went from 0 to 50000 rows, both read back in vsql |
| 6 | degraded again, dry_run true, after run 5 | SUCCESS (2VqlYRb9Mu1qUJi1Lt9vTC). 0 projections reported where run 2 reported 1 |
| 7 | stale again, connected as a user holding only SELECT on the anchor table | FAILED (5ht3AtBFNGM4K9vckAUCXV). REFRESH returned [failed: insufficient permissions on table "analytics.orders"] as a result row, so the task itself succeeded. The re-verify still found the projection stale, verify_result failed the run and the errors block alerted Slack |
| 8 | unreachable database | FAILED (6vNAIhaCwNTs7n1Aazzq10). audit could not connect, so the errors block posted the failure alert |
| 9 | degraded, dry_run true, final file | SUCCESS (5ez5zAuzE0AAerfAcVzsZd). Validate clean, 1 projection reported at 50000 anchor rows |
| 10 | same as run 7, final file | FAILED (PHAJc1peGjFIr7sBlWm4E). The refresh was refused again, the re-verify caught it and the run failed |
Run 2 against run 6 is the proof the detector can fail: the same query reported one stale projection at 50000 anchor rows and then zero after the refresh. analytics.customers_by_region held 500 rows, stayed up to date throughout and was never reported, so the detector is precise and not just counting projections. Run 7 is the proof the verify gate earns its place: the refresh task reported success while the catalog still said the projection was stale. Only the second read caught it.
jdbc_url.v_catalog.projections, v_catalog.tables and v_monitor.projection_storage. For the refresh, a user that owns the anchor tables or is a superuser.docker run -d --name vertica jbfavre/vertica:latest brings up a single node with database docker and user dbadmin.VERTICA_PASSWORD: password for the Vertica user. The password input defaults to it.SLACK_WEBHOOK_URL: used by alert and the errors block.SECRET_.| Input | Default | Purpose |
|---|---|---|
jdbc_url |
jdbc:vertica://vertica:5433/VMart |
Vertica cluster to check |
username |
dbadmin |
Vertica user |
password |
{{ secret('VERTICA_PASSWORD') }} |
Password for that user |
anchor_schema_filter |
% |
LIKE pattern on the anchor table schema |
auto_remediate |
false |
Allow the refresh to be proposed |
dry_run |
true |
Must be false before the approval gate is reached |
VERTICA_PASSWORD and SLACK_WEBHOOK_URL secrets.jdbc_url and username.auto_remediate: true and dry_run: false, then resume the paused execution with approved: true.daily trigger, which always runs in safe mode.anchor_schema_filter to one schema per run so a nightly sweep never queues a refresh of your largest fact table.REFRESH for START_REFRESH, which returns straight away and refreshes in the background, when the run should not hold a slot open.has_statistics alongside is_up_to_date and run ANALYZE_STATISTICS on the refreshed tables in the same pass.