Skip to content

Commit e4623ac

Browse files
Merge pull request #361 from MateSaary/localinterceptor
Add local interceptor documentation
2 parents a6b471f + cf7ed01 commit e4623ac

File tree

1 file changed

+21
-4
lines changed

1 file changed

+21
-4
lines changed

interceptor/README.md

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,32 @@
1-
# CAD Tekton Interceptor
1+
# CAD Tekton Interceptor
22

3-
The tekton interceptor is a component plugged between the event listener and the task runs. The interceptor makes sure we don't start a pipeline for every alert we receive. Instead, alerts are filtered based on whether or not they are handled by CAD. Unhandled alerts are directly escalated and no pipeline is started.
3+
The tekton interceptor is a component plugged between the event listener and the task runs. The interceptor makes sure we don't start a pipeline for every alert we receive. Instead, alerts are filtered based on whether or not they are handled by CAD. Unhandled alerts are directly escalated and no pipeline is started.
44

55
## Testing
66

77
### E2E
88

99
The interceptor has E2E tests starting the HTTP service and checking the HTTP responses. The tests are based on pre-existing PagerDuty alerts.
10-
```
10+
11+
``` bash
12+
1113
make e2e-interceptor
1214

1315
# To also print the output of the interceptor service:
1416
CAD_E2E_VERBOSE=true make test-interceptor
15-
```
17+
```
18+
19+
## Development
20+
21+
It is possible to run the interceptor locally in a "minimal" state, where E2E is not used, and only the
22+
crucial-to-run env variables (seen below) are set as placeholders. This is useful for *local* development/debugging.
23+
24+
``` bash
25+
$ make build-interceptor
26+
27+
$ CAD_SILENT_POLICY=test
28+
$ CAD_PD_TOKEN=test
29+
$ PD_SIGNATURE=test
30+
31+
$ ./bin/interceptor
32+
```

0 commit comments

Comments
 (0)