Dagweave catalog

Trigger a PagerDuty alert

pagerduty-triggerv1.0.0updated 2026-07-161 version

Trigger a PagerDuty incident via the Events API v2, with the integration routing key read from a Kubernetes Secret.

Install v1.0.0

Installs the template into your Argo namespace. The URL is pinned to this version.

kubectl apply -n argo -f https://catalog.dagweave.com/api/v1/items/pagerduty-trigger/1.0.0/template.yaml

Or with the Argo CLI:

argo template create -n argo https://catalog.dagweave.com/api/v1/items/pagerduty-trigger/1.0.0/template.yaml

Facts

Category
Notifications
Tags
notifications python
Entrypoint
trigger
Template SHA-256
56a9babd471655a51adba37e8cb58c0afb2db548863063583542239c9e81f2c4
Source
pagerduty-trigger at catalog commit 67458f7
API
item document, latest template.yaml

Images and provenance

Every image is pinned by digest, so a rebuilt tag can never change what this version runs.

RepositoryTagDigest
pythonnone recordedsha256:20a82dbc2783112ddb91d1534603f802d222a3e63e593cd002eb2ac534e70211

Parameters

NameDescriptionDefault
source required The affected system, component or service the alert originates from.
Example checkout-api
none
summary required Human-readable summary of the alert (the incident title). none
routing-key-secret-key Key within the Secret that holds the routing key. routing-key
routing-key-secret-name Name of the Kubernetes Secret in the run namespace holding the Events API v2 integration routing key. pagerduty-routing-key
severity Perceived severity of the alert.
One of critical, error, warning, info
critical

WorkflowTemplate

Download template.yaml

apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
  name: pagerduty-trigger
  labels:
    dagweave.io/catalog-item: pagerduty-trigger
  annotations:
    # The catalog semver this manifest was authored at. The dagweave app records
    # (catalog-item-id, semver) -> content-hash -> base-vN when it mints the tenant
    # cluster name via ResolveOrMint. Keep in sync with metadata.yaml `version`.
    dagweave.io/catalog-version: "1.0.0"
    dagweave.io/catalog-category: "Notifications"
spec:
  entrypoint: trigger
  templates:
    - name: trigger
      inputs:
        parameters:
          # Human-readable summary of the alert (the incident title).
          - name: summary
          # Perceived severity: one of critical, error, warning, info.
          - name: severity
            default: critical
          # The affected system, component or service the alert originates from.
          - name: source
          # Name/key of the Kubernetes Secret in the run namespace holding the
          # Events API v2 integration routing key. Defaults let a user leave them
          # blank in the Inspector.
          - name: routing-key-secret-name
            default: pagerduty-routing-key
          - name: routing-key-secret-key
            default: routing-key
      container:
        # Pinned by digest per the catalog convention: an image rebuild can never
        # silently change the behaviour of an already-released item version.
        # python:3.15-alpine — the Events API v2 expects a JSON body, so the payload
        # is built with json.dumps (which correctly escapes any quotes, newlines or
        # control characters) rather than shell string assembly. urllib performs the
        # POST, so no extra image is needed.
        image: python@sha256:20a82dbc2783112ddb91d1534603f802d222a3e63e593cd002eb2ac534e70211
        command: [python3, -c]
        # Values arrive as env vars (below), never interpolated into the program
        # source, so a summary/source with any content is safe.
        args:
          - |
            import json, os, urllib.request
            body = {
                "routing_key": os.environ["ROUTING_KEY"],
                "event_action": "trigger",
                "payload": {
                    "summary": os.environ["SUMMARY"],
                    "severity": os.environ["SEVERITY"],
                    "source": os.environ["SOURCE"],
                },
            }
            req = urllib.request.Request(
                "https://events.pagerduty.com/v2/enqueue",
                data=json.dumps(body).encode("utf-8"),
                headers={"Content-Type": "application/json"},
                method="POST",
            )
            with urllib.request.urlopen(req) as resp:
                print(resp.read().decode("utf-8"))
        env:
          - name: SUMMARY
            value: "{{inputs.parameters.summary}}"
          - name: SEVERITY
            value: "{{inputs.parameters.severity}}"
          - name: SOURCE
            value: "{{inputs.parameters.source}}"
          - name: ROUTING_KEY
            valueFrom:
              secretKeyRef:
                name: "{{inputs.parameters.routing-key-secret-name}}"
                key: "{{inputs.parameters.routing-key-secret-key}}"

Version history

Read from the item's changelog. Each version has its own JSON document; the pinned catalogue vendors the manifest of the latest one, so that is the version that installs.

  1. 1.0.0 latest 2026-07-16

    Initial release.

    kubectl apply -n argo -f https://catalog.dagweave.com/api/v1/items/pagerduty-trigger/1.0.0/template.yaml
    argo template create -n argo https://catalog.dagweave.com/api/v1/items/pagerduty-trigger/1.0.0/template.yaml

    version document, template.yaml

Run it once

After installing, from the command line.

argo submit -n argo --from workflowtemplate/pagerduty-trigger \
  -p source=checkout-api \
  -p summary=...

Workflow that references it

A Workflow with the required parameters filled from the examples.

apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  generateName: pagerduty-trigger-
spec:
  workflowTemplateRef:
    name: pagerduty-trigger
  arguments:
    parameters:
      - name: source
        value: "checkout-api"
      - name: summary
        value: "..."

As a step of a larger workflow

steps:
  - - name: pagerduty-trigger
      templateRef:
        name: pagerduty-trigger
        template: trigger