Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mission-control-chart
Submodule mission-control-chart updated 38 files
+2 −0 .github/workflows/release.yml
+7 −4 .github/workflows/test.yml
+2 −1 .gitignore
+24 −2 Makefile
+3 −3 agent-chart/Chart.yaml
+10 −10 agent-chart/README.md
+8 −8 agent-chart/values.yaml
+8 −3 chart/Chart.yaml
+13 −8 chart/README.md
+8 −5 chart/ci/minimal-values.yaml
+2 −2 chart/crds/mission-control.flanksource.com_applications.yaml
+1 −1 chart/crds/mission-control.flanksource.com_connections.yaml
+1 −1 chart/crds/mission-control.flanksource.com_incidentrules.yaml
+1 −7 chart/crds/mission-control.flanksource.com_notifications.yaml
+1 −1 chart/crds/mission-control.flanksource.com_notificationsilences.yaml
+1 −1 chart/crds/mission-control.flanksource.com_permissiongroups.yaml
+30 −6 chart/crds/mission-control.flanksource.com_permissions.yaml
+9 −6 chart/crds/mission-control.flanksource.com_playbooks.yaml
+273 −0 chart/crds/mission-control.flanksource.com_scopes.yaml
+584 −19 chart/crds/mission-control.flanksource.com_views.yaml
+3 −0 chart/templates/deployment.yaml
+6 −5 chart/templates/postgres.yaml
+10 −1 chart/templates/rbac.yaml
+24 −81 chart/values.schema.json
+25 −9 chart/values.yaml
+512 −0 crd-chart/templates/canary-checker.flanksource.com_Canary.yaml
+4,302 −1,090 crd-chart/templates/configs.flanksource.com_scrapeconfigs.yaml
+54 −0 crd-chart/templates/configs.flanksource.com_scrapeplugins.yaml
+449 −0 crd-chart/templates/mission-control.flanksource.com_applications.yaml
+1 −1 crd-chart/templates/mission-control.flanksource.com_connections.yaml
+1 −1 crd-chart/templates/mission-control.flanksource.com_incidentrules.yaml
+1 −7 crd-chart/templates/mission-control.flanksource.com_notifications.yaml
+1 −1 crd-chart/templates/mission-control.flanksource.com_notificationsilences.yaml
+1 −1 crd-chart/templates/mission-control.flanksource.com_permissiongroups.yaml
+30 −6 crd-chart/templates/mission-control.flanksource.com_permissions.yaml
+642 −9 crd-chart/templates/mission-control.flanksource.com_playbooks.yaml
+273 −0 crd-chart/templates/mission-control.flanksource.com_scopes.yaml
+1,358 −0 crd-chart/templates/mission-control.flanksource.com_views.yaml
146 changes: 72 additions & 74 deletions mission-control/blog/state-based-alerting/index.md

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions mission-control/docs/guide/config-db/concepts/relationships.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,31 +53,31 @@ You can see changes on the incoming relationships (and their parents) by choosin

## Relationship

| Field | Description | Scheme | Required |
| -------- | ------------------------------------------------------ | ----------------------------------------------------------------------------------------------- | -------- |
| Field | Description | Scheme | Required |
| -------- | ------------------------------------------------------ | ---------------------------------------------------------------------------------------------------- | -------- |
| `filter` | Which config items to form relationships with | <CommonLink to="cel">CEL</CommonLink> with [`ScrapeResult`](/docs/reference/config-db/scrape-result) | `true` |
| `id` | The ID or Alias (External ID) of the config to link to | [Lookup](#lookup) | |
| `name` | | [Lookup](#lookup) | |
| `type` | Config Type | [Lookup](#lookup) | |
| `id` | The ID or Alias (External ID) of the config to link to | [Lookup](#lookup) | |
| `name` | | [Lookup](#lookup) | |
| `type` | Config Type | [Lookup](#lookup) | |
| `agent` | agent of the config to link to | [Lookup](#lookup) that returns an [Agent](/docs/reference/types#agent) | |
| `labels` | Labels of the config to link to | `map[string]`[Lookup](#lookup) | |
| `labels` | Labels of the config to link to | `map[string]`[Lookup](#lookup) | |

### Lookup

RelationshipLookup offers different ways to specify a lookup value

| Field | Description | Scheme | Variables |
| ------- | --------------------------------------------- | ----------------------------------------------------------------------------------------------- | ---------------------------------------------------- |
| Field | Description | Scheme | Variables |
| ------- | --------------------------------------------- | ---------------------------------------------------------------------------------------------------- | --------------------------------------------------------- |
| `expr` | An expression that returns a value to be used | <CommonLink to="cel">CEL</CommonLink> with [`ScrapeResult`](/docs/reference/config-db/scrape-result) | [`ScrapeResult`](/docs/reference/config-db/scrape-result) |
| `value` | A static value to use in the lookup | `string` | |
| `label` | Get the value to use from an existing label | `label name` | |
| `value` | A static value to use in the lookup | `string` | |
| `label` | Get the value to use from an existing label | `label name` | |

## Dynamic Linking

Sometimes the logic for when to a form a relationship is complex, a CEL expression can be used to return a list of selectors dynamically.

| Field | Description | Scheme | Variables |
| ------ | -------------------------------------------------------------------------------------- | ------------------------------------- | ---------------------------------------------------- |
| Field | Description | Scheme | Variables |
| ------ | ------------------------------------------------------------------------------------------- | ------------------------------------- | --------------------------------------------------------- |
| `expr` | An expression that returns a list of [ResourceSelectors](/docs/reference/resource-selector) | <CommonLink to="cel">CEL</CommonLink> | [`ScrapeResult`](/docs/reference/config-db/scrape-result) |

```yaml title=link-pvc-to-pod.yaml
Expand Down
22 changes: 11 additions & 11 deletions mission-control/docs/guide/config-db/concepts/retention.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ After scraping we can choose to retain results on the basis of name, age, count

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 |
| -------------- | ------------------------------------------------------------------ | ------------------------------------- |
| `types` | Specify retention rules for config items | [`[]ConfigItem`](#config-items) |
| `changes` | Specify retention rules for changes | [`[]Change`](#changes) |
| Field | Description | Scheme |
| -------------- | ------------------------------------------------------------------ | ------------------------------------------ |
| `types` | Specify retention rules for config items | [`[]ConfigItem`](#config-items) |
| `changes` | Specify retention rules for changes | [`[]Change`](#changes) |
| `staleItemAge` | Config items that were last scraped after this age will be deleted | [Duration](/docs/reference/types#duration) |

## Config Items

| Field | Description | Scheme |
| ------------ | ----------------------------------------------------------------- | ------------------------------------- |
| `name` | Specify retention rules for changes | `string` |
| Field | Description | Scheme |
| ------------ | ----------------------------------------------------------------- | ------------------------------------------ |
| `name` | Specify retention rules for changes | `string` |
| `createdAge` | Age after a config item is created it will be deleted | [Duration](/docs/reference/types#duration) |
| `updatedAge` | Age after a config item last updated, that it will be deleted | [Duration](/docs/reference/types#duration) |
| `deletedAge` | Age after a config item is soft deleted, will it be hard deleted. | [Duration](/docs/reference/types#duration) |
Expand Down Expand Up @@ -63,11 +63,11 @@ spec:

Changes can quickly accumulate and grow large over time. While it's important to retain some changes, others can be discarded after a period.

| Field | Description | Scheme | Required |
| ------- | ------------------------------------------------------- | ------------------------------------- | -------- |
| `name` | Name of the change type | `string` | `true` |
| Field | Description | Scheme | Required |
| ------- | ------------------------------------------------------- | ------------------------------------------ | -------- |
| `name` | Name of the change type | `string` | `true` |
| `age` | Maximum age of the change type to retain (`12h`, `30d`) | [Duration](/docs/reference/types#duration) | |
| `count` | Maximum count to retain the change type | `int` | |
| `count` | Maximum count to retain the change type | `int` | |

```yaml title="kubernetes-scraper.yaml"
apiVersion: configs.flanksource.com/v1
Expand Down
32 changes: 16 additions & 16 deletions mission-control/docs/guide/config-db/concepts/transform.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ Transformations allow you to modify scraped config items before they are saved,
- Masking sensitive data
- Excluding duplicate changes or changes with a high rate

| Field | Description | Scheme |
| --------------------------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------ |
| `transform.exclude` | Remove fields from a scraped `config` | [[]Exclude](#field-exclusions) |
| `transform.mask` | Replace sensitive fields with a hash to enable change detection on secrets | [[]Mask](#masking) |
| Field | Description | Scheme |
| --------------------------- | -------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
| `transform.exclude` | Remove fields from a scraped `config` | [[]Exclude](#field-exclusions) |
| `transform.mask` | Replace sensitive fields with a hash to enable change detection on secrets | [[]Mask](#masking) |
| `transform.changes.exclude` | Ignore changes | [[]CEL](#exclusions) with [Change Context](/docs/reference/config-db/changes) |
| `transform.changes.mapping` | Categorize changes | [Mapping](#mapping) |
| `transform.changes.mapping` | Categorize changes | [Mapping](#mapping) |
| `transform.expr` | | [CEL](/docs/reference/scripting/cel) |
| `transform.relationship` | Create relationships between items | [Relationships](./relationships) |
| `transform.relationship` | Create relationships between items | [Relationships](./relationships) |

## Config Items

Expand Down Expand Up @@ -76,11 +76,11 @@ spec:
- fixtures/data/single-config.json
```

| Field | Description | Scheme |
| ---------- | ------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
| Field | Description | Scheme |
| ---------- | ------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
| `selector` | Filter which config items to apply masks on | <CommonLink to="cel">`CEL`</CommonLink> with [ScrapeResult](/docs/reference/config-db/scrape-result) context |
| `jsonpath` | Values to mask | <CommonLink to="jsonpath">`JSONPath`</CommonLink> |
| `value` | The replacement value of matched elements | `md5` or any static string e.g. `***` |
| `jsonpath` | Values to mask | <CommonLink to="jsonpath">`JSONPath`</CommonLink> |
| `value` | The replacement value of matched elements | `md5` or any static string e.g. `***` |

:::info
Masks are applied in the order they are specified in the configuration file.
Expand Down Expand Up @@ -138,19 +138,19 @@ spec:
//highlight-end
```

| Field | Description | Scheme |
| --------- | ------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------- |
| Field | Description | Scheme |
| --------- | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------- |
| `filter` | Selects changes to apply the mapping | <CommonLink to="cel">CEL</CommonLink> with [Change Context](/docs/reference/config-db/changes) |
| `action` | What action to take on the change, if `delete` then the corresponding config item is marked as deleted | `delete` or `ignore` |
| `type` | New change type | `string` |
| `action` | What action to take on the change, if `delete` then the corresponding config item is marked as deleted | `delete` or `ignore` |
| `type` | New change type | `string` |
| `summary` | New summary of the change | <CommonLink to="gotemplate">Go Template</CommonLink> with [Change Context](/docs/reference/config-db/changes) |

## Scripting

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.

| Field | Description | Scheme | Context |
| ------ | ----------------------- | ------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
| Field | Description | Scheme | Context |
| ------ | ----------------------- | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------- |
| `expr` | Transform a config item | <CommonLink to="cel">CEL</CommonLink> that returns [[]ScrapeResult](/docs/reference/config-db/scrape-result) | `config` `JSON`<br/>`result` [Scrape Result](/docs/reference/config-db/scrape-result) |

```yaml title="file-scraper.yaml"
Expand Down
Loading