README.md 2.48 KB
Newer Older
kelseiv's avatar
kelseiv committed
1
# Telegraf-operator Helm chart
2

kelseiv's avatar
kelseiv committed
3
> Default installation expects `cert-manager` to be running in the cluster.
4

kelseiv's avatar
kelseiv committed
5
## Prerequisites
6

kelseiv's avatar
kelseiv committed
7 8
- Helm v2 or later
- Kubernetes 1.11+ with Beta APIs enabled
9

kelseiv's avatar
kelseiv committed
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
## Install the chart

1. Add the InfluxData Helm repository:

   ```bash
   helm repo add influxdata https://helm.influxdata.com/
   ```

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

   ```bash
   helm upgrade --install my-release influxdata/telegraf-operator
   ```

   > **Tip**: `--install` can be shortened to `-i`.

   This command deploys Telegraf-operator on the Kubernetes cluster using the default configuration. To find parameters you can configure during installation, see [Configure the chart](#configure-the-chart).

   > **Tip**: To view all Helm chart releases, run `helm list`.

## Uninstall the chart

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

```bash
helm uninstall my-release
36 37
```

kelseiv's avatar
kelseiv committed
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
This command removes all the Kubernetes components associated with the chart and deletes the release.

## Configure the chart

Configurable parameters, their descriptions, and their default values are stored in `values.yaml`.

To configure the chart, do either of the following:

- Specify each parameter using the `--set key=value[,key=value]` argument to `helm upgrade --install`. For example, use the following command:

  ```bash
  helm upgrade --install my-release \
  --set persistence.enabled=true \
    influxdata/telegraf-operator
  ```
  
This command enables persistence.

- Provide a YAML file that specifies parameter values while installing the chart. For example, use the following command:

  ```bash
  helm upgrade --install my-release -f values.yaml influxdata/telegraf-operator
  ```

  > **Tip**: Use the default [values.yaml](values.yaml).

For information about running Telegraf-operator in Docker, see the [full image documentation](https://hub.docker.com/_/kapacitor/).

## Contribute to the chart
67 68 69 70 71

```shell
helm template --namespace=telegraf-operator telegraf-operator .
```

kelseiv's avatar
kelseiv committed
72 73
### Test installation with Kind

74
```shell
75 76 77 78 79 80
kind create cluster --name=telegraf-operator-test
kubectl config use-context kind-telegraf-operator-test
kubectl apply -f tests/influxdb.yml
helm install telegraf-operator .
kubectl apply -f tests/redis.yml
kind delete cluster --name=telegraf-operator-test
81 82
```

83
## Cert-manager integration 
84

85
For better security there is already an integration with cert-manger >0.13 that can be enabled but you have to provide your own instalation of cert-manager in the cluster