Skip to content

Commit

Permalink
feat: add topology push docs
Browse files Browse the repository at this point in the history
  • Loading branch information
yashmehrotra authored and moshloop committed Sep 3, 2024
1 parent 4910001 commit cf66af8
Show file tree
Hide file tree
Showing 3 changed files with 93 additions and 0 deletions.
63 changes: 63 additions & 0 deletions mission-control/docs/reference/connections/http.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
title: HTTP
---

HTTP Connections are used to query data via any http/https compatible resource

## Schema

| Field | Description | Scheme | Required |
|--------------|-----------------|------------------------------------------------|----------|
| `url` | URL | string | `true` |
| `username` | Username | <CommonLink to="secrets">_EnvVar_</CommonLink> | |
| `password` | Password | <CommonLink to="secrets">_EnvVar_</CommonLink> | |
| `oauth` | OAuth | [OAuth](#oauth) | |
| `bearer` | Bearer | <CommonLink to="secrets">_EnvVar_</CommonLink> | |
| `tls` | TLS Config | [TLS](#tls) | |
| `connection` | Connection Name | string | |

:::info
If connection is already created `connection` (Connection Name) can be used as a reference instead of redefining all fields. Read more on [connection referencing](/reference/connections/#referencing-connections)
:::

### OAuth

| Field | Description | Scheme | Required |
|----------------|---------------|------------------------------------------------|----------|
| `tokenURL` | Token URL | string | `true` |
| `clientID` | Client ID | <CommonLink to="secrets">_EnvVar_</CommonLink> | `true` |
| `clientSecret` | Client Secret | <CommonLink to="secrets">_EnvVar_</CommonLink> | `true` |
| `scopes` | Scopes | []string | |
| `params` | Params | map[string]string | |

### TLS

| Field | Description | Scheme | Required |
|----------------------|---------------------------------------------------------------------------------|------------------------------------------------|----------|
| `key` | PEM encoded client private key | <CommonLink to="secrets">_EnvVar_</CommonLink> | `true` |
| `ca` | PEM encoded certificate of the CA to verify the server certificate | <CommonLink to="secrets">_EnvVar_</CommonLink> | `true` |
| `cert` | PEM encoded client certificate | <CommonLink to="secrets">_EnvVar_</CommonLink> | `true` |
| `insecureSkipVerify` | controls whether a client verifies the server's certificate chain and host name | bool | |
| `handshakeTimeout` | Handshake timeout (Default: 10 seconds) | time.Duration | |


## Example

This example demonstrates how to configure an HTTP connection in Mission Control:

```yaml title="http-connection.yaml"
apiVersion: v1
kind: Connection
metadata:
name: http-connection
spec:
http:
url: https://example.com
username:
value: user
password:
valueFrom:
secretKeyRef:
name: credentials
key: password
```
1 change: 1 addition & 0 deletions mission-control/docs/reference/topology/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ This page defines the specification for Topology. There are few samples in the e
| `text` | Set description or text of choice pertaining to topology. | `string` | |

Check warning on line 18 in mission-control/docs/reference/topology/index.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] mission-control/docs/reference/topology/index.mdx#L18

[Flanksource.Wordiness] Consider using 'about' instead of 'pertaining to'.
Raw output
{"message": "[Flanksource.Wordiness] Consider using 'about' instead of 'pertaining to'.", "location": {"path": "mission-control/docs/reference/topology/index.mdx", "range": {"start": {"line": 18, "column": 52}}}, "severity": "WARNING"}
| `tooltip` | Set tooltip outlining information pertaining to the topology. | `string` | |

Check warning on line 19 in mission-control/docs/reference/topology/index.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] mission-control/docs/reference/topology/index.mdx#L19

[Flanksource.Wordiness] Consider using 'about' instead of 'pertaining to'.
Raw output
{"message": "[Flanksource.Wordiness] Consider using 'about' instead of 'pertaining to'.", "location": {"path": "mission-control/docs/reference/topology/index.mdx", "range": {"start": {"line": 19, "column": 52}}}, "severity": "WARNING"}
| `type` | Set type of topology e.g. service, API, website, library, database, etc. | `string` | |
| `push` | Set type of topology e.g. service, API, website, library, database, etc. | [`HTTPConnection`](/reference/connections/http) | |

### ID Selector

Expand Down
29 changes: 29 additions & 0 deletions mission-control/docs/topology/concepts/push.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
title: Push
---

We can push the topologies we create to any mission control host. We just have to define a [HTTPConnection](/reference/connections/http)

Check failure on line 5 in mission-control/docs/topology/concepts/push.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] mission-control/docs/topology/concepts/push.mdx#L5

[Flanksource.DictateFeelings] Don't tell people how they feel with words like 'just'.
Raw output
{"message": "[Flanksource.DictateFeelings] Don't tell people how they feel with words like 'just'.", "location": {"path": "mission-control/docs/topology/concepts/push.mdx", "range": {"start": {"line": 5, "column": 70}}}, "severity": "ERROR"}

Check failure on line 5 in mission-control/docs/topology/concepts/push.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] mission-control/docs/topology/concepts/push.mdx#L5

[Flanksource.Spelling] Is 'HTTPConnection' spelled correctly? Is it missing code formatting?
Raw output
{"message": "[Flanksource.Spelling] Is 'HTTPConnection' spelled correctly? Is it missing code formatting?", "location": {"path": "mission-control/docs/topology/concepts/push.mdx", "range": {"start": {"line": 5, "column": 93}}}, "severity": "ERROR"}

:::info
This is different from using an agent as using this can push topologies anywhere even if those instances do not have an agent setup
:::

```yaml title="topology.yaml"
apiVersion: canaries.flanksource.com/v1
kind: Topology
metadata:
name: Website
spec:
push:
url: https://my-mission-control.company.com
username:
value: admin
password:
valueFrom:
secretKeyRef:
name: credentials
key: password

components:
- name: UI Server
```

0 comments on commit cf66af8

Please sign in to comment.