README.md 10.6 KB
Newer Older
kelseiv's avatar
kelseiv committed
1
# Chronograf Helm chart
2

kelseiv's avatar
kelseiv committed
3
[Chronograf](https://github.com/influxdata/chronograf) is an open-source web application used to visualize your monitoring data and easily create alerting and automation rules.
4

kelseiv's avatar
kelseiv committed
5
The Chronograf Helm chart uses the [Helm](https://helm.sh) package manager to bootstrap a Chronograf deployment and service on a [Kubernetes](http://kubernetes.io) cluster.
6 7 8

## Prerequisites

kelseiv's avatar
kelseiv committed
9
- Helm v2 or later
10
- Kubernetes 1.4+
kelseiv's avatar
kelseiv committed
11
- (Optional) PersistentVolume (PV) provisioner support in the underlying infrastructure
12

kelseiv's avatar
kelseiv committed
13
## Install the chart
14

kelseiv's avatar
kelseiv committed
15
1. Add the InfluxData Helm repository:
16

kelseiv's avatar
kelseiv committed
17 18 19 20 21
   ```bash
   helm repo add influxdata https://helm.influxdata.com/
   ```

2. Run the following command, providing a name for your Chronograf release:
22

kelseiv's avatar
kelseiv committed
23 24 25 26 27
   ```bash
   helm upgrade --install my-release influxdata/chronograf
   ```
    
   > **Tip**: `--install` can be shortened to `-i`.
28

kelseiv's avatar
kelseiv committed
29
   This command deploys Chronograf on the Kubernetes cluster using the default configuration. To find parameters you can configure during installation, see [Configure the chart](#configure-the-chart).
30

kelseiv's avatar
kelseiv committed
31
  > **Tip**: To view all Helm chart releases, run `helm list`.
32

kelseiv's avatar
kelseiv committed
33 34 35
## Uninstall the chart

To uninstall the `my-release` deployment, use the following command:
36 37

```bash
38
helm uninstall my-release
39 40
```

kelseiv's avatar
kelseiv committed
41
This command removes all Kubernetes components associated with the chart and deletes the release.
42

kelseiv's avatar
kelseiv committed
43
## Configure the chart
44

kelseiv's avatar
kelseiv committed
45
The following table lists configurable parameters, their descriptions, and their default values stored in `values.yaml`.
46 47 48

| Parameter                    | Description                                                                                               | Default                                     |
|:-----------------------------|:----------------------------------------------------------------------------------------------------------|:--------------------------------------------|
kelseiv's avatar
kelseiv committed
49 50
| `image.repository`           | image repository url                                                                                      | quay.io/influxdb/chronograf                 |
| `image.tag`                  | controller container image tag                                                                            | 1.8.0                                       |
51
| `image.pullPolicy`           | controller container image pull policy                                                                    | IfNotPresent                                |
kelseiv's avatar
kelseiv committed
52
| `service.replicas`           | number of replicas for the specified service.type                                                         | 1                                           |
53
| `service.type`               | ClusterIP, NodePort, or LoadBalancer                                                                      | ClusterIP                                   |
kelseiv's avatar
kelseiv committed
54
| `persistence.enabled`        | Use a PVC to persist data                                                                                 | `false`                                     |
55 56 57
| `persistence.storageClass`   | Storage class of backing PVC                                                                              | `nil` (uses alpha storage class annotation) |
| `persistence.accessModes`    | Use volume as ReadOnly or ReadWrite                                                                       | `[ReadWriteOnce]`                           |
| `persistence.size`           | Size of data volume                                                                                       | `8Gi`                                       |
kelseiv's avatar
kelseiv committed
58 59 60 61
| `resources.requests.memory`  | Memory used for resource requests                                                                         | `256Mi`                                     |
| `resources.requests.cpu`     | CPU used for resource requests                                                                            | `0.1`                                       |
| `resources.limits.memory`    | Maximum memory that can be used for resource requests                                                     | `2Gi`                                       |
| `resources.limits.cpu`       | Maximum CPU that can be used for resource requests                                                        | `2`                                         |
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
| `ingress.enabled`            | Enable ingress controller resource                                                                        | false                                       |
| `ingress.hostname`           | Ingress resource hostnames                                                                                | chronograf.foobar.com                       |
| `ingress.tls`                | Ingress TLS configuration                                                                                 | false                                       |
| `ingress.annotations`        | Ingress annotations configuration                                                                         | null                                        |
| `oauth.enabled`              | Need to set to true to use any of the oauth options                                                       | false                                       |
| `oauth.token_secret`         | Used for JWT to support running multiple copies of Chronograf                                             | CHANGE_ME                                   |
| `oauth.github.enabled`       | Enable oauth github                                                                                       | false                                       |
| `oauth.github.client_id`     | oauth github client_id                                                                                    | CHANGE_ME                                   |
| `oauth.github.client_secret` | This is a comma separated list of GH organizations                                                        | CHANGE_ME                                   |
| `oauth.github.gh_orgs`       | oauth github                                                                                              | ""                                          |
| `oauth.google.enabled`       | Enable oauth google                                                                                       | false                                       |
| `oauth.google.client_id`     | oauth google                                                                                              | CHANGE_ME                                   |
| `oauth.google.client_secret` | This is a comma separated list of GH organizations                                                        | CHANGE_ME                                   |
| `oauth.google.public_url`    | oauth google                                                                                              | ""                                          |
| `oauth.google.domains`       | This is a comma separated list of Google Apps domains                                                     | ""                                          |
| `oauth.heroku.enabled`       | Enable oauth heroku                                                                                       | false                                       |
| `oauth.heroku.client_id`     | oauth heroku client_id                                                                                    | CHANGE_ME                                   |
| `oauth.heroku.client_secret` | This is a comma separated list of Heroku organizations                                                    | CHANGE_ME                                   |
| `oauth.heroku.gh_orgs`       | oauth github                                                                                              | ""                                          |
| `env`                        | Extra environment variables that will be passed onto deployment pods                                      | {}                                          |
| `envFromSecret`              | The name of a secret in the same kubernetes namespace which contain values to be added to the environment | {}                                          |
| `nodeSelector`               | Node labels for pod assignment                                                                            | {}                                          |
| `tolerations`                | Toleration labels for pod assignment                                                                      | []                                          |
| `affinity`                   | Affinity settings for pod assignment                                                                      | {}                                          |

kelseiv's avatar
kelseiv committed
87
To configure the chart, do either of the following:
88

kelseiv's avatar
kelseiv committed
89
- Specify each parameter using the `--set key=value[,key=value]` argument to `helm upgrade --install`. For example, use the following command:
90

kelseiv's avatar
kelseiv committed
91 92 93 94 95
  ```bash
  helm upgrade --install my-release \
    --set ingress.enabled=true,ingress.hostname=chronograf.foobar.com \
      influxdata/chronograf
  ```
96

kelseiv's avatar
kelseiv committed
97
- Provide a YAML file that specifies parameter values while installing the chart. For example, use the following command:
98

kelseiv's avatar
kelseiv committed
99 100 101
  ```bash
  helm upgrade --install my-release -f values.yaml influxdata/chronograf
  ```
102

kelseiv's avatar
kelseiv committed
103 104 105
  > **Tip**: Use the default [values.yaml](values.yaml).

For information about running Chronograf in Docker, see the [full image documentation](https://quay.io/influxdb/chronograf).
106 107 108 109 110

## Persistence

The [Chronograf](https://quay.io/influxdb/chronograf) image stores data in the `/var/lib/chronograf` directory in the container.

111
The chart optionally mounts a [Persistent Volume](http://kubernetes.io/docs/user-guide/persistent-volumes/) at this location. The volume is created using dynamic volume provisioning.
112

kelseiv's avatar
kelseiv committed
113
## OAuth using Kubernetes Secret
114

kelseiv's avatar
kelseiv committed
115
Use environment variables to configure OAuth in Chronograf. For more information, see https://docs.influxdata.com/chronograf/latest/administration/managing-security.
116

kelseiv's avatar
kelseiv committed
117
The following example snippet shows a Kubernetes Secret that contains sensitive information (`GOOGLE_CLIENT_ID` and `GOOGLE_CLIENT_SECRET`):
118 119 120 121 122 123 124 125 126 127 128 129 130

```
apiVersion: v1
kind: Secret
metadata:
  name: chronograf-google-env-secrets
  namespace: tick
type: Opaque
data:
    GOOGLE_CLIENT_ID: <BASE64_ENCODED_GOOGLE_CLIENT_ID>
    GOOGLE_CLIENT_SECRET: <BASE64_ENCODED_GOOGLE_CLIENT_SECRET>
```

kelseiv's avatar
kelseiv committed
131
With less sensitive information, such as `GOOGLE_DOMAINS` and `PUBLIC_URL`, use the chart's `envFromSecret` and `env` values. For example, include the following in a values file:
132 133 134 135 136 137 138 139 140

```
[...]
env:
  GOOGLE_DOMAINS: "yourdomain.com"
  PUBLIC_URL: "https://chronograf.yourdomain.com"
envFromSecret: chronograf-google-env-secrets
[...]
```
kelseiv's avatar
kelseiv committed
141 142

Check out our [Slack channel](https://www.influxdata.com/slack) for support and information.