kaiman-webhooks-proxy

by lebe-dev

Helm chartv1.2.0App 1.3.0Verified publisher

A Helm chart for Kaiman Webhooks Proxy

About this chart

Kaiman Webhooks Proxy Helm Chart

Helm chart for Kaiman Webhooks Proxy — a lightweight webhook forwarding service written in Rust.

Installing the Chart

helm repo add tinyops https://tinyops.ru/helm-charts/
helm repo update

helm upgrade --install --create-namespace -n kaiman-webhooks-proxy \
  kaiman-webhooks-proxy tinyops/kaiman-webhooks-proxy --version 1.2.0 -f values.yaml

For token mode, supply a non-blank UI_ACCESS_TOKEN through secrets.envs.UI_ACCESS_TOKEN or secrets.existingSecret.

Configuration

The Deployment defaults to strategy.type: Recreate so existing pods stop before replacements open the SQLite database. Expect a brief interruption during an update. Set strategy.type: RollingUpdate and optionally strategy.rollingUpdate to override the strategy.

Environment Variables (.envs)

Values under envs are injected via a ConfigMap. Keys are exact environment variable names.

ParameterDescriptionDefault
envs.BIND_ADDRESSAddress and port the server listens on0.0.0.0:8080
envs.LOG_LEVELLog verbosity (debug, info, warn, error)info
envs.LOG_TARGETLog output target (stdout or a file path)stdout
envs.DATA_PATHDirectory for the SQLite database file/app/data
envs.DATABASE_URLSQLite connection stringsqlite:///app/data/kwp.db?mode=rwc
envs.CONFIG_FILEPath to the channels config file inside the container/app/config.yml
envs.IGNORED_HEADERSComma-separated list of headers to strip when receiving/forwarding webhookshost,content-length,transfer-encoding,connection,content-type
envs.DEFAULT_BODY_LIMITMax request body size in bytes. Omit to use the app default (262144 = 256 KB)(unset)
envs.METRICS_ENABLEDEnable Prometheus metricsfalse
envs.UI_ENABLEDEnable the embedded web UItrue
envs.API_ENABLEDEnable the REST APItrue
envs.AUTH_TYPEAuthentication mode for the Web UI and its API (token or oauth)token
envs.TRUSTED_PROXIESComma-separated list of trusted reverse proxy IPs/CIDRs. When set, X-Forwarded-For/X-Real-IP headers are used for client IP resolution. Leave unset to always use the direct connection IP (safe default)(unset)
envs.SENTRY_ENVIRONMENTEnvironment tag on Sentry events. Only used when secrets.envs.SENTRY_DSN is set(unset)

OAuth with GitLab

Register a confidential OAuth application with the openid scope and the exact redirect URL shown in OAUTH_REDIRECT_URL. Create the Secret kwp-oauth in the release namespace with a key named OAUTH_CLIENT_SECRET. You can also set secrets.envs.OAUTH_CLIENT_SECRET to use the chart-managed Secret.

envs:
  AUTH_TYPE: "oauth"
  OAUTH_PROVIDER_NAME: "GitLab"
  OAUTH_CLIENT_ID: "your-application-id"
  OAUTH_AUTHORIZE_URL: "https://gitlab.example.com/oauth/authorize"
  OAUTH_TOKEN_URL: "https://gitlab.example.com/oauth/token"
  OAUTH_USERINFO_URL: "https://gitlab.example.com/oauth/userinfo"
  OAUTH_REDIRECT_URL: "https://webhooks.example.com/api/auth/oauth/callback"
  OAUTH_SCOPES: "openid"
  OAUTH_ALLOWED_USERNAMES: "alice,bob"
  OAUTH_ALLOWED_GROUPS: "platform,engineering/on-call"

secrets:
  existingSecret: kwp-oauth

ingressFrontend:
  enabled: true
  hosts:
    - host: webhooks.example.com
  tls:
    - secretName: webhooks-tls
      hosts:
        - webhooks.example.com

Keep UI_ENABLED and API_ENABLED enabled. The frontend Ingress serves the UI and callback on the same HTTPS origin. The default single replica keeps login attempts and sessions on the same pod. See the full OAuth configuration reference for provider options.

Channels Config (.config)

config is raw YAML mounted at /app/config.yml. The default configSource: secret stores it in a Kubernetes Secret. Set configSource: configMap when the YAML contains only public settings and references to secret environment variables. See the configuration reference for the reference syntax.

The following values use an existing Secret in the release namespace. If you sync values from Vault, configure the sync to populate kwp-vault with the keys TELEGRAM_WEBHOOK_API_READ_TOKEN and TELEGRAM_WEBHOOK_SECRET.

configSource: configMap
config: |
  channels:
    - name: telegram
      api-read-token: TELEGRAM_WEBHOOK_API_READ_TOKEN
      webhook-secret: '${TELEGRAM_WEBHOOK_SECRET}'
      secret-header: "X-Telegram-Bot-Api-Secret-Token"
secrets:
  existingSecret: kwp-vault

kwp resolves references at startup and exits with an error if a required variable is missing. A Helm upgrade rolls out new pods when the chart-managed configuration or environment changes. After rotating values in the existing Secret, restart the Deployment to load the new environment.

Secrets (.secrets)

Use secrets.envs for values in the chart-managed Secret or secrets.existingSecret for values supplied by another controller. If a key appears in multiple sources, the existing Secret takes precedence, followed by secrets.envs and then envs.

ParameterDescriptionDefault
secrets.annotationsAnnotations applied to the chart-managed Secret{}
secrets.envsMap of secret env vars injected into the container via envFrom.secretRef. Keys are exact env var names{}
secrets.existingSecretName of an existing Secret in the release namespace whose keys become environment variables""
secrets.envs.UI_ACCESS_TOKENBearer token required at startup in token mode(unset)
secrets.envs.OAUTH_CLIENT_SECRETClient secret required in OAuth mode. It can also come from secrets.existingSecret(unset)
secrets.envs.SENTRY_DSNSentry project DSN. Leave unset to disable error reporting. See MONITORING.md(unset)

Persistence (.persistence)

SQLite data is stored under DATA_PATH. A PersistentVolumeClaim is created automatically.

ParameterDescriptionDefault
persistence.enabledCreate a PVC for the data directorytrue
persistence.sizePVC storage request100Mi
persistence.storageClassNameStorageClass name. Leave empty for the cluster default""
persistence.accessModePVC access modeReadWriteOnce

Note: ReadWriteOnce does not support replicaCount > 1 with most storage classes.

Resources (.resources)

Sized for the actual workload: one Rust binary forwarding webhooks through SQLite.

ParameterDescriptionDefault
resources.requests.cpuCPU reserved by the scheduler50m
resources.requests.memoryMemory reserved by the scheduler64Mi
resources.requests.ephemeral-storageLocal storage reserved by the scheduler128Mi
resources.limits.memoryMemory ceiling; the container is OOM-killed above it128Mi
resources.limits.ephemeral-storageLocal storage ceiling; the pod is evicted above it512Mi

There is deliberately no CPU limit: a forwarding burst should be allowed to use idle CPU rather than be throttled. Raise limits.ephemeral-storage if LOG_TARGET points at a file instead of stdout.

Service account (.serviceAccount)

ParameterDescriptionDefault
serviceAccount.createCreate a ServiceAccount for the releasetrue
serviceAccount.automountMount the ServiceAccount token into the podfalse
serviceAccount.annotationsAnnotations applied to the ServiceAccount{}
serviceAccount.nameUse an existing ServiceAccount instead of a generated name""

KWP never talks to the Kubernetes API, so the token is not mounted by default — it would only be a credential an attacker could reuse. Set serviceAccount.automount: true if a sidecar in the pod needs it.

Deploy kaiman-webhooks-proxy with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has kaiman-webhooks-proxy on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartkaiman-webhooks-proxy is pinned at v1.2.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply