ConfigJanitor - Kubernetes unused ConfigMap and Secret cleaner
Deletes ConfigMaps and Secrets no pod references and reports the cleanup on Slack.
Audit Pgpool-II PostgreSQL backend node health and replication delay on a schedule with Kestra. Detect down nodes, loss of primary, and alert Slack.
PostgreSQL high-availability architectures relying on Pgpool-II for connection pooling and read/write splitting can degrade silently when backend nodes disconnect, fail over improperly, or develop severe replication lag. This blueprint connects directly to Pgpool-II on a schedule, queries real-time node operational telemetry via the native SHOW POOL_NODES administrative command, verifies that exactly one primary node is active, evaluates standby replication delay against SLA thresholds, and alerts Slack on degraded or failed cluster conditions.
probe_pool_nodes (io.kestra.plugin.jdbc.postgresql.Query) connects to Pgpool-II on port 9999 using PostgreSQL JDBC credentials and executes SHOW POOL_NODES;. It captures the full table of registered backend PostgreSQL nodes, including their role, status, and byte replication delay. allowFailure: true ensures that proxy connection timeouts or unreachable errors are caught and forwarded to classification rather than crashing the flow prematurely.classify_pool_status (io.kestra.plugin.core.debug.Return) evaluates the query result set using Pebble and jq filters. If the proxy was unreachable, it outputs UNREACHABLE. If any backend node is not in the up state, or if the number of active primaries is not exactly one, it assigns CRITICAL. If all nodes are up but any standby exceeds max_replication_delay_bytes, it assigns DEGRADED. When all nodes are nominal and synchronized, it outputs HEALTHY.route_by_pool_status (io.kestra.plugin.core.flow.Switch) branches on the evaluated status string: HEALTHY writes a confirmation log, DEGRADED sends a Slack notification with the specific lagging node IDs and delay metrics, CRITICAL dispatches an urgent Slack alert highlighting offline nodes or primary election issues, and UNREACHABLE alerts the team that the Pgpool-II proxy itself cannot be contacted.log_audit_status (io.kestra.plugin.core.log.Log) writes a persistent telemetry summary line on every execution regardless of the branch taken, ensuring complete audit traceability across executions.errors block intercepts unhandled runtime exceptions and alerts Slack so monitoring never fails silently.pgpool_audit_schedule trigger runs every 15 minutes, provided with disabled: true for safe onboarding.Monitoring database proxies using disparate bash scripts or ad-hoc cron jobs frequently leads to silent monitoring failures, lack of execution history, and unmanaged database credentials. Kestra provides a declarative, version-controlled blueprint with encrypted secret injection, built-in retry capabilities, visual execution tracking, and seamless branching into automated remediation workflows (such as invoking PCP administrative commands to re-attach recovered nodes).
bitnami/pgpool:latest or pgpool/pgpool:latest).SHOW POOL_NODES).PGPOOL_USERNAME: Database username used to connect to the Pgpool-II proxy (required).PGPOOL_PASSWORD: Database password for the connecting user (required).SLACK_WEBHOOK_URL: Slack Incoming Webhook URL used for degraded, critical, unreachable, and flow failure notifications (required).SECRET_PGPOOL_USERNAME, SECRET_PGPOOL_PASSWORD, and SECRET_SLACK_WEBHOOK_URL.PGPOOL_USERNAME, PGPOOL_PASSWORD, and SLACK_WEBHOOK_URL secrets in your Kestra namespace.pgpool_host and pgpool_port to point to your Pgpool-II proxy instance.status outputs HEALTHY.pgpool_audit_schedule to turn on automated recurring 15-minute sentinels.CRITICAL branch, integrate a task invoking pcp_attach_node via CLI or REST to automatically attempt node re-attachment after transient network interruptions.CRITICAL branch for high-priority on-call paging.