Skip to content

Commit

Permalink
chore: address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
adityathebe committed Jun 26, 2024
1 parent 6cd1100 commit 0647954
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 70 deletions.
30 changes: 18 additions & 12 deletions canary-checker/docs/reference/1-prometheus.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,38 +17,44 @@ The Prometheus Check connects to the Prometheus host, performs the desired query
{
field: 'url',
description:
'Prometheus instance, if not specified in installation it is required',
'Prometheus instance, defaults to `--prometheus` command line argument',
required: true
},
{ field: 'query', description: 'PromQL query to execute', required: true },
{
field: 'username',
description: 'PromQL query to execute',
description: 'Username for basic auth',
scheme: 'EnvVar'
},
{
field: 'password',
description: 'PromQL query to execute',
description: 'Password for basic auth',
scheme: 'EnvVar'
},
{
field: 'bearer',
description: 'PromQL query to execute',
description: 'Bearer token to use for authentication',
scheme: 'EnvVar'
},
{ field: 'oauth', description: 'PromQL query to execute', scheme: '[oAuth](#oauth)' },
{ field: 'oauth', scheme: '[OAuth](#oauth)' }

Check failure on line 39 in canary-checker/docs/reference/1-prometheus.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] canary-checker/docs/reference/1-prometheus.mdx#L39

[Vale.Terms] Use 'OAuth' instead of 'oauth'.
Raw output
{"message": "[Vale.Terms] Use 'OAuth' instead of 'oauth'.", "location": {"path": "canary-checker/docs/reference/1-prometheus.mdx", "range": {"start": {"line": 39, "column": 15}}}, "severity": "ERROR"}
]}
/>

## OAuth

<Fields rows={[
{field: "clientID", description: "Client ID", scheme: "EnvVar"},
{field: "clientSecret", description: "Client Secret", scheme: "EnvVar"},
{field: "scope", description: "oAuth Scopes", scheme: "`[]string`"},
{field: "tokenURL", description: "Token URL", scheme: "string"},
{field: "params", description: "Endpoint parameters", scheme: "`map[string]string`"},
]}/>
<Fields
rows={[
{ field: 'clientID', description: 'Client ID', scheme: 'EnvVar' },
{ field: 'clientSecret', description: 'Client Secret', scheme: 'EnvVar' },
{ field: 'scope', description: 'Scopes to request', scheme: '`[]string`' },
{ field: 'tokenURL', description: 'Token URL', scheme: 'string' },
{
field: 'params',
description: 'OAuth parameters when requesting a token',
scheme: '`map[string]string`'
}
]}
/>

## Result Variables

Expand Down
78 changes: 26 additions & 52 deletions mission-control/docs/reference/topology/components.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,51 +10,26 @@ Components are the building blocks of a Topology. The component specification pr

# Component

| Field | Description | Scheme | Required |
| --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ | -------- |
| `checks` | Specify checks based on `inline` and `selector` | [`[]Check`](#check) | |
| `components` | RawMessage is a raw encoded JSON value. It implements Marshaler and Unmarshaler and can be used to delay JSON decoding or pre-compute a JSON encoding. | [`[]Component`](#component) | |
| `configs` | Specify selectors for config items that should be associated with this component. | [`[]Config`](#config-selector) | |
| `forEach` | Only applies when using lookup. When specified, the components and properties specified under ForEach will be templated using the components returned by the lookup. | [`ForEach`](#foreach) | |
| `icon` | Specify icon for component | `string` | |
| `id` | Specify unique ID for component | [`ID`](#id) | |
| `labels` | Labels for the component | `map[string]string` | |
| `lifecycle` | The lifecycle state of the component e.g. production, staging, dev, etc. | `string` | |
| `lookup` | Lookup component definitions from an external source, use the `forEach` property to iterate over the results to further enrich each component. | [`Lookup`](#lookup) | |
| `name` | Set name for component | `string` | |
| `namespace` | Set namespace for component | `string` | |
| `order` | Set integer order value for component | `int` | |
| `owner` | Specify owner of component | `string` | |
| `properties` | Customize component properties as to be visualized on Mission control UI | [`[]Property`](./properties) | |
| `relationships` | Specify relationship of component | [`[]RelationshipSpec`](#relationshipspec) | |
| `selectors` | Specify component for topology based on `fieldSelector` and `labelSelector` | [`[]ResourceSelector`](../resource-selector) | |
| `tooltip` | Set tooltip outlining information pertaining to the component | `string` | |
| `type` | Set type of component e.g. service, API, website, library, database, etc. | `string` | |

### ID

<Fields
oneOf={["expr", "javascript", "template"]}
rows={[
{
field: 'expr',
description: '',
scheme: 'CEL'
},
{
field: 'javascript',
description: '',
scheme: 'Javascript'
},
{
field: 'template',
description: '',
scheme: 'Gotemplate'
}

]}
/>

| Field | Description | Scheme | Required |
| --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------- | -------- |
| `checks` | Specify checks based on `inline` and `selector` | [`[]Check`](#check) | |
| `components` | RawMessage is a raw encoded JSON value. It implements Marshaler and Unmarshaler and can be used to delay JSON decoding or pre-compute a JSON encoding. | [`[]Component`](#component) | |
| `configs` | Specify selectors for config items that should be associated with this component. | [`[]Config`](#config-selector) | |
| `forEach` | Only applies when using lookup. When specified, the components and properties specified under ForEach will be templated using the components returned by the lookup. | [`ForEach`](#foreach) | |
| `icon` | Specify icon for component | `string` | |
| `id` | Specify unique ID for component | [`ID`](./index.mdx#id-selector) | |
| `labels` | Labels for the component | `map[string]string` | |
| `lifecycle` | The lifecycle state of the component e.g. production, staging, dev, etc. | `string` | |
| `lookup` | Lookup component definitions from an external source, use the `forEach` property to iterate over the results to further enrich each component. | [`Lookup`](#lookup) | |
| `name` | Set name for component | `string` | |
| `namespace` | Set namespace for component | `string` | |
| `order` | Set integer order value for component | `int` | |
| `owner` | Specify owner of component | `string` | |
| `properties` | Customize component properties as to be visualized on Mission control UI | [`[]Property`](./properties) | |
| `relationships` | Specify relationship of component | [`[]RelationshipSpec`](#relationshipspec) | |
| `selectors` | Specify component for topology based on `fieldSelector` and `labelSelector` | [`[]ResourceSelector`](../resource-selector) | |
| `tooltip` | Set tooltip outlining information pertaining to the component | `string` | |
| `type` | Set type of component e.g. service, API, website, library, database, etc. | `string` | |

### RelationshipSpec

Expand All @@ -65,7 +40,7 @@ oneOf={["expr", "javascript", "template"]}

### ForEach

<ForEach/>
<ForEach />

## Config Selector

Expand All @@ -81,12 +56,11 @@ oneOf={["expr", "javascript", "template"]}

## Check

| Field | Description | Scheme | Required |
| ---------- | -------------------------------- | -------------------------------------------------------------- | -------- |
| `inline` | Define a new health check inline | [`CanarySpec`](/reference/canary-checker) | |
| `selector` | Select an existing health check | [`[]ResourceSelector`](/reference/resource-selector) | |
| Field | Description | Scheme | Required |
| ---------- | -------------------------------- | ---------------------------------------------------- | -------- |
| `inline` | Define a new health check inline | [`CanarySpec`](/reference/canary-checker) | |
| `selector` | Select an existing health check | [`[]ResourceSelector`](/reference/resource-selector) | |

## Lookup

<Lookup/>

<Lookup />
26 changes: 20 additions & 6 deletions mission-control/docs/reference/topology/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,26 @@ This page defines the specification for Topology. There are few samples in the e

### ID Selector

| Field | Description | Scheme | Required |
| ------------ | ------------------------------------------ | -------- | -------- |
| `expr` | Specify expression for ID | `string` | |
| `javascript` | Specify javascript syntax to generate ID | `string` | |
| `jsonPath` | Specify path to JSON element for use in ID | `string` | |
| `template` | Specify Go template for use in ID | `string` | |
<Fields
oneOf={['expr', 'javascript', 'template']}
rows={[
{
field: 'expr',
description: '',
scheme: 'CEL'
},
{
field: 'javascript',
description: '',
scheme: 'Javascript'
},
{
field: 'template',
description: '',
scheme: 'Gotemplate'
}
]}
/>

### Group By

Expand Down

0 comments on commit 0647954

Please sign in to comment.