New to Kestra?
Use blueprints to kickstart your first workflows.
Enforce retention on Pinecone with Kestra. Clear a stale namespace with deleteAll, verify remaining vectors with a stats readback, and confirm in Discord.
Experiment vectors outlive experiments. Namespaces used for A/B tests, one-off demos, or model comparisons keep serving nearest-neighbor results long after anyone remembers loading them, polluting retrieval and inflating storage. This blueprint enforces a retention policy in one call: io.kestra.plugin.pinecone.DeleteVectors with deleteAll: true clears the namespace passed as input, io.kestra.plugin.pinecone.DescribeIndexStats verifies what remains, and Discord gets a confirmation with the remaining vector count. Be deliberate with the input: the purge is irreversible, and Pinecone offers no undelete.
purge_namespace (io.kestra.plugin.pinecone.DeleteVectors) targets the namespace named by the stale_namespace input with deleteAll: true, removing every vector in it permanently.readback_stats (io.kestra.plugin.pinecone.DescribeIndexStats) reads the index after the purge and returns totalVectorCount, so the confirmation reports what actually remains rather than assuming success.notify posts the cleared namespace and the remaining vector count to Discord as plain scalars.errors block posts a distinct Discord alert when the purge fails, since a silently failed retention job is a compliance problem waiting to be found.Schedule trigger runs the purge every Monday at 04:00.Retention enforced by a script someone runs occasionally is retention that does not happen. Kestra gives the purge a schedule, an input that makes the target explicit at execution time, a readback that proves the result, and a permanent execution record. When an auditor asks when the experiments namespace was last cleared, the answer is an execution id, not a shrug.
PINECONE_API_KEY: Pinecone API key with delete permission on the index.DISCORD_WEBHOOK_URL: Discord incoming webhook URL.PINECONE_API_KEY and DISCORD_WEBHOOK_URL secrets to your Kestra namespace.disabled: false on the weekly trigger once the target namespace is settled.totalVectorCount by adding a stats task ahead of the purge and including both scalars in the confirmation.