@@ -34,8 +34,12 @@ kubeseal --format=yaml --namespace=slack-relay \
|
|||||||
> apps/overlays/upc-dev/slack-relay/slack-relay-secrets-sealed.yaml
|
> apps/overlays/upc-dev/slack-relay/slack-relay-secrets-sealed.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
Then uncomment `slack-relay-secrets-sealed.yaml` in `kustomization.yaml` and
|
Then add `slack-relay-secrets-sealed.yaml` to `kustomization.yaml` and commit.
|
||||||
commit.
|
|
||||||
|
`namespace.yaml` in this directory exists for ordering: the app-of-apps applies
|
||||||
|
the SealedSecret, so the namespace has to be created by the same sync rather
|
||||||
|
than by the child Application's chart (`namespace.create: false` in the values).
|
||||||
|
Without it the parent sync fails with `namespaces "slack-relay" not found`.
|
||||||
|
|
||||||
| Key | Purpose |
|
| Key | Purpose |
|
||||||
|---|---|
|
|---|---|
|
||||||
@@ -59,13 +63,30 @@ add `SLACK_MODE=bot` to `app.extraEnv` in the values file.
|
|||||||
|
|
||||||
## 3. Verify
|
## 3. Verify
|
||||||
|
|
||||||
|
Port-forward the service, then post a signed event. No Node needed — the
|
||||||
|
signature is an HMAC that `openssl` can compute:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
kubectl -n slack-relay port-forward svc/slack-relay-app 3000:3000
|
kubectl -n slack-relay port-forward svc/slack-relay-app 3000:3000 &
|
||||||
AIGITBOT_WEBHOOK_SECRET=... node scripts/send-test-event.js http://localhost:3000
|
|
||||||
|
SECRET=$(kubectl -n slack-relay get secret slack-relay-secrets \
|
||||||
|
-o jsonpath='{.data.AIGITBOT_WEBHOOK_SECRET}' | base64 -d)
|
||||||
|
|
||||||
|
BODY='{"schemaVersion":1,"id":"smoke-1","eventType":"prworkflow.completed","timestamp":"2026-10-20T12:00:00Z","integration":{"botName":"review-bot","platform":"gitea"},"repository":{"owner":"Forte","name":"launchpad","pullRequest":42},"data":{"workflowKey":"review","status":"SUCCESS","durationMs":41230}}'
|
||||||
|
|
||||||
|
curl -i -X POST http://localhost:3000/hooks/ai-git-bot \
|
||||||
|
-H 'Content-Type: application/json' \
|
||||||
|
-H "X-EventHook-Signature-256: sha256=$(printf '%s' "$BODY" | openssl dgst -sha256 -hmac "$SECRET" -r | cut -d' ' -f1)" \
|
||||||
|
--data "$BODY"
|
||||||
```
|
```
|
||||||
|
|
||||||
(`scripts/send-test-event.js` lives in the slack-relay repo.) A real check is
|
`200 {"status":"delivered"}` means the message reached Slack. Re-running with
|
||||||
ai-git-bot's own delivery log, which shows the response code per delivery.
|
the same `id` returns `{"status":"duplicate"}` — bump the id to send another.
|
||||||
|
The same request is in `scripts/send-test-event.js` in the slack-relay repo if
|
||||||
|
Node is available.
|
||||||
|
|
||||||
|
The real check afterwards is ai-git-bot's own delivery log, which shows the
|
||||||
|
response code per delivery.
|
||||||
|
|
||||||
## Reading the logs
|
## Reading the logs
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
resources:
|
resources:
|
||||||
|
- namespace.yaml
|
||||||
- slack-relay.yaml
|
- slack-relay.yaml
|
||||||
- slack-relay-secrets-sealed.yaml
|
- slack-relay-secrets-sealed.yaml
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
---
|
||||||
|
# Owned by the app-of-apps rather than the forteapp chart (namespace.create is
|
||||||
|
# false in values) because the SealedSecret next to this file is applied by the
|
||||||
|
# same sync and needs the namespace to exist first. ArgoCD applies Namespace
|
||||||
|
# before other kinds, so one sync is enough.
|
||||||
|
# Labels mirror what the chart would have set.
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: slack-relay
|
||||||
|
annotations:
|
||||||
|
argocd.argoproj.io/sync-wave: "-1"
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: slack-relay
|
||||||
|
app.kubernetes.io/part-of: apps
|
||||||
|
app.kubernetes.io/managed-by: argocd
|
||||||
|
pod-security.kubernetes.io/enforce: baseline
|
||||||
|
pod-security.kubernetes.io/audit: restricted
|
||||||
|
pod-security.kubernetes.io/warn: restricted
|
||||||
Reference in New Issue
Block a user