Kubernetes Installation

Webhook Relay can help you receive webhooks in your internal services. To achieve that you can either use sidecar approach or a standalone deployment. Since container is stateless and only requires your access key & secret, deploying and running it is extremely easy.

First, go to https://my.webhookrelay.com/tokens and create a token key & secret pair. Then, create a Kubernetes secret:

kubectl create secret generic webhookrelay-credentials --from-literal=key=[access key] --from-literal=secret=[access secret]

Once the secret is created, you can deploy webhookrelayd container either as a sidecar or a standalone container.

Sidecar (preferred method)

Webhookrelayd agent can be easily deployed as a sidecar. This way requests can be forwarded to the service through localhost:

---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: wd
namespace: default
labels:
name: "wd"
spec:
replicas: 1
template:
metadata:
name: wd
labels:
app: wd
spec:
containers:
- image: karolisr/webhook-demo:0.0.15
imagePullPolicy: Always
name: wd
command: ["/bin/webhook-demo"]
ports:
- containerPort: 8090
livenessProbe:
httpGet:
path: /healthz
port: 8090
initialDelaySeconds: 30
timeoutSeconds: 10
securityContext:
privileged: true
# [START webhookrelay_container]
- image: webhookrelay/webhookrelayd:latest
name: webhookrelayd
env:
- name: KEY
valueFrom:
secretKeyRef:
name: webhookrelay-credentials
key: key
- name: SECRET
valueFrom:
secretKeyRef:
name: webhookrelay-credentials
key: secret
- name: BUCKET
value: webhook-demo
# [END webhookrelay_container]

Separate deployment

Webhook Relay container can also work as standalone deployment:

apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: webhookrelay
namespace: webhookrelay
labels:
app: webhookrelay
spec:
replicas: 1
selector:
matchLabels:
app: webhookrelay
release: webhookrelay
template:
metadata:
labels:
app: webhookrelay
release: webhookrelay
spec:
containers:
- name: webhookrelayd
image: webhookrelay/webhookrelayd:latest
env:
- name: KEY
valueFrom:
secretKeyRef:
name: webhookrelay-credentials
key: key
- name: SECRET
valueFrom:
secretKeyRef:
name: webhookrelay-credentials
key: secret
- name: BUCKET
value: webhook-demo

If agent is deployed as a separate deployment, the output destination should then be a service name.
Repository can be found here: https://github.com/webhookrelay/webhook-demo.

Ingress Controller

Implements a Kubernetes ingress controller using tunnels to connect a Web Relay managed URL (https://yoursubdomain.webrelay.io) to a Kubernetes service based on ingress resources. Single ingress controller can manage multiple tunnels and route to multiple namespaces.

Deployment files and issue tracker is available on GitHub:

https://github.com/webrelay/ingress

You can try out Web Relay ingress controller by creating a deployment from a hosted manifest, no clone or local install necessary.

What you do need:

Installing

To add Web Relay ingress controller to your cluster, run:

relay ingress init

Manifests are available here: https://github.com/webrelay/ingress/tree/master/deployment

This command:

If RBAC isn’t enabled on your cluster (for example, if you’re on GKE with legacy authorization or Minikube without RBAC), run:

relay ingress init --no-rbac

You can also generate tokens through the Web UI here https://my.webhookrelay.com/tokens or relay token create command on the CLI.

Uninstalling Ingress Controller

To remove it, either delete the namespace where it was deployed or use:

relay ingress reset