Ceph Pool Replication Compliance Gate
List Ceph pools, alert Slack on any replicated pool below a minimum replica size, and optionally raise it back up.
A Kestra blueprint that watches Kubernetes TLS secrets, detects certificates expiring soon, and alerts on Slack without spamming.
list_secrets (io.kestra.plugin.scripts.shell.Commands) runs kubectl get secrets in the target namespace and saves the full secret list as JSON. It authenticates with a client certificate and key passed as Kestra secrets, the same pattern the Kubernetes gallery blueprints use.find_trouble (io.kestra.plugin.scripts.python.Script) reads the remembered state from the KV store, then checks every secret of type kubernetes.io/tls. Each certificate is decoded and passed to openssl, which reports its expiry date. Anything expiring within the expiry_days input counts as troubled. Anything already alerted on is dropped.maybe_alert (io.kestra.plugin.core.flow.If) runs only when there is something new to report, and send_alert posts the expiring certificates to Slack with the days left and a kubectl command to inspect each one.save_state (io.kestra.plugin.core.kv.Set) writes back the new list of troubled secret names as one JSON value. Renewed certificates drop out on their own, so a future expiry alerts again.Anyone running TLS-terminated workloads on Kubernetes who has been bitten by an expired certificate at 2am. Works on any cluster you can reach with a client certificate: minikube, kind, managed clusters, and cert-manager managed secrets.
A shell script on a cron server can check expiry dates, but then you need somewhere to keep the "already alerted" state, somewhere to hold the secrets, and a place to see the run history when an alert looks wrong. Kestra gives you all three: the KV store is the memory, secrets stay out of the YAML, and every run keeps its logs and outputs where you can inspect them.
| Secret | What it is |
|---|---|
CLIENT_CRT |
base64-encoded client certificate for the cluster |
CLIENT_KEY |
base64-encoded client key for the cluster |
MASTERURL |
base64-encoded Kubernetes API server URL, reachable from inside the Kestra container |
SLACK_WEBHOOK |
base64-encoded Slack Incoming Webhook URL |
In Kestra OSS, secrets come from environment variables prefixed with SECRET_ and must be base64-encoded.
SECRET_ environment variables.namespace you want to watch.cron trigger.namespace input.| Input | Type | Default | What it does |
|---|---|---|---|
namespace |
STRING | default |
the namespace whose TLS secrets to watch |
expiry_days |
INT | 14 |
a certificate expiring within this many days counts as troubled |
slack_webhook |
STRING | (required) | Incoming webhook URL of the Slack channel for the alerts |
kubernetes.io/tls are checked. Certificates stored as opaque secrets or outside Kubernetes are invisible to this flow.tls.crt field only. If a secret has a full chain, the leaf certificate's date is what counts.MASTERURL is reachable from inside the Kestra container. localhost inside the container is not your host: use host.docker.internal when Kestra runs in Docker on the same machine as the cluster.