-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #139 from flanksource/config-retention
feat: add config retention rules
- Loading branch information
Showing
10 changed files
with
159 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Retention | ||
|
||
After scraping we can choose to retain results on the basis of name, age, count and more. | ||
|
||
The retention rules are applied for each unique catalog item. If `changes` is specified with type `X` and count `20`, last 20 changes of `X` type would be kept for each catalog item | ||
|
||
| Field | Description | Scheme | Required | | ||
| --------- | ----------------------------------- | ----------------------------------------- | -------- | | ||
| `changes` | Specify retention rules for changes | [`[]RetentionChanges`](#retentionchanges) | `false` | | ||
|
||
## RetentionChanges | ||
|
||
```yaml | ||
retention: | ||
changes: | ||
- name: CreateRole | ||
age: 30d # Any change older than 30 days is removed | ||
count: 50 # Only 50 last changes will be retained | ||
|
||
- name: PullSuceeded | ||
age: 7d # Only keep one week of PullSuceeded changes | ||
|
||
- name: ProvisioningFailed | ||
count: 5 # Only 5 latest events are kept | ||
|
||
``` | ||
|
||
| Field | Description | Scheme | Required | | ||
| ------- | ------------------------------------------------------- | -------- | -------- | | ||
| `name` | Name of the change type | `string` | `true` | | ||
| `age` | Maximum age of the change type to retain (`12h`, `30d`) | `string` | `false` | | ||
| `count` | Maximum count to retain the change type | `bool` | `false` | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.