Skip to content

Commit fbf2bd7

Browse files
adityathebemoshloop
authored andcommitted
doc(config-db): custom annotations
1 parent ba8ffe8 commit fbf2bd7

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

mission-control/docs/config-db/scrapers/kubernetes.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ The `kubernetes` scraper collects all of the resources and events in a Kubernete
6464
You can create relationships between kubernetes objects on the basis of
6565

6666
:::info
67-
[Relationships](../concepts/relationships) can also be defined under `transform.relationships`, however by defining them under `kubernetes.relationships` is simpler with specific support for `kind`, `name` and `namespace` fields.
67+
[Relationships](../concepts/relationships) can also be defined under `transform.relationships`, however defining them under `kubernetes.relationships` is simpler with specific support for `kind`, `name` and `namespace` fields.
6868
:::
6969

7070
```yaml title="kubernetes-relationship.yaml"
@@ -111,3 +111,24 @@ There are 3 different ways to specify which value to use when finding related co
111111
| `expr` | Use an expression to get the value | `string` | |
112112
| `value` | Specify a static value | `string` | |
113113
| `label` | Get the value from a label | `string` | |
114+
115+
116+
## Special annotations
117+
118+
Kubernetes resources can be annotated with some special annotations that can direct the scraper to certain behaviors.
119+
120+
| Annotation | Description |
121+
| ------------------------------------------------------------- | -------------------------------------------------------------------------- |
122+
| `config-db.flanksource.com/tags: "key1:val1,key2:val2"` | Attach custom tags to the object. A config can have as many as `5` tags, so keep the custom tags limited. |
123+
| `config-db.flanksource.com/ignore: true` | Exclude the object from being scraped along with all of its changes. |
124+
| `config-db.flanksource.com/ignore-changes: <pattern>` | Exclude changes by type for the given object that matches the pattern. |
125+
| `config-db.flanksource.com/ignore-change-severity: <pattern>` | Exclude changes by severity for the given object that matches the pattern. |
126+
127+
### Pattern matching
128+
129+
Pattern matching suports the following operations
130+
131+
- Use `*` to exclude all.
132+
- Prefix matching. Example: `Added*,Deleted*`
133+
- Suffix matching. Example: `*Terminated`
134+
- Negation will match everything but the pattern: Example: `!PodCrashLooping`

0 commit comments

Comments
 (0)