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
Copy file name to clipboardExpand all lines: canary-checker/docs/scripting/gotemplate.md
+3-6
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,7 @@ To send `{{ .secret }}` as it is do this
31
31
{{`{{ .secret }}`}}
32
32
```
33
33
34
-
## Encoding
34
+
## base64
35
35
36
36
### Encode
37
37
@@ -46,8 +46,6 @@ Encode data as a Base64 string. Specifically, this uses the standard Base64 enco
46
46
47
47
Decode a Base64 string. This supports both standard ([RFC4648 §4](https://tools.ietf.org/html/rfc4648#section-4)) and URL-safe ([RFC4648 §5](https://tools.ietf.org/html/rfc4648#section-5)) encodings.
48
48
49
-
This function outputs the data as a string, so it may not be appropriate for decoding binary data. Use [`base64.DecodeBytes`](#base64.DecodeBytes)
50
-
for binary data.
51
49
52
50
```go
53
51
{{ base64.Decode"aGVsbG8gd29ybGQ=" }} // hello world
@@ -56,7 +54,6 @@ for binary data.
56
54
57
55
58
56
:::note
59
-
60
57
For the functions that return an array, a Go `[]interface{}` is returned, regardless of whether or not the input was a different type.
61
58
:::
62
59
@@ -417,7 +414,7 @@ The value in decimal is {{ $val }}
417
414
418
415
### ParseFloat
419
416
420
-
_**Note:**_ See [`conv.ToFloat`](#tofloat) instead for a simpler and more flexible variant of this function.
417
+
_**Note:**_ See [`conv.ToFloat`](#tofloat64) instead for a simpler and more flexible variant of this function.
421
418
422
419
Parses a string as an float64 for later use. Equivalent to [strconv.ParseFloat](https://golang.org/pkg/strconv/#ParseFloat)
423
420
@@ -1803,7 +1800,7 @@ Parses a timestamp defined by the given layout. This wraps [`time.Parse`](https:
1803
1800
A number of pre-defined layouts are provided as constants, defined
"description": "Format of config item e.g. `xml`, `properties`",
39
+
"default": "`JSON`",
40
+
"scheme": "string"
41
+
},
42
+
{
43
+
"field": "timestampFormat",
44
+
"description": "Format to parse timestamps in `createFields` and `deletedFields`",
45
+
"default": "RFC3339",
46
+
"scheme": "Go time format"
47
+
},
48
+
{
49
+
"field": "createFields",
50
+
"description": "Identify the created time for a resource (if different to scrape time). If multiple fields are specified, the first non-empty value will be used",
51
+
"scheme": "[]JSONPathOrString"
52
+
},
53
+
{
54
+
"field": "deleteFields",
55
+
"description": "Identify when a config item was deleted. If multiple fields are specified, the first non-empty value will be used",
56
+
"scheme": "[]JSONPathOrString"
57
+
},
58
+
]
59
+
60
+
constcommonsRows=[
61
+
62
+
{
63
+
"field": "ignore",
64
+
"description": "Fields to ignore and strip out of the config",
65
+
"scheme": "[]JSONPath"
66
+
},
67
+
{
68
+
"field": "properties",
69
+
"description": "Custom templatable properties for the scraped config items.",
Copy file name to clipboardExpand all lines: mission-control/docs/config-db/concepts/transform.md
+8-7
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: Transform
3
3
---
4
4
5
-
Transformations allows you to transform the scraped config items before they are saved, common use cases include:
5
+
Transformations allows you to modify scraped config items before they are saved, common use cases include:
6
6
7
7
- Linking configuration items
8
8
- Removing extraneous or overly verbose fields
@@ -49,7 +49,8 @@ spec:
49
49
50
50
### Masking
51
51
52
-
Masking allows replacing sensitive fields with a hash or static string.
52
+
Masking replaces sensitive fields with a hash or static string. A hash can be used to determine if a field changed without revealing original values.
53
+
53
54
54
55
```yaml title="file-mask-scraper.yaml"
55
56
apiVersion: configs.flanksource.com/v1
@@ -88,10 +89,10 @@ Masks are applied in the order they are specified in the configuration file.
88
89
## Changes
89
90
90
91
### Exclusions
92
+
Some configurations can change frequently and may not be relevant. For example, a `Kubernetes::Node` configuration changes often as pods launched and stopped. From the node's perspective, these image changes are irrelevant.
91
93
92
-
Some configs can have changes in high volume that may not be relevant. Example: A kubernetes Node config changes frequently as the pods in the cluster update their images. From the node's perspective the image changes are irrelevant.
94
+
This is where exclusions become useful. Here's an example that ignores all image changes in a `Kubernetes::Node` configuration:
93
95
94
-
This is where exclusions can become handy. Here's an example that ignore all image changes in a kubernetes node config:
95
96
96
97
```yaml title="kubernetes-scraper.yaml"
97
98
apiVersion: configs.flanksource.com/v1
@@ -111,7 +112,7 @@ spec:
111
112
112
113
### Mapping
113
114
114
-
When you encounter a diff change, unlike an eventbased change, it can sometimes appear cryptic. The summary of the change may not immediately indicate what the change is about. For example, the change 'status.images' might not be self-explanatory. To address this issue, we can assign types to these diff changes using mapping.
115
+
When you encounter a diff change, unlike an event-based change, it can sometimes appear unclear. The summary of the change may not immediately indicate its purpose. For example, the change 'status.images' might not be self-explanatory. To clarify this, you can assign types to these diff changes using mapping.
115
116
116
117
```yaml title="kubernetes-scraper.yaml"
117
118
apiVersion: configs.flanksource.com/v1
@@ -142,11 +143,11 @@ spec:
142
143
| `filter` | Selects changes to apply the mapping | <CommonLink to="cel">CEL</CommonLink> with [Change Context](/reference/config-db/changes) |
143
144
| `action` | What action to take on the change, if `delete` then the corresponding config item is marked as deleted | `delete` or `ignore` |
144
145
| `type` | New change type | `string` |
145
-
| `summary` | New summary of the change | [Go Template](/reference/scripting/template) |
146
+
| `summary` | New summary of the change | <CommonLink to="gotemplate">Go Template</CommonLink> with [Change Context](/reference/config-db/changes) |
146
147
147
148
## Scripting
148
149
149
-
Scripting allows you to modify the scraped configuration using CEL before saving it to the database. This is useful for data normalization, default value population, sensitive field masking etc.
150
+
Scripting modifies the scraped configuration using CEL before saving it to the database. This process is beneficial for data normalization, default value population, and sensitive field masking.
Copy file name to clipboardExpand all lines: mission-control/docs/config-db/index.mdx
+2-1
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,7 @@
1
1
---
2
2
slug: /config-db
3
3
hide_title: true
4
+
title: Overview
4
5
hide_table_of_contents: true
5
6
pagination_next: playbooks/index
6
7
pagination_prev:
@@ -34,7 +35,7 @@ Under the hood the catalog is powered by [github.com/flanksource/config-db](http
34
35
The catalog is comprised of:
35
36
36
37
***Config Items** are individual resources e.g. `Pod`, `EBS`, `IAM Role`, `postgres.conf` scraped from external sources like [AWS](/config-db/scrapers/aws), [Kubernetes](/config-db/scrapers/kubernetes), [Azure](/config-db/scrapers/azure), [Azure Devops](/config-db/scrapers/azure-devops) , [Github](/config-db/scrapers/github)
37
-
***Changes** recorded against config items either through automatic change detection (diffs) or from sources like [Cloud Trail](/config-db/scrapers/aws#cloud-trail) or [Kubernetes Events](/config-db/scrapers/kubernetes#events)
38
+
***Changes** recorded against config items either through automatic change detection (diffs) or from sources like [Cloud Trail](/config-db/scrapers/aws#cloudtrail) or [Kubernetes Events](/config-db/scrapers/kubernetes#events)
38
39
***Insights** recorded against config items from external sources like [AWS Trusted Advisor](/config-db/scrapers/aws#trusted-advisor) or [Trivy](/config-db/scrapers/trivy)
0 commit comments