From cf66af89781d0afc72d9d4eff72d2e7878108ec1 Mon Sep 17 00:00:00 2001 From: Yash Mehrotra Date: Tue, 3 Sep 2024 09:20:16 +0530 Subject: [PATCH] feat: add topology push docs --- .../docs/reference/connections/http.mdx | 63 +++++++++++++++++++ .../docs/reference/topology/index.mdx | 1 + .../docs/topology/concepts/push.mdx | 29 +++++++++ 3 files changed, 93 insertions(+) create mode 100644 mission-control/docs/reference/connections/http.mdx create mode 100644 mission-control/docs/topology/concepts/push.mdx diff --git a/mission-control/docs/reference/connections/http.mdx b/mission-control/docs/reference/connections/http.mdx new file mode 100644 index 00000000..1fadbe6c --- /dev/null +++ b/mission-control/docs/reference/connections/http.mdx @@ -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 | _EnvVar_ | | +| `password` | Password | _EnvVar_ | | +| `oauth` | OAuth | [OAuth](#oauth) | | +| `bearer` | Bearer | _EnvVar_ | | +| `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 | _EnvVar_ | `true` | +| `clientSecret` | Client Secret | _EnvVar_ | `true` | +| `scopes` | Scopes | []string | | +| `params` | Params | map[string]string | | + +### TLS + +| Field | Description | Scheme | Required | +|----------------------|---------------------------------------------------------------------------------|------------------------------------------------|----------| +| `key` | PEM encoded client private key | _EnvVar_ | `true` | +| `ca` | PEM encoded certificate of the CA to verify the server certificate | _EnvVar_ | `true` | +| `cert` | PEM encoded client certificate | _EnvVar_ | `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 +``` diff --git a/mission-control/docs/reference/topology/index.mdx b/mission-control/docs/reference/topology/index.mdx index ca7375f7..927caf64 100644 --- a/mission-control/docs/reference/topology/index.mdx +++ b/mission-control/docs/reference/topology/index.mdx @@ -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` | | | `tooltip` | Set tooltip outlining information pertaining to the topology. | `string` | | | `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 diff --git a/mission-control/docs/topology/concepts/push.mdx b/mission-control/docs/topology/concepts/push.mdx new file mode 100644 index 00000000..8107e1b2 --- /dev/null +++ b/mission-control/docs/topology/concepts/push.mdx @@ -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) + +:::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 +```