Skip to content

Commit

Permalink
Extend chart readme (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
kgreczka9 authored Oct 25, 2022
1 parent 8b49105 commit c3b53b8
Show file tree
Hide file tree
Showing 4 changed files with 178 additions and 12 deletions.
8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
repos:
- repo: https://github.com/norwoodj/helm-docs
rev: v1.2.0
hooks:
- id: helm-docs
args:
# Make the tool search for charts only under the `example-charts` directory
- --chart-search-root=charts
17 changes: 17 additions & 0 deletions .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
- id: helm-docs
args: []
description: Uses 'helm-docs' to create documentation from the Helm chart's 'values.yaml' file, and inserts the result into a corresponding 'README.md' file.
entry: git-hook/helm-docs
files: (README\.md\.gotmpl|(Chart|requirements|values)\.yaml)$
language: script
name: Helm Docs
require_serial: true

- id: helm-docs-built
args: []
description: Uses auto built 'helm-docs' to create documentation from the Helm chart's 'values.yaml' file, and inserts the result into a corresponding 'README.md' file.
entry: helm-docs
files: (README\.md\.gotmpl|(Chart|requirements|values)\.yaml)$
language: golang
name: Helm Docs Built
require_serial: true
85 changes: 73 additions & 12 deletions charts/nobl9-agent/README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,78 @@
# nobl9-agent

![Version: 1.0.1](https://img.shields.io/badge/Version-1.0.1-informational?style=flat-square)

Agent to retrieve SLI metrics from configured data sources and send the data back to the Nobl9 backend.

**Homepage:** <https://nobl9.com>
## Getting started

## Maintainers
To set up the chart, follow these steps:

| Name | Email | Url |
| ---- | ------ | --- |
| nobl9 | <support@nobl9.com> | <https://nobl9.com> |
1. Install **Helm** by following the steps described in the [Helm Documentation](https://helm.sh/docs/intro/quickstart/) and set up a connection to the desired Kubernetes cluster.
2. Add the Nobl9 repository by entering the following command:
```bash
helm repo add nobl9 https://nobl9.github.io/helm-charts
```

After entering the above-mentioned command, you can discover the available charts, for example:

```bash
helm search repo Nobl9
NAME CHART VERSION APP VERSION DESCRIPTION
nobl9/nobl9-agent 1.0.0 0.48.0 Agent to retrieve SLI metrics from configured d...
```

3. Get the Agent variables from the [Nobl9 Agent configuration page](https://app.nobl9.com/integrations/sources) in the Nobl9 UI.

> You can find the Agent variables in the Nobl9 App by navigating to the **Integrations** > **Sources** and choosing the data source created using the Agent connection method. The variables are presented in the **Agent Configuration** tab.

> If there are no available data sources created using the Agent connection method in the **Sources** tab, you can create one by following the steps described in the [Agent Documentation](https://docs.nobl9.com/Nobl9_Agent/#creating-the-agent). For more Integration-specific details, refer to the **Agent Configuration in the UI** section in each [Integration’s subpage](https://docs.nobl9.com/Sources/).<br/>

4. Prepare the chart values.

Review the default configuration and the default values in the [values.yaml](./values.yaml).

You can extend this file with custom variables as needed. For example, if you want to add OpenTSDB as a data source, create new `values.yml` file and add the following values:

```bash
config:
clientId: my-id
clientSecret: my-secret
deployment:
version: "0.51.2"
extraEnvs:
- name: N9_METRICS_PORT
value: "9090"
```

## Source Code
**Important notes:**

* <https://github.com/nobl9/helm-charts/tree/main/charts/nobl9-agent>
* `clientId` and `clientSecret` values correspond to the `N9_CLIENT_ID` and `N9_CLIENT_SECRET` variables from the Agent Configuration.

* Note that the OpenTSDB data source requires an additional [`N9_METRICS_PORT`](agent-metrics#agents-default-port) variable. The `N9_OKTA_ORG_URL` and `N9_AUTH_SERVER` variables can be omitted because these values are equal to the defaultsReview the default configuration and the default values in the [values.yaml](./values.yaml).

5. Deploy the chart by entering the following command:

```bash
helm install --values values.yml --generate-name nobl9/nobl9-agent
```

The expected output looks like this:

```bash
NAME: nobl9-agent-1663143197
LAST DEPLOYED: Wed Sep 14 10:13:20 2022
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None
```

Go to the [docs.nobl9.com](https://docs.nobl9.com/Nobl9_Agent/helm-charts?_highlight=helm#helm-chart-configuration) for more informations.

## Required values

* `clientId` - the individual Nobl9 client identificator, may be provided using [config.clientId](./values.yaml#L72) or [deployment.extraEnvs](./values.yaml#L13)
* `clientSecret` - the individual Nobl9 client secret, may be provided using [config.clientSecret](./values.yaml#L74) or [deployment.extraEnvs](./values.yaml#L13)
* data source dependent variables - some of data sources requires additional variables to work with Nobl9 Agent, for example Splunk requires `splunk_observability_access_token`

## Values

Expand All @@ -33,7 +91,7 @@ Agent to retrieve SLI metrics from configured data sources and send the data bac
| deployment.extraEnvs | string | `nil` | Additional Envs |
| deployment.image | string | `"nobl9/agent"` | Image used by chart |
| deployment.pullPolicy | string | `"Always"` | Image Pull Policy |
| deployment.version | string | `"0.51.2"` | Agent version (image tag) |
| deployment.version | string | `"0.53.2"` | Agent version (image tag) |
| extraLabels | object | `{}` | |
| namespaceOverride | string | `nil` | Override the Namespace |
| resources.limits.cpu | string | `"1.0"` | CPU limit |
Expand All @@ -47,5 +105,8 @@ Agent to retrieve SLI metrics from configured data sources and send the data bac
| securityContext.runAsNonRoot | bool | `true` | Runs the container as a root user if set to false |
| securityContext.runAsUser | int | `2000` | Runs the container with specified PID |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0)
## Maintainers

| Name | Email | Url |
| ---- | ------ | --- |
| nobl9 | <support@nobl9.com> | <https://nobl9.com> |
80 changes: 80 additions & 0 deletions charts/nobl9-agent/README.md.gotmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
{{ template "chart.header" . }}

{{ template "chart.description" . }}

## Getting started

To set up the chart, follow these steps:

1. Install **Helm** by following the steps described in the [Helm Documentation](https://helm.sh/docs/intro/quickstart/) and set up a connection to the desired Kubernetes cluster.
2. Add the Nobl9 repository by entering the following command:
```bash
helm repo add nobl9 https://nobl9.github.io/helm-charts
```

After entering the above-mentioned command, you can discover the available charts, for example:

```bash
helm search repo Nobl9
NAME CHART VERSION APP VERSION DESCRIPTION
nobl9/nobl9-agent 1.0.0 0.48.0 Agent to retrieve SLI metrics from configured d...
```

3. Get the Agent variables from the [Nobl9 Agent configuration page](https://app.nobl9.com/integrations/sources) in the Nobl9 UI.


> You can find the Agent variables in the Nobl9 App by navigating to the **Integrations** > **Sources** and choosing the data source created using the Agent connection method. The variables are presented in the **Agent Configuration** tab.

> If there are no available data sources created using the Agent connection method in the **Sources** tab, you can create one by following the steps described in the [Agent Documentation](https://docs.nobl9.com/Nobl9_Agent/#creating-the-agent). For more Integration-specific details, refer to the **Agent Configuration in the UI** section in each [Integration’s subpage](https://docs.nobl9.com/Sources/).<br/>

4. Prepare the chart values.

Review the default configuration and the default values in the [values.yaml](./values.yaml).

You can extend this file with custom variables as needed. For example, if you want to add OpenTSDB as a data source, create new `values.yml` file and add the following values:

```bash
config:
clientId: my-id
clientSecret: my-secret
deployment:
version: "0.51.2"
extraEnvs:
- name: N9_METRICS_PORT
value: "9090"
```

**Important notes:**

* `clientId` and `clientSecret` values correspond to the `N9_CLIENT_ID` and `N9_CLIENT_SECRET` variables from the Agent Configuration.

* Note that the OpenTSDB data source requires an additional [`N9_METRICS_PORT`](agent-metrics#agents-default-port) variable. The `N9_OKTA_ORG_URL` and `N9_AUTH_SERVER` variables can be omitted because these values are equal to the defaultsReview the default configuration and the default values in the [values.yaml](./values.yaml).

5. Deploy the chart by entering the following command:

```bash
helm install --values values.yml --generate-name nobl9/nobl9-agent
```

The expected output looks like this:

```bash
NAME: nobl9-agent-1663143197
LAST DEPLOYED: Wed Sep 14 10:13:20 2022
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None
```

Go to the [docs.nobl9.com](https://docs.nobl9.com/Nobl9_Agent/helm-charts?_highlight=helm#helm-chart-configuration) for more informations.

## Required values

* `clientId` - the individual Nobl9 client identificator, may be provided using [config.clientId](./values.yaml#L72) or [deployment.extraEnvs](./values.yaml#L13)
* `clientSecret` - the individual Nobl9 client secret, may be provided using [config.clientSecret](./values.yaml#L74) or [deployment.extraEnvs](./values.yaml#L13)
* data source dependent variables - some of data sources requires additional variables to work with Nobl9 Agent, for example Splunk requires `splunk_observability_access_token`

{{ template "chart.valuesSection" . }}

{{ template "chart.maintainersSection" . }}

0 comments on commit c3b53b8

Please sign in to comment.