Commit 44613ee
authored
feat: move external cronjob to run timely cleanup to goroutine+configable for internval of cleanup (#934)
<!--- Provide a general summary of your changes in the Title above -->
## Description
<!--- Describe your changes in detail -->
- save resource, no spin up job every 15mins
- less image to pull down for disconnect
- should cleanup endpoint later if needed
- less security concern as one less networkpolicy and patch
- make internval configable:
- either pass as flag `--cleanup-internval `to main or env variable
`CLEANUP_INTERNVAL_MINUTES` in
deployment for customized value
- if not set any or set to '0', use default 15mins
- if set to a negative value, skip cleanup goroutine totally
## How Has This Been Tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran
to -->
<!--- see how your change affects other areas of the code, etc. -->
## Merge criteria:
<!--- This PR will be merged by any repository approver when it meets
all the points in the checklist -->
<!--- Go over all the following points, and put an `x` in all the boxes
that apply. -->
- [ ] The commits are squashed in a cohesive manner and have meaningful
messages.
- [ ] Testing instructions have been added in the PR body (for PRs
involving changes that are not immediately obvious).
- [ ] The developer has manually tested the changes and verified that
the changes work
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Refactor**
* API key cleanup moved from external scheduled jobs into a built-in
background task within the service.
* Removed external cleanup scheduling and related network restrictions;
deployment wiring simplified and related image/parameter removed.
* Added internal TODOs and small runtime shutdown sequencing
improvements.
* **Chores**
* Cleaned up deployment overlays, patches, and params to remove
now-unused cleanup artifacts.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Signed-off-by: Wen Zhou <wenzhou@redhat.com>1 parent a7f20f0 commit 44613ee
16 files changed
Lines changed: 106 additions & 144 deletions
File tree
- .github/hack
- deployment
- base
- maas-api
- core
- overlays/tls
- maas-controller/manager
- overlays/odh
- maas-api
- cmd
- internal
- api_keys
- config
- constant
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
104 | | - | |
| 103 | + | |
105 | 104 | | |
106 | 105 | | |
107 | 106 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
9 | 7 | | |
10 | 8 | | |
11 | 9 | | |
| |||
This file was deleted.
Lines changed: 0 additions & 17 deletions
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
13 | 11 | | |
14 | 12 | | |
15 | 13 | | |
| |||
Lines changed: 0 additions & 29 deletions
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | 60 | | |
67 | 61 | | |
68 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
| |||
0 commit comments