I needed to check the payload my alertmanager in OpenShift was sending out to the target-system (which was not under my control and I couldn’t check what was received).

There is some documentation online. However at the time of writing, the example in the documentation was not usable out-of-the-box since there was a route (or ingress) missing. I also wanted a fully-featured webhook-tester that showed me the received payload in a nice webfrontend. The webhook-tester from tarampampam fullfills my need.

So, here is the full app, including the Deployment, a Route and the Service:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: debug-receiver
spec:
  replicas: 1
  strategy:
    type: Recreate
  selector:
    matchLabels:
      app: debug-receiver
  template:
    metadata:
      labels:
        app: debug-receiver
    spec:
      containers:
        - image: tarampampam/webhook-tester
          name: webhook-tester
---
apiVersion: v1
kind: Service
metadata:
  labels:
    app: debug-receiver
  name: debug-receiver
spec:
  ports:
    - name: alert-debug-receiver
      port: 8080
      protocol: TCP
      targetPort: 8080
  selector:
    app: debug-receiver
  sessionAffinity: None
  type: ClusterIP
---
apiVersion: route.openshift.io/v1
kind: Route
metadata:
  labels:
    app: debug-receiver
  name: debug-receiver
spec:
  port:
    targetPort: alert-debug-receiver
  tls:
    termination: edge
  to:
    kind: Service
    name: debug-receiver
    weight: 100
  wildcardPolicy: None