You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Description
This clears up issue 739 and removes the webhooks by listening for
`SIGINT` on the process and listening for `close` on the program (child
process) and upon receiving the signal removing the webhooks with a
`Promise.all`.
Test:
```bash
# in one terminal
$> npm test
$> cd pepr-test-module
$> npx pepr dev --confirm
# in another terminal
$> k get mutatingwebhookconfiguration,validatingwebhookconfiguration -oyaml # should be two
# HIT CTRL+C IN TERMINAL 1
$> k get mutatingwebhookconfiguration,validatingwebhookconfiguration -oyaml # should be 0
```
## Related Issue
Fixes#739
<!-- or -->
Relates to #
## Type of change
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [x] Other (security config, docs update, etc)
## Checklist before merging
- [x] Test, docs, adr added or updated as needed
- [x] [Contributor Guide
Steps](https://docs.pepr.dev/main/contribute/contributor-guide/#submitting-a-pull-request)
followed
---------
Signed-off-by: Case Wylie <cmwylie19@defenseunicorns.com>
Co-authored-by: Barrett <81570928+btlghrants@users.noreply.github.com>
Is your feature request related to a problem? Please describe.
It is annoying to people who are testing modules that the
Validating/MutatingWebhookConfigurations
stick around afternpx pepr dev
Describe the solution you'd like
npx pepr dev
Solution could be to warn the user or clean it up.
There could be code like this to clean up the webhooks here
Describe alternatives you've considered
(optional) A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: