mirror of
https://github.com/wahyd4/charts.git
synced 2026-08-09 05:06:29 +10:00
@@ -0,0 +1,22 @@
|
||||
# Patterns to ignore when building packages.
|
||||
# This supports shell glob matching, relative path matching, and
|
||||
# negation (prefixed with !). Only one pattern per line.
|
||||
.DS_Store
|
||||
# Common VCS dirs
|
||||
.git/
|
||||
.gitignore
|
||||
.bzr/
|
||||
.bzrignore
|
||||
.hg/
|
||||
.hgignore
|
||||
.svn/
|
||||
# Common backup files
|
||||
*.swp
|
||||
*.bak
|
||||
*.tmp
|
||||
*~
|
||||
# Various IDEs
|
||||
.project
|
||||
.idea/
|
||||
*.tmproj
|
||||
.vscode/
|
||||
@@ -0,0 +1,18 @@
|
||||
apiVersion: v1
|
||||
appVersion: 1.7.8
|
||||
description: InfluxDB is an open source time-series database designed to handle large write and read loads in real-time.
|
||||
engine: gotpl
|
||||
home: https://www.influxdata.com/products/influxdb-overview/
|
||||
icon: https://bitnami.com/assets/stacks/influxdb/img/influxdb-stack-220x234.png
|
||||
keywords:
|
||||
- influxdb
|
||||
- tick
|
||||
- database
|
||||
- timeseries
|
||||
maintainers:
|
||||
- name: Bitnami
|
||||
email: containers@bitnami.com
|
||||
name: influxdb
|
||||
sources:
|
||||
- https://github.com/bitnami/bitnami-docker-influxdb
|
||||
version: 0.1.0
|
||||
@@ -0,0 +1,348 @@
|
||||
# InfluxDB
|
||||
|
||||
[InfluxDB](ttps://www.influxdata.com/products/influxdb-overview/) is an open source time-series database designed to handle large write and read loads in real-time.
|
||||
|
||||
## TL;DR;
|
||||
|
||||
```console
|
||||
$ helm repo add bitnami https://charts.bitnami.com/bitnami
|
||||
$ helm install bitnami/influxdb
|
||||
```
|
||||
|
||||
## Introduction
|
||||
|
||||
This chart bootstraps a [influxdb](https://github.com/bitnami/bitnami-docker-influxdb) deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
|
||||
|
||||
Bitnami charts can be used with [Kubeapps](https://kubeapps.com/) for deployment and management of Helm Charts in clusters.
|
||||
|
||||
## Installing the Chart
|
||||
|
||||
To install the chart with the release name `my-release`:
|
||||
|
||||
```console
|
||||
$ helm repo add bitnami https://charts.bitnami.com/bitnami
|
||||
$ helm install --name my-release bitnami/influxdb
|
||||
```
|
||||
|
||||
These commands deploy influxdb on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation.
|
||||
|
||||
> **Tip**: List all releases using `helm list`
|
||||
|
||||
## Uninstalling the Chart
|
||||
|
||||
To uninstall/delete the `my-release` statefulset:
|
||||
|
||||
```console
|
||||
$ helm delete my-release
|
||||
```
|
||||
|
||||
The command removes all the Kubernetes components associated with the chart and deletes the release. Use the option `--purge` to delete all history too.
|
||||
|
||||
## Standalone vs High Availability architecture
|
||||
|
||||
You can install the InfluxDB chart with two different architecture setups: `standalone` or `high-availability`
|
||||
|
||||
```console
|
||||
$ helm install --name my-release bitnami/minio --set architecture="standalone"
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
```console
|
||||
$ helm install --name my-release bitnami/minio --set architecture="high-availability"
|
||||
```
|
||||
|
||||
The standalone architecture installs a deployment with one InfluxDB server (it cannot be scaled):
|
||||
|
||||
```
|
||||
┌──────────────────┐
|
||||
│ Ingress │
|
||||
│ Controller │
|
||||
└────────┬─────────┘
|
||||
|
|
||||
│ /query
|
||||
│ /write
|
||||
▼
|
||||
┌────────────────┐
|
||||
│ InfluxDB │
|
||||
| svc │
|
||||
└───────┬────────┘
|
||||
│
|
||||
▼
|
||||
┌──────────┐
|
||||
│ InfluxDB │
|
||||
│ Server │
|
||||
│ Pod │
|
||||
└──────────┘
|
||||
```
|
||||
|
||||
The high availability install a statefulset with N InfluxDB servers and M InfluxDB Relay instances:
|
||||
|
||||
```
|
||||
┌──────────────────┐
|
||||
│ Ingress │
|
||||
│ Controller │
|
||||
└───────┬─┬────────┘
|
||||
│ │
|
||||
│ │
|
||||
┌────────────┘ └─────────────┐
|
||||
│ │
|
||||
│ /write /query │
|
||||
▼ ▼
|
||||
┌────────────────┐ ┌────────────────┐
|
||||
│ InfluxDB Relay │ │ InfluxDB │
|
||||
│ svc │ │ svc │
|
||||
└───────┬─┬──────┘ └─────┬─┬────────┘
|
||||
┌────── │─|───────────────|─│───────┐
|
||||
| │ | | │ ▼
|
||||
┌─────┴────┐ │ | | │ ┌──────────┐
|
||||
│ InfluxDB │ │ | | │ │ InfluxDB │
|
||||
│ Relay │◀─┘ | | └─▶│ Server │
|
||||
│ Pod │ │ │ │ Pod │
|
||||
└─────┬────┘ │ │ └──────────┘
|
||||
| │ │ ▲
|
||||
└─────────│───────────────│─────┐ |
|
||||
│ │ | |
|
||||
┌──────────── │───────────────│───────────┘
|
||||
| │ │ |
|
||||
| │ │ ▼
|
||||
┌─┴────────┐ │ │ ┌──────────┐
|
||||
│ InfluxDB │ │ │ │ InfluxDB │
|
||||
│ Relay │◀───┘ └──▶│ Server │
|
||||
│ Pod │ │ Pod │
|
||||
└─────┬────┘ └──────────┘
|
||||
| ▲
|
||||
└───────────────────────────────────┘
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
The following tables lists the configurable parameters of the InfluxDB chart and their default values.
|
||||
|
||||
| Parameter | Description | Default |
|
||||
| ------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------- |
|
||||
| `global.imageRegistry` | Global Docker image registry | `nil` |
|
||||
| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) |
|
||||
| `global.storageClass` | Global storage class for dynamic provisioning | `nil` |
|
||||
| `image.registry` | InfluxDB image registry | `docker.io` |
|
||||
| `image.repository` | InfluxDB image name | `bitnami/influxdb` |
|
||||
| `image.tag` | InfluxDB image tag | `{TAG_NAME}` |
|
||||
| `image.pullPolicy` | InfluxDB image pull policy | `IfNotPresent` |
|
||||
| `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) |
|
||||
| `image.debug` | Specify if debug logs should be enabled | `false` |
|
||||
| `nameOverride` | String to partially override influxdb.fullname template with a string (will prepend the release name) | `nil` |
|
||||
| `fullnameOverride` | String to fully override influxdb.fullname template with a string | `nil` |
|
||||
| `architecture` | InfluxDB architecture (`standalone` or `high-availability`) | `standalone` |
|
||||
| `database` | Database to be created on first run | `my_database` |
|
||||
| `authEnabled` | Enable/disable authentication | `true` |
|
||||
| `adminUser.user` | InfluxDB admin user | `admin` |
|
||||
| `adminUser.pwd` | InfluxDB admin user's password | `nil` |
|
||||
| `adminUser.usePasswordFile` | Mount admin user's password as file instead of environment variable | `false` |
|
||||
| `user.user` | InfluxDB user with 'admin' privileges on the db specified at `database` | `nil` |
|
||||
| `user.pwd` | InfluxDB password for `user.user` user | `nil` |
|
||||
| `user.usePasswordFile` | Mount `user.user` user's password as file instead of environment variable | `nil` |
|
||||
| `readUser.user` | InfluxDB user with 'read' privileges on the db specified at `database` | `nil` |
|
||||
| `readUser.pwd` | InfluxDB password for `readUser.user` user | `nil` |
|
||||
| `readUser.usePasswordFile` | Mount `readUser.user` user's password as file instead of environment variable | `nil` |
|
||||
| `writeUser.user` | InfluxDB user with 'write' privileges on the db specified at `database` | `nil` |
|
||||
| `writeUser.pwd` | InfluxDB password for `writeUser.user` user | `nil` |
|
||||
| `writeUser.usePasswordFile` | Mount `writeUser.user` user's password as file instead of environment variable | `nil` |
|
||||
| `existingSecret` | Name of existing Secret object with InfluxDB credentials (`adminUser.password`, `user.password`, `readUser.password`, and `writeUser.pwd` will be ignored and picked up from this secret) | `nil` |
|
||||
| `influxdb.configuration` | Specify content for influxdb.conf | `nil (do not create influxdb.conf)` |
|
||||
| `influxdb.existingConfiguration` | Name of existing ConfigMap object with the InfluxDB configuration (`influxdb.configuration` will be ignored). | `nil` |
|
||||
| `influxdb.initdbScripts` | Dictionary of initdb scripts | `nil` |
|
||||
| `influxdb.initdbScriptsCM` | Name of existing ConfigMap object with the initdb scripts (`influxdb.initdbScripts` will be ignored). | `nil` |
|
||||
| `influxdb.extraEnvVars` | Array containing extra env vars to configure InfluxDB | `nil` |
|
||||
| `influxdb.replicaCount` | The number of InfluxDB replicas to deploy | `1` |
|
||||
| `influxdb.antiAffinity` | Pod anti-affinity policy | `soft` |
|
||||
| `influxdb.nodeAffinity` | Node affinity policy | `{}` (The value is evaluated as a template) |
|
||||
| `influxdb.nodeSelector` | Node labels for pod assignment | `{}` (The value is evaluated as a template) |
|
||||
| `influxdb.tolerations` | Tolerations for pod assignment | `[]` (The value is evaluated as a template) |
|
||||
| `influxdb.securityContext.enabled` | Enable security context for InfluxDB | `true` |
|
||||
| `influxdb.securityContext.fsGroup` | Group ID for the InfluxDB filesystem | `1001` |
|
||||
| `influxdb.securityContext.runAsUser` | User ID for the InfluxDB container | `1001` |
|
||||
| `influxdb.resources` | The [resources] to allocate for container | `{}` |
|
||||
| `influxdb.livenessProbe` | Liveness probe configuration for InfluxDB | `Check values.yaml file` |
|
||||
| `influxdb.readinessProbe` | Readiness probe configuration for InfluxDB | `Check values.yaml file` |
|
||||
| `influxdb.service.type` | Kubernetes service type (`ClusterIP`, `NodePort` or `LoadBalancer`) | `ClusterIP` |
|
||||
| `influxdb.service.port` | InfluxDB HTTP port | `8086` |
|
||||
| `influxdb.service.rcpPort` | InfluxDB RCP port | `8088` |
|
||||
| `influxdb.service.annotations` | Annotations for InfluxDB service | `{}` |
|
||||
| `influxdb.service.loadBalancerIP` | loadBalancerIP if service type is `LoadBalancer` | `nil` |
|
||||
| `influxdb.service.loadBalancerSourceRanges` | Address that are allowed when service is LoadBalancer | `[]` |
|
||||
| `influxdb.service.clusterIP` | Static clusterIP or None for headless services | `nil` |
|
||||
| `relay.image.registry` | InfluxDB Relay image registry | `docker.io` |
|
||||
| `relay.image.repository` | InfluxDB Relay image name | `bitnami/influxdb-relay` |
|
||||
| `relay.image.tag` | InfluxDB Relay image tag | `{TAG_NAME}` |
|
||||
| `relay.image.pullPolicy` | InfluxDB Relay image pull policy | `IfNotPresent` |
|
||||
| `relay.image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) |
|
||||
| `relay.configuration` | Specify content for relay.toml | `Check values.yaml file` |
|
||||
| `relay.existingConfiguration` | Name of existing ConfigMap object with the InfluxDB Relay configuration (`relay.configuration` will be ignored). | `nil` |
|
||||
| `relay.replicaCount` | The number of InfluxDB Relay replicas to deploy | `1` |
|
||||
| `relay.antiAffinity` | Pod anti-affinity policy | `soft` |
|
||||
| `relay.nodeAffinity` | Node affinity policy | `{}` (The value is evaluated as a template) |
|
||||
| `relay.nodeSelector` | Node labels for pod assignment | `{}` (The value is evaluated as a template) |
|
||||
| `relay.tolerations` | Tolerations for pod assignment | `[]` (The value is evaluated as a template) |
|
||||
| `relay.securityContext.enabled` | Enable security context for InfluxDB Relay | `true` |
|
||||
| `relay.securityContext.fsGroup` | Group ID for the InfluxDB Relay filesystem | `1001` |
|
||||
| `relay.securityContext.runAsUser` | User ID for the InfluxDB Relay container | `1001` |
|
||||
| `relay.resources` | The [resources] to allocate for container | `{}` |
|
||||
| `relay.livenessProbe` | Liveness probe configuration for InfluxDB Relay | `Check values.yaml file` |
|
||||
| `relay.readinessProbe` | Readiness probe configuration for InfluxDB Relay | `Check values.yaml file` |
|
||||
| `relay.service.type` | Kubernetes service type (`ClusterIP`, `NodePort` or `LoadBalancer`) | `ClusterIP` |
|
||||
| `relay.service.port` | InfluxDB Relay HTTP port | `9096` |
|
||||
| `relay.service.annotations` | Annotations for InfluxDB Relay service | `{}` |
|
||||
| `relay.service.loadBalancerIP` | loadBalancerIP if service type is `LoadBalancer` | `nil` |
|
||||
| `relay.service.loadBalancerSourceRanges` | Address that are allowed when service is LoadBalancer | `[]` |
|
||||
| `relay.service.clusterIP` | Static clusterIP or None for headless services | `nil` |
|
||||
| `ingress.enabled` | Enable ingress controller resource | `false` |
|
||||
| `ingress.certManager` | Add annotations for cert-manager | `false` |
|
||||
| `ingress.annotations` | Ingress annotations | `[]` |
|
||||
| `ingress.hosts[0].name` | Hostname for InfluxDB service | `influxdb.local` |
|
||||
| `ingress.hosts[0].path` | Path within the url structure | `/` |
|
||||
| `ingress.tls[0].hosts[0]` | TLS hosts | `influxdb.local` |
|
||||
| `ingress.tls[0].secretName` | TLS Secret (certificates) | `influxdb.local-tls` |
|
||||
| `ingress.secrets[0].name` | TLS Secret Name | `nil` |
|
||||
| `ingress.secrets[0].certificate` | TLS Secret Certificate | `nil` |
|
||||
| `ingress.secrets[0].key` | TLS Secret Key | `nil` |
|
||||
| `networkPolicy.enabled` | Enable NetworkPolicy | `false` |
|
||||
| `networkPolicy.allowExternal` | Don't require client label for connections | `true` |
|
||||
| `persistence.enabled` | Enable data persistence | `true` |
|
||||
| `persistence.existingClaim` | Use a existing PVC which must be created manually before bound | `nil` |
|
||||
| `persistence.storageClass` | Specify the `storageClass` used to provision the volume | `nil` |
|
||||
| `persistence.accessMode` | Access mode of data volume | `ReadWriteOnce` |
|
||||
| `persistence.size` | Size of data volume | `8Gi` |
|
||||
| `volumePermissions.enabled` | Enable init container that changes the owner and group of the persistent volume mountpoint to `runAsUser:fsGroup` | `false` |
|
||||
| `volumePermissions.image.registry` | Init container volume-permissions image registry | `docker.io` |
|
||||
| `volumePermissions.image.repository` | Init container volume-permissions image name | `bitnami/minideb` |
|
||||
| `volumePermissions.image.tag` | Init container volume-permissions image tag | `stretch` |
|
||||
| `volumePermissions.image.pullPolicy` | Init container volume-permissions image pull policy | `Always` |
|
||||
| `volumePermissions.image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) |
|
||||
|
||||
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
|
||||
|
||||
```console
|
||||
$ helm install --name my-release \
|
||||
--set adminUser.user=admin-user bitnami/influxdb
|
||||
```
|
||||
|
||||
The above command sets the InfluxDB admin user to `admin-user`.
|
||||
|
||||
Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,
|
||||
|
||||
```console
|
||||
$ helm install --name my-release -f values.yaml bitnami/influxdb
|
||||
```
|
||||
|
||||
> **Tip**: You can use the default [values.yaml](values.yaml)
|
||||
|
||||
### Configure the way how to expose InfluxDB
|
||||
|
||||
- **Ingress**: The ingress controller must be installed in the Kubernetes cluster. Set `ingress.enabled=true` to expose InfluxDB through Ingress.
|
||||
- **ClusterIP**: Exposes the service on a cluster-internal IP. Choosing this value makes the service only reachable from within the cluster. Set `influxdb.service.type=ClusterIP` to choose this service type.
|
||||
- **NodePort**: Exposes the service on each Node's IP at a static port (the NodePort). You’ll be able to contact the NodePort service, from outside the cluster, by requesting `NodeIP:NodePort`. Set `influxdb.service.type=NodePort` to choose this service type.
|
||||
- **LoadBalancer**: Exposes the service externally using a cloud provider's load balancer. Set `influxdb.service.type=LoadBalancer` to choose this service type.
|
||||
|
||||
### Adjust permissions of persistent volume mountpoint
|
||||
|
||||
As the images run as non-root by default, it is necessary to adjust the ownership of the persistent volumes so that the containers can write data into it.
|
||||
|
||||
By default, the chart is configured to use Kubernetes Security Context to automatically change the ownership of the volume. However, this feature does not work in all Kubernetes distributions.
|
||||
As an alternative, this chart supports using an initContainer to change the ownership of the volume before mounting it in the final destination.
|
||||
|
||||
You can enable this initContainer by setting `volumePermissions.enabled` to `true`.
|
||||
|
||||
### Production configuration and horizontal scaling
|
||||
|
||||
This chart includes a `values-production.yaml` file where you can find some parameters oriented to production configuration in comparison to the regular `values.yaml`:
|
||||
|
||||
- Use the `high-availability` architecture:
|
||||
|
||||
```diff
|
||||
- architecture: standalone
|
||||
+ architecture: high-availability
|
||||
```
|
||||
|
||||
- Increase the number of InfluxDB and InfluxDB Relay replicas:
|
||||
|
||||
```diff
|
||||
- influxdb.replicaCount: 1
|
||||
+ influxdb.replicaCount: 3
|
||||
- relay.replicaCount: 1 # were actually ignored in standalone architecture
|
||||
+ relay.replicaCount: 2
|
||||
```
|
||||
|
||||
- Enable Newtworkpolicy blocking external access:
|
||||
|
||||
```diff
|
||||
- networkPolicy.enabled: false
|
||||
+ networkPolicy.enabled: true
|
||||
- networkPolicy.allowExternal: true
|
||||
+ networkPolicy.allowExternal: false
|
||||
```
|
||||
|
||||
To horizontally scale this chart once it has been deployed (only available in the `high-availability` architecture):
|
||||
|
||||
```console
|
||||
$ helm upgrade my-release bitnami/influxdb \
|
||||
-f ./values-production.yaml \
|
||||
--set influxdb.replicaCount=3 \
|
||||
--set relay.replicaCount=2
|
||||
```
|
||||
|
||||
> **Note**: Scaling the statefulset with `kubectl scale ...` command is discouraged. Use `helm upgrade ...` for horizontal scaling to ensure the InfluxDB Relay configuration is refreshed and aware of the new pods.
|
||||
|
||||
### [Rolling VS Immutable tags](https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/)
|
||||
|
||||
It is strongly recommended to use immutable tags in a production environment. This ensures your deployment does not change automatically if the same tag is updated with a different image.
|
||||
|
||||
Bitnami will release a new chart updating its containers if a new version of the main container, significant changes, or critical vulnerabilities exist.
|
||||
|
||||
### Using custom configuration
|
||||
|
||||
This helm chart supports to customize the whole configuration file.
|
||||
|
||||
Add your custom configuration file to "files/conf" in your working directory. This file will be mounted as a configMap to the containers and it will be used for configuring InfluxDB.
|
||||
|
||||
Alternatively, you can specify the InfluxDB configuration using the `influxdb.configuration` parameter.
|
||||
|
||||
In addition to these options, you can also set an external ConfigMap with all the configuration files. This is done by setting the `influxdb.existingConfiguration` parameter. Note that this will override the two previous options.
|
||||
|
||||
### Adding extra environment variables
|
||||
|
||||
In case you want to add extra environment variables, you can use the `influxdb.extraEnvVars` property.
|
||||
|
||||
```yaml
|
||||
extraEnvVars:
|
||||
- name: INFLUXDB_DATA_QUERY_LOG_ENABLED
|
||||
value: "true"
|
||||
```
|
||||
|
||||
### Initialize a fresh instance
|
||||
|
||||
The [Bitnami InfluxDB](https://github.com/bitnami/bitnami-docker-influxdb) image allows you to use your custom scripts to initialize a fresh instance. In order to execute the scripts, they must be located inside the chart folder `files/docker-entrypoint-initdb.d` so they can be consumed as a ConfigMap.
|
||||
|
||||
Alternatively, you can specify custom scripts using the `influxdb.initdbScripts` parameter.
|
||||
|
||||
In addition to these options, you can also set an external ConfigMap with all the initialization scripts. This is done by setting the `influxdb.initdbScriptsCM` parameter. Note that this will override the two previous options. parameter.
|
||||
|
||||
The allowed extensions are `.sh`, and `.txt`.
|
||||
|
||||
### Persistence
|
||||
|
||||
The data is persisted by default using PVC(s). You can disable the persistence setting the `persistence.enabled` parameter to `false`.
|
||||
A default `StorageClass` is needed in the Kubernetes cluster to dynamically provision the volumes. Specify another StorageClass in the `persistence.storageClass` or set `persistence.existingClaim` if you have already existing persistent volumes to use.
|
||||
|
||||
## Upgrade
|
||||
|
||||
It's necessary to specify the existing passwords while performing a upgrade to ensure the secrets are not updated with invalid randomly generated passwords. Remember to specify the existing values of the `adminUser.pwd`, `user.pwd`, `readUser.pwd` and `writeUser.pwd` parameters when upgrading the chart:
|
||||
|
||||
```bash
|
||||
$ helm upgrade my-release bitnami/influxdb \
|
||||
--set adminUser.pwd=[ADMIN_USER_PASSWORD] \
|
||||
--set user.pwd=[USER_PASSWORD] \
|
||||
--set readUser.pwd=[READ_USER_PASSWORD] \
|
||||
--set writeUser.pwd=[WRITE_USER_PASSWORD]
|
||||
```
|
||||
|
||||
> Note: you need to substitute the placeholders _[ADMIN_USER_PASSWORD]_, _[USER_PASSWORD]_, _[READ_USER_PASSWORD]_, and _[WRITE_USER_PASSWORD]_ with the values obtained from instructions in the installation notes.
|
||||
@@ -0,0 +1,6 @@
|
||||
Place your InfluxDB and InfluxDB Relay configuration files here. These will not be used in case the values *existingConfiguration*, *relay.existingConfiguration* are used.
|
||||
|
||||
More information can be found in the links below:
|
||||
|
||||
- [InfluxDB Configuration File](https://github.com/bitnami/bitnami-docker-influxdb#configuration-file)
|
||||
- [InfluxDB Relay Configuration File](https://github.com/bitnami/bitnami-docker-influxdb-relay#configuration-file)
|
||||
@@ -0,0 +1,3 @@
|
||||
You can copy here your custom `.sh` or `.txt` files so they are executed during the first boot of the image.
|
||||
|
||||
More info in the [bitnami-docker-influxdb](https://github.com/bitnami/bitnami-docker-influxdb#initializing-a-new-instance) repository.
|
||||
@@ -0,0 +1,144 @@
|
||||
|
||||
** Please be patient while the chart is being deployed **
|
||||
|
||||
{{- if eq .Values.architecture "high-availability" }}
|
||||
|
||||
InfluxDB can be accessed through following DNS names from within your cluster:
|
||||
|
||||
InfluxDB Relay (write operations): {{ include "influxdb.fullname" . }}-relay.{{ .Release.Namespace }}.svc.cluster.local (port {{ .Values.relay.service.port }})
|
||||
InfluxDB servers (read operations): {{ include "influxdb.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local (port {{ .Values.influxdb.service.port }})
|
||||
|
||||
InfluxDB Relay acts as a load balancer for InfluxDB and forward POST requests to InfluxDB servers.
|
||||
|
||||
{{- else }}
|
||||
|
||||
InfluxDB server can be accessed on the following DNS name from within your cluster:
|
||||
|
||||
{{ include "influxdb.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local (port {{ .Values.influxdb.service.port }})
|
||||
|
||||
{{- end }}
|
||||
{{- if .Values.authEnabled }}
|
||||
|
||||
To get the password for the {{ .Values.adminUser.user }} user, run:
|
||||
|
||||
export ADMIN_PASSWORD=$(kubectl get secret --namespace {{ .Release.Namespace }} {{ include "influxdb.secretName" . }} -o jsonpath="{.data.admin-user-password}" | base64 --decode)
|
||||
|
||||
{{- if .Values.user.user }}
|
||||
|
||||
To get the password for the {{ .Values.user.user }} user, run:
|
||||
|
||||
export USER_PASSWORD=$(kubectl get secret --namespace {{ .Release.Namespace }} {{ include "influxdb.secretName" . }} -o jsonpath="{.data.user-password}" | base64 --decode)
|
||||
|
||||
{{- end }}
|
||||
{{- if .Values.readUser.user }}
|
||||
|
||||
To get the password for the {{ .Values.readUser.user }} user, run:
|
||||
|
||||
export READ_USER_PASSWORD=$(kubectl get secret --namespace {{ .Release.Namespace }} {{ include "influxdb.secretName" . }} -o jsonpath="{.data.read-user-password}" | base64 --decode)
|
||||
|
||||
{{- end }}
|
||||
{{- if .Values.writeUser.user }}
|
||||
|
||||
To get the password for the {{ .Values.writeUser.user }} user, run:
|
||||
|
||||
export WRITE_USER_PASSWORD=$(kubectl get secret --namespace {{ .Release.Namespace }} {{ include "influxdb.secretName" . }} -o jsonpath="{.data.write-user-password}" | base64 --decode)
|
||||
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
To connect to your database run the following commands:
|
||||
|
||||
{{- if eq .Values.architecture "high-availability" }}
|
||||
|
||||
(write operations):
|
||||
|
||||
kubectl run {{ include "influxdb.fullname" . }}-client --rm --tty -i --restart='Never' --namespace {{ .Release.Namespace }} {{ if .Values.authEnabled }}--env="INFLUX_USERNAME={{ .Values.adminUser.user }}" --env="INFLUX_PASSWORD=$ADMIN_PASSWORD"{{ end }} \
|
||||
{{ if and (.Values.networkPolicy.enabled) (not .Values.networkPolicy.allowExternal) }}--labels="{{ include "influxdb.fullname" . }}-client=true" {{ end }}--image bitnami/influxdb:1 \
|
||||
--command -- influx -host {{ include "influxdb.fullname" . }}-relay -port {{ .Values.relay.service.port }}
|
||||
|
||||
(read operations):
|
||||
|
||||
{{- end }}
|
||||
|
||||
kubectl run {{ include "influxdb.fullname" . }}-client --rm --tty -i --restart='Never' --namespace {{ .Release.Namespace }} {{ if .Values.authEnabled }}--env="INFLUX_USERNAME={{ .Values.adminUser.user }}" --env="INFLUX_PASSWORD=$ADMIN_PASSWORD"{{ end }} \
|
||||
{{ if and (.Values.networkPolicy.enabled) (not .Values.networkPolicy.allowExternal) }}--labels="{{ include "influxdb.fullname" . }}-client=true" {{ end }}--image bitnami/influxdb:1 \
|
||||
--command -- influx -host {{ include "influxdb.fullname" . }} -port {{ .Values.influxdb.service.port }}
|
||||
|
||||
{{- if and (.Values.networkPolicy.enabled) (not .Values.networkPolicy.allowExternal) }}
|
||||
|
||||
Note: Since NetworkPolicy is enabled, only pods with label "{{ include "influxdb.fullname" . }}-client=true" will be able to connect to InfluxDB server(s).
|
||||
|
||||
{{- end }}
|
||||
|
||||
To connect to your database from outside the cluster execute the following commands:
|
||||
|
||||
{{- if .Values.ingress.enabled }}
|
||||
{{- $ingressHost := first .Values.ingress.hosts }}
|
||||
|
||||
You should be able to access your new InfluxDB server(s) through:
|
||||
|
||||
{{- range .Values.ingress.hosts }}
|
||||
{{ if .tls }}https{{- else }}http{{ end }}://{{ .name }}
|
||||
{{- end }}
|
||||
|
||||
e.g.:
|
||||
|
||||
{{ if .Values.authEnabled }}INFLUX_USERNAME="{{ .Values.adminUser.user }}" INFLUX_PASSWORD="$ADMIN_PASSWORD"{{ end }} influx -host {{ $ingressHost.name }} -port 80
|
||||
|
||||
{{- else if contains "NodePort" .Values.influxdb.service.type }}
|
||||
|
||||
{{- if eq .Values.architecture "high-availability" }}
|
||||
|
||||
(write operations):
|
||||
|
||||
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "influxdb.fullname" . }}-relay)
|
||||
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
|
||||
{{- if .Values.authEnabled }}INFLUX_USERNAME="{{ .Values.adminUser.user }}" INFLUX_PASSWORD="$ADMIN_PASSWORD"{{- end }} influx -host $NODE_IP -port $NODE_PORT
|
||||
|
||||
(read operations):
|
||||
|
||||
{{- end }}
|
||||
|
||||
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "influxdb.fullname" . }})
|
||||
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
|
||||
{{- if .Values.authEnabled }}INFLUX_USERNAME="{{ .Values.adminUser.user }}" INFLUX_PASSWORD="$ADMIN_PASSWORD"{{- end }} influx -host $NODE_IP -port $NODE_PORT
|
||||
|
||||
{{- else if contains "LoadBalancer" .Values.influxdb.service.type }}
|
||||
|
||||
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
|
||||
Watch the status with: 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "influxdb.fullname" . }}-relay'
|
||||
|
||||
{{- if eq .Values.architecture "high-availability" }}
|
||||
|
||||
(write operations):
|
||||
|
||||
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "influxdb.fullname" . }}-relay -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
|
||||
{{- if .Values.authEnabled }}INFLUX_USERNAME="{{ .Values.adminUser.user }}" INFLUX_PASSWORD="$ADMIN_PASSWORD"{{- end }} influx -host $SERVICE_IP -port {{ .Values.relay.service.port }}
|
||||
|
||||
(read operations):
|
||||
|
||||
{{- end }}
|
||||
|
||||
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "influxdb.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
|
||||
{{- if .Values.authEnabled }}INFLUX_USERNAME="{{ .Values.adminUser.user }}" INFLUX_PASSWORD="$ADMIN_PASSWORD"{{- end }} influx -host $SERVICE_IP -port {{ .Values.influxdb.service.port }}
|
||||
|
||||
{{- else if contains "ClusterIP" .Values.influxdb.service.type }}
|
||||
|
||||
{{- if eq .Values.architecture "high-availability" }}
|
||||
|
||||
(write operations):
|
||||
|
||||
kubectl port-forward svc/{{ include "influxdb.fullname" . }}-relay 9096:{{ .Values.relay.service.port }} &
|
||||
{{- if .Values.authEnabled }}INFLUX_USERNAME="{{ .Values.adminUser.user }}" INFLUX_PASSWORD="$ADMIN_PASSWORD"{{- end }} influx -host 127.0.0.1 -port 9096
|
||||
|
||||
(read operations):
|
||||
|
||||
{{- end }}
|
||||
|
||||
kubectl port-forward svc/{{ include "influxdb.fullname" . }} 8086:{{ .Values.influxdb.service.port }} &
|
||||
{{- if .Values.authEnabled }}INFLUX_USERNAME="{{ .Values.adminUser.user }}" INFLUX_PASSWORD="$ADMIN_PASSWORD"{{- end }} influx -host 127.0.0.1 -port 8086
|
||||
|
||||
{{- end }}
|
||||
|
||||
{{- include "influxdb.validateValues" . }}
|
||||
{{- include "influxdb.checkRollingTags" . }}
|
||||
@@ -0,0 +1,295 @@
|
||||
{{/* vim: set filetype=mustache: */}}
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "influxdb.name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
If release name contains chart name it will be used as a full name.
|
||||
*/}}
|
||||
{{- define "influxdb.fullname" -}}
|
||||
{{- if .Values.fullnameOverride -}}
|
||||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||
{{- if contains $name .Release.Name -}}
|
||||
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create chart name and version as used by the chart label.
|
||||
*/}}
|
||||
{{- define "influxdb.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Common labels
|
||||
*/}}
|
||||
{{- define "influxdb.labels" -}}
|
||||
app.kubernetes.io/name: {{ include "influxdb.name" . }}
|
||||
helm.sh/chart: {{ include "influxdb.chart" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Labels to use on deploy.spec.selector.matchLabels and svc.spec.selector
|
||||
*/}}
|
||||
{{- define "influxdb.matchLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "influxdb.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the proper InfluxDB image name
|
||||
*/}}
|
||||
{{- define "influxdb.image" -}}
|
||||
{{- $registryName := .Values.image.registry -}}
|
||||
{{- $repositoryName := .Values.image.repository -}}
|
||||
{{- $tag := .Values.image.tag | toString -}}
|
||||
{{/*
|
||||
Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
|
||||
but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic.
|
||||
Also, we can't use a single if because lazy evaluation is not an option
|
||||
*/}}
|
||||
{{- if .Values.global }}
|
||||
{{- if .Values.global.imageRegistry }}
|
||||
{{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the proper InfluxDB Relay image name
|
||||
*/}}
|
||||
{{- define "influxdb.relay.image" -}}
|
||||
{{- $registryName := .Values.relay.image.registry -}}
|
||||
{{- $repositoryName := .Values.relay.image.repository -}}
|
||||
{{- $tag := .Values.relay.image.tag | toString -}}
|
||||
{{/*
|
||||
Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
|
||||
but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic.
|
||||
Also, we can't use a single if because lazy evaluation is not an option
|
||||
*/}}
|
||||
{{- if .Values.global }}
|
||||
{{- if .Values.global.imageRegistry }}
|
||||
{{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the proper init container volume-permissions image name
|
||||
*/}}
|
||||
{{- define "influxdb.volumePermissions.image" -}}
|
||||
{{- $registryName := .Values.volumePermissions.image.registry -}}
|
||||
{{- $repositoryName := .Values.volumePermissions.image.repository -}}
|
||||
{{- $tag := .Values.volumePermissions.image.tag | toString -}}
|
||||
{{/*
|
||||
Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
|
||||
but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic.
|
||||
Also, we can't use a single if because lazy evaluation is not an option
|
||||
*/}}
|
||||
{{- if .Values.global }}
|
||||
{{- if .Values.global.imageRegistry }}
|
||||
{{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the proper Docker Image Registry Secret Names
|
||||
*/}}
|
||||
{{- define "influxdb.imagePullSecrets" -}}
|
||||
{{/*
|
||||
Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
|
||||
but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic.
|
||||
Also, we can not use a single if because lazy evaluation is not an option
|
||||
*/}}
|
||||
{{- if .Values.global }}
|
||||
{{- if .Values.global.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- range .Values.global.imagePullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- else if or .Values.image.pullSecrets .Values.relay.image.pullSecrets .Values.volumePermissions.image.pullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- range .Values.image.pullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- range .Values.relay.image.pullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- range .Values.volumePermissions.image.pullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
{{- else if or .Values.image.pullSecrets .Values.relay.image.pullSecrets .Values.volumePermissions.image.pullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- range .Values.image.pullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- range .Values.relay.image.pullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- range .Values.volumePermissions.image.pullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the InfluxDB credentials secret.
|
||||
*/}}
|
||||
{{- define "influxdb.secretName" -}}
|
||||
{{- if .Values.existingSecret -}}
|
||||
{{- printf "%s" (tpl .Values.existingSecret $) -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s" (include "influxdb.fullname" .) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the InfluxDB configuration configmap.
|
||||
*/}}
|
||||
{{- define "influxdb.configmapName" -}}
|
||||
{{- if .Values.influxdb.existingConfiguration -}}
|
||||
{{- printf "%s" (tpl .Values.influxdb.existingConfiguration $) -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s" (include "influxdb.fullname" .) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the InfluxDB configuration configmap.
|
||||
*/}}
|
||||
{{- define "influxdb.initdbScriptsConfigmapName" -}}
|
||||
{{- if .Values.influxdb.initdbScriptsCM -}}
|
||||
{{- printf "%s" (tpl .Values.influxdb.initdbScriptsCM $) -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s-initdb-scripts" (include "influxdb.fullname" .) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the InfluxDB configuration configmap.
|
||||
*/}}
|
||||
{{- define "influxdb.relay.configmapName" -}}
|
||||
{{- if .Values.relay.existingConfiguration -}}
|
||||
{{- printf "%s" (tpl .Values.relay.existingConfiguration $) -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s-relay" (include "influxdb.fullname" .) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the proper Storage Class for InfluxDB
|
||||
*/}}
|
||||
{{- define "influxdb.storageClass" -}}
|
||||
{{/*
|
||||
Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
|
||||
but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic.
|
||||
*/}}
|
||||
{{- if .Values.global -}}
|
||||
{{- if .Values.global.storageClass -}}
|
||||
{{- if (eq "-" .Values.global.storageClass) -}}
|
||||
{{- printf "storageClassName: \"\"" -}}
|
||||
{{- else }}
|
||||
{{- printf "storageClassName: %s" .Values.global.storageClass -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- if .Values.persistence.storageClass -}}
|
||||
{{- if (eq "-" .Values.persistence.storageClass) -}}
|
||||
{{- printf "storageClassName: \"\"" -}}
|
||||
{{- else }}
|
||||
{{- printf "storageClassName: %s" .Values.persistence.storageClass -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- if .Values.persistence.storageClass -}}
|
||||
{{- if (eq "-" .Values.persistence.storageClass) -}}
|
||||
{{- printf "storageClassName: \"\"" -}}
|
||||
{{- else }}
|
||||
{{- printf "storageClassName: %s" .Values.persistence.storageClass -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the appropriate apiVersion for networkPolicy
|
||||
*/}}
|
||||
{{- define "influxdb.networkPolicy.apiVersion" -}}
|
||||
{{- if semverCompare ">=1.4-0, <1.7-0" .Capabilities.KubeVersion.GitVersion -}}
|
||||
"extensions/v1beta1"
|
||||
{{- else if semverCompare "^1.7-0" .Capabilities.KubeVersion.GitVersion -}}
|
||||
"networking.k8s.io/v1"
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Check if there are rolling tags in the images
|
||||
*/}}
|
||||
{{- define "influxdb.checkRollingTags" -}}
|
||||
{{- if and (contains "bitnami/" .Values.image.repository) (not (.Values.image.tag | toString | regexFind "-r\\d+$|sha256:")) }}
|
||||
WARNING: Rolling tag detected ({{ .Values.image.repository }}:{{ .Values.image.tag }}), please note that it is strongly recommended to avoid using rolling tags in a production environment.
|
||||
+info https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Compile all warnings into a single message, and call fail.
|
||||
*/}}
|
||||
{{- define "influxdb.validateValues" -}}
|
||||
{{- $messages := list -}}
|
||||
{{- $messages := append $messages (include "influxdb.validateValues.architecture" .) -}}
|
||||
{{- $messages := append $messages (include "influxdb.validateValues.replicaCount" .) -}}
|
||||
{{- $messages := without $messages "" -}}
|
||||
{{- $message := join "\n" $messages -}}
|
||||
|
||||
{{- if $message -}}
|
||||
{{- printf "\nVALUES VALIDATION:\n%s" $message | fail -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/* Validate values of InfluxDB - must provide a valid architecture */}}
|
||||
{{- define "influxdb.validateValues.architecture" -}}
|
||||
{{- if and (ne .Values.architecture "standalone") (ne .Values.architecture "high-availability") -}}
|
||||
influxdb: architecture
|
||||
Invalid architecture selected. Valid values are "standalone" and
|
||||
"high-availability". Please set a valid architecture (--set architecture="xxxx")
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/* Validate values of InfluxDB - number of replicas */}}
|
||||
{{- define "influxdb.validateValues.replicaCount" -}}
|
||||
{{- $replicaCount := int .Values.influxdb.replicaCount }}
|
||||
{{- if and (eq .Values.architecture "standalone") (gt $replicaCount 1) -}}
|
||||
influxdb: replicaCount
|
||||
The standalone architecture doesn't allow to run more than 1 replica!!
|
||||
Please set a valid number of replicas (--set influxdb.replicaCount=1) or
|
||||
use the "high-availability" architecture (--set architecture="high-availability")
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,16 @@
|
||||
{{- if and (or (.Files.Glob "files/conf/influxdb.conf") .Values.influxdb.configuration) (not .Values.influxdb.existingConfiguration) }}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ include "influxdb.fullname" . }}
|
||||
labels: {{ include "influxdb.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: influxdb
|
||||
data:
|
||||
{{- if (.Files.Glob "files/conf/influxdb.conf") }}
|
||||
{{ (.Files.Glob "iles/conf/influxdb.conf").AsConfig | indent 2 }}
|
||||
{{- else if .Values.influxdb.configuratio }}
|
||||
influxdb.conf: |-
|
||||
# User-supplied configuration:
|
||||
{{ tpl .Values.influxdb.configuration . | indent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,15 @@
|
||||
{{- if and (or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,txt}") .Values.influxdb.initdbScripts) (not .Values.influxdb.initdbScriptsCM) }}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ include "influxdb.fullname" . }}-initdb-scripts
|
||||
labels: {{ include "influxdb.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: influxdb
|
||||
data:
|
||||
{{- with .Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,txt}" }}
|
||||
{{ .AsConfig | indent 2 }}
|
||||
{{- end }}
|
||||
{{- with .Values.initdbScripts }}
|
||||
{{ tpl (toYaml .) $ | indent 2 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,16 @@
|
||||
{{- if and (eq .Values.architecture "standalone") .Values.persistence.enabled (not .Values.persistence.existingClaim) }}
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: {{ include "influxdb.fullname" . }}
|
||||
labels: {{ include "influxdb.labels" . | nindent 4 }}
|
||||
spec:
|
||||
accessModes:
|
||||
{{- range .Values.persistence.accessModes }}
|
||||
- {{ . | quote }}
|
||||
{{- end }}
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.persistence.size | quote }}
|
||||
{{ include "influxdb.storageClass" . }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,19 @@
|
||||
{{- if (not .Values.existingSecret) -}}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ include "influxdb.fullname" . }}
|
||||
labels: {{ include "influxdb.labels" . | nindent 4 }}
|
||||
type: Opaque
|
||||
data:
|
||||
admin-user-password: {{ ternary (randAlphaNum 10) .Values.adminUser.pwd (empty .Values.adminUser.pwd) | b64enc | quote }}
|
||||
{{- if .Values.user.user }}
|
||||
user-password: {{ ternary (randAlphaNum 10) .Values.user.pwd (empty .Values.user.pwd) | b64enc | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.readUser.user }}
|
||||
read-user-password: {{ ternary (randAlphaNum 10) .Values.readUser.pwd (empty .Values.readUser.pwd) | b64enc | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.writeUser.user }}
|
||||
write-user-password: {{ ternary (randAlphaNum 10) .Values.writeUser.pwd (empty .Values.writeUser.pwd) | b64enc | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,20 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "influxdb.fullname" . }}-headless
|
||||
labels: {{ include "influxdb.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: influxdb
|
||||
spec:
|
||||
type: ClusterIP
|
||||
clusterIP: None
|
||||
ports:
|
||||
- port: {{ .Values.influxdb.service.port }}
|
||||
targetPort: http
|
||||
protocol: TCP
|
||||
name: http
|
||||
- port: {{ .Values.influxdb.service.rcpPort }}
|
||||
targetPort: rcp
|
||||
protocol: TCP
|
||||
name: rcp
|
||||
selector: {{ include "influxdb.matchLabels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: influxdb
|
||||
@@ -0,0 +1,31 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "influxdb.fullname" . }}
|
||||
labels: {{ include "influxdb.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: influxdb
|
||||
spec:
|
||||
type: {{ .Values.influxdb.service.type }}
|
||||
{{- if and .Values.influxdb.service.loadBalancerIP (eq .Values.influxdb.service.type "LoadBalancer") }}
|
||||
loadBalancerIP: {{ .Values.influxdb.service.loadBalancerIP }}
|
||||
{{- end }}
|
||||
{{- if and (eq .Values.influxdb.service.type "LoadBalancer") .Values.influxdb.service.loadBalancerSourceRanges }}
|
||||
loadBalancerSourceRanges:
|
||||
{{ with .Values.influxdb.service.loadBalancerSourceRanges }}
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if and (eq .Values.influxdb.service.type "ClusterIP") .Values.influxdb.service.clusterIP }}
|
||||
clusterIP: {{ .Values.influxdb.service.clusterIP }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- port: {{ .Values.influxdb.service.port }}
|
||||
targetPort: http
|
||||
protocol: TCP
|
||||
name: http
|
||||
- port: {{ .Values.influxdb.service.rcpPort }}
|
||||
targetPort: rcp
|
||||
protocol: TCP
|
||||
name: rcp
|
||||
selector: {{ include "influxdb.matchLabels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: influxdb
|
||||
@@ -0,0 +1,244 @@
|
||||
{{- if eq .Values.architecture "standalone" }}
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "influxdb.fullname" . }}
|
||||
labels: {{ include "influxdb.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: influxdb
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels: {{ include "influxdb.matchLabels" . | nindent 6 }}
|
||||
app.kubernetes.io/component: influxdb
|
||||
template:
|
||||
metadata:
|
||||
labels: {{ include "influxdb.labels" . | nindent 8 }}
|
||||
app.kubernetes.io/component: influxdb
|
||||
spec:
|
||||
{{- include "influxdb.imagePullSecrets" . | indent 6 }}
|
||||
affinity:
|
||||
{{- if eq .Values.influxdb.antiAffinity "hard" }}
|
||||
podAntiAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
- topologyKey: "kubernetes.io/hostname"
|
||||
labelSelector:
|
||||
matchLabels: {{ include "influxdb.matchLabels" . | nindent 18 }}
|
||||
app.kubernetes.io/component: influxdb
|
||||
{{- else if eq .Values.influxdb.antiAffinity "soft" }}
|
||||
podAntiAffinity:
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
- weight: 1
|
||||
podAffinityTerm:
|
||||
topologyKey: kubernetes.io/hostname
|
||||
labelSelector:
|
||||
matchLabels: {{ include "influxdb.matchLabels" . | nindent 18 }}
|
||||
app.kubernetes.io/component: influxdb
|
||||
{{- end }}
|
||||
{{- if .Values.influxdb.nodeAffinity }}
|
||||
nodeAffinity: {{ toYaml .Values.influxdb.nodeAffinity | nindent 10 }}
|
||||
{{- end }}
|
||||
{{- with .Values.influxdb.nodeSelector }}
|
||||
nodeSelector: {{ tpl (toYaml .) $ | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.influxdb.tolerations }}
|
||||
tolerations: {{ tpl (toYaml .) $ | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.influxdb.securityContext.enabled }}
|
||||
securityContext:
|
||||
fsGroup: {{ .Values.influxdb.securityContext.fsGroup }}
|
||||
{{- end }}
|
||||
{{- if and .Values.volumePermissions.enabled .Values.persistence.enabled }}
|
||||
initContainers:
|
||||
- name: init-chmod-data
|
||||
image: {{ include "influxdb.volumePermissions.image" . }}
|
||||
imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }}
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- |
|
||||
mkdir -p /bitnami/influxdb/{data,meta,wal}
|
||||
chown -R "{{ .Values.influxdb.securityContext.runAsUser }}:{{ .Values.influxdb.securityContext.fsGroup }}" /bitnami/influxdb/{data,meta,wal}
|
||||
securityContext:
|
||||
runAsUser: 0
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /bitnami/influxdb
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: influxdb
|
||||
image: {{ include "influxdb.image" . }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
|
||||
{{- if .Values.influxdb.securityContext.enabled }}
|
||||
securityContext:
|
||||
runAsUser: {{ .Values.influxdb.securityContext.runAsUser }}
|
||||
{{- end }}
|
||||
env:
|
||||
- name: BITNAMI_DEBUG
|
||||
value: {{ ternary "true" "false" .Values.image.debug | quote }}
|
||||
- name: INFLUXDB_HTTP_AUTH_ENABLED
|
||||
value: {{ .Values.authEnabled | quote }}
|
||||
{{- if .Values.adminUser.user }}
|
||||
- name: INFLUXDB_ADMIN_USER
|
||||
value: {{ .Values.adminUser.user | quote }}
|
||||
{{- if .Values.adminUser.usePasswordFile }}
|
||||
- name: INFLUXDB_ADMIN_USER_PASSWORD_FILE
|
||||
value: "/opt/bitnami/influxdb/secrets/admin-user-password"
|
||||
{{- else }}
|
||||
- name: INFLUXDB_ADMIN_USER_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "influxdb.secretName" . }}
|
||||
key: admin-user-password
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.user.user }}
|
||||
- name: INFLUXDB_USER
|
||||
value: {{ .Values.user.user | quote }}
|
||||
{{- if .Values.user.usePasswordFile }}
|
||||
- name: INFLUXDB_USER_PASSWORD_FILE
|
||||
value: "/opt/bitnami/influxdb/secrets/user-password"
|
||||
{{- else }}
|
||||
- name: INFLUXDB_USER_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "influxdb.secretName" . }}
|
||||
key: user-password
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.readUser.user }}
|
||||
- name: INFLUXDB_READ_USER
|
||||
value: {{ .Values.readUser.user | quote }}
|
||||
{{- if .Values.readUser.usePasswordFile }}
|
||||
- name: INFLUXDB_READ_USER_PASSWORD_FILE
|
||||
value: "/opt/bitnami/influxdb/secrets/read-user-password"
|
||||
{{- else }}
|
||||
- name: INFLUXDB_READ_USER_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "influxdb.secretName" . }}
|
||||
key: read-user-password
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.writeUser.user }}
|
||||
- name: INFLUXDB_WRITE_USER
|
||||
value: {{ .Values.writeUser.user | quote }}
|
||||
{{- if .Values.writeUser.usePasswordFile }}
|
||||
- name: INFLUXDB_WRITE_USER_PASSWORD_FILE
|
||||
value: "/opt/bitnami/influxdb/secrets/write-user-password"
|
||||
{{- else }}
|
||||
- name: INFLUXDB_WRITE_USER_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "influxdb.secretName" . }}
|
||||
key: write-user-password
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.database }}
|
||||
- name: INFLUXDB_DB
|
||||
value: {{ .Values.database | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.influxdb.extraEnvVars }}
|
||||
{{- tpl (toYaml .Values.influxdb.extraEnvVars) $ | nindent 8 }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 8086
|
||||
protocol: TCP
|
||||
- name: rcp
|
||||
containerPort: 8088
|
||||
protocol: TCP
|
||||
{{- if .Values.influxdb.livenessProbe.enabled }}
|
||||
livenessProbe:
|
||||
exec:
|
||||
command:
|
||||
- bash
|
||||
- -c
|
||||
- |
|
||||
if [[ -f "${INFLUXDB_ADMIN_USER_PASSWORD_FILE:-}" ]]; then
|
||||
export INFLUXDB_ADMIN_USER_PASSWORD="$(< "${INFLUXDB_ADMIN_USER_PASSWORD_FILE}")"
|
||||
fi
|
||||
{{ if .Values.authEnabled }}INFLUX_USERNAME="$INFLUXDB_ADMIN_USER" INFLUX_PASSWORD="$INFLUXDB_ADMIN_USER_PASSWORD"{{ end }} influx -host 127.0.0.1 -port 8086 -execute "SHOW DATABASES"
|
||||
initialDelaySeconds: {{ .Values.influxdb.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.influxdb.livenessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.influxdb.livenessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.influxdb.livenessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.influxdb.livenessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
{{- if .Values.influxdb.readinessProbe.enabled }}
|
||||
readinessProbe:
|
||||
exec:
|
||||
command:
|
||||
- bash
|
||||
- -c
|
||||
- |
|
||||
if [[ -f "${INFLUXDB_ADMIN_USER_PASSWORD_FILE:-}" ]]; then
|
||||
export INFLUXDB_ADMIN_USER_PASSWORD="$(< "${INFLUXDB_ADMIN_USER_PASSWORD_FILE}")"
|
||||
fi
|
||||
{{ if .Values.authEnabled }}INFLUX_USERNAME="$INFLUXDB_ADMIN_USER" INFLUX_PASSWORD="$INFLUXDB_ADMIN_USER_PASSWORD"{{ end }} influx -host 127.0.0.1 -port 8086 -execute "SHOW DATABASES"
|
||||
initialDelaySeconds: {{ .Values.influxdb.readinessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.influxdb.readinessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.influxdb.readinessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.influxdb.readinessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.influxdb.readinessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
{{- if .Values.influxdb.resources }}
|
||||
resources: {{- toYaml .Values.influxdb.resources | nindent 10 }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
{{- if or (.Files.Glob "files/conf/influxdb.conf") .Values.influxdb.configuration .Values.influxdb.existingConfiguration }}
|
||||
- name: influxdb-config
|
||||
mountPath: /opt/bitnami/influxdb/etc
|
||||
{{- end }}
|
||||
{{- if or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,txt}") .Values.influxdb.initdbScripts .Values.influxdb.initdbScriptsCM }}
|
||||
- name: custom-init-scripts
|
||||
mountPath: /docker-entrypoint-initdb.d/
|
||||
{{- end }}
|
||||
{{- if or .Values.adminUser.usePasswordFile .Values.user.usePasswordFile .Values.readUser.usePasswordFile .Values.writeUser.usePasswordFile }}
|
||||
- name: influxdb-credentials
|
||||
mountPath: /opt/bitnami/influxdb/secrets/
|
||||
{{- end }}
|
||||
{{- if .Values.persistence.enabled }}
|
||||
- name: data
|
||||
mountPath: /bitnami/influxdb
|
||||
{{- end }}
|
||||
volumes:
|
||||
{{- if or (.Files.Glob "files/conf/influxdb.conf") .Values.influxdb.configuration .Values.influxdb.existingConfiguration }}
|
||||
- name: influxdb-config
|
||||
configMap:
|
||||
name: {{ include "influxdb.configmapName" . }}
|
||||
{{- end }}
|
||||
{{- if or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,txt}") .Values.influxdb.initdbScripts .Values.influxdb.initdbScriptsCM }}
|
||||
- name: custom-init-scripts
|
||||
configMap:
|
||||
name: {{ include "influxdb.initdbScriptsConfigmapName" . }}
|
||||
{{- end }}
|
||||
{{- if or .Values.adminUser.usePasswordFile .Values.user.usePasswordFile .Values.readUser.usePasswordFile .Values.writeUser.usePasswordFile }}
|
||||
- name: influxdb-credentials
|
||||
secret:
|
||||
secretName: {{ include "influxdb.secretName" . }}
|
||||
items:
|
||||
{{- if .Values.adminUser.usePasswordFile }}
|
||||
- key: admin-user-password
|
||||
path: admin-user-password
|
||||
{{- end }}
|
||||
{{- if .Values.user.usePasswordFile }}
|
||||
- key: user-password
|
||||
path: user-password
|
||||
{{- end }}
|
||||
{{- if .Values.readUser.usePasswordFile }}
|
||||
- key: read-user-password
|
||||
path: read-user-password
|
||||
{{- end }}
|
||||
{{- if .Values.writeUser.usePasswordFile }}
|
||||
- key: write-user-password
|
||||
path: write-user-password
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
- name: data
|
||||
{{- if .Values.persistence.enabled }}
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ if .Values.persistence.existingClaim }}{{ .Values.persistence.existingClaim }}{{- else }}{{ include "influxdb.fullname" . }}{{- end }}
|
||||
{{- else }}
|
||||
emptyDir: {}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,264 @@
|
||||
{{- if eq .Values.architecture "high-availability" }}
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: {{ include "influxdb.fullname" . }}
|
||||
labels: {{ include "influxdb.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: influxdb
|
||||
spec:
|
||||
serviceName: {{ include "influxdb.fullname" . }}-headless
|
||||
replicas: {{ .Values.influxdb.replicaCount }}
|
||||
updateStrategy:
|
||||
type: {{ .Values.influxdb.updateStrategy }}
|
||||
{{- if (eq "Recreate" .Values.influxdb.updateStrategy) }}
|
||||
rollingUpdate: null
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels: {{ include "influxdb.matchLabels" . | nindent 6 }}
|
||||
app.kubernetes.io/component: influxdb
|
||||
template:
|
||||
metadata:
|
||||
labels: {{ include "influxdb.labels" . | nindent 8 }}
|
||||
app.kubernetes.io/component: influxdb
|
||||
spec:
|
||||
{{- include "influxdb.imagePullSecrets" . | indent 6 }}
|
||||
affinity:
|
||||
{{- if eq .Values.influxdb.antiAffinity "hard" }}
|
||||
podAntiAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
- topologyKey: "kubernetes.io/hostname"
|
||||
labelSelector:
|
||||
matchLabels: {{ include "influxdb.matchLabels" . | nindent 18 }}
|
||||
app.kubernetes.io/component: influxdb
|
||||
{{- else if eq .Values.influxdb.antiAffinity "soft" }}
|
||||
podAntiAffinity:
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
- weight: 1
|
||||
podAffinityTerm:
|
||||
topologyKey: kubernetes.io/hostname
|
||||
labelSelector:
|
||||
matchLabels: {{ include "influxdb.matchLabels" . | nindent 18 }}
|
||||
app.kubernetes.io/component: influxdb
|
||||
{{- end }}
|
||||
{{- if .Values.influxdb.nodeAffinity }}
|
||||
nodeAffinity: {{ toYaml .Values.influxdb.nodeAffinity | nindent 10 }}
|
||||
{{- end }}
|
||||
{{- with .Values.influxdb.nodeSelector }}
|
||||
nodeSelector: {{ tpl (toYaml .) $ | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.influxdb.tolerations }}
|
||||
tolerations: {{ tpl (toYaml .) $ | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.influxdb.securityContext.enabled }}
|
||||
securityContext:
|
||||
fsGroup: {{ .Values.influxdb.securityContext.fsGroup }}
|
||||
{{- end }}
|
||||
{{- if and .Values.volumePermissions.enabled .Values.persistence.enabled }}
|
||||
initContainers:
|
||||
- name: init-chmod-data
|
||||
image: {{ include "influxdb.volumePermissions.image" . }}
|
||||
imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }}
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- |
|
||||
mkdir -p /bitnami/influxdb/{data,meta,wal}
|
||||
chown -R "{{ .Values.influxdb.securityContext.runAsUser }}:{{ .Values.influxdb.securityContext.fsGroup }}" /bitnami/influxdb/{data,meta,wal}
|
||||
securityContext:
|
||||
runAsUser: 0
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /bitnami/influxdb
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: influxdb
|
||||
image: {{ include "influxdb.image" . }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
|
||||
{{- if .Values.influxdb.securityContext.enabled }}
|
||||
securityContext:
|
||||
runAsUser: {{ .Values.influxdb.securityContext.runAsUser }}
|
||||
{{- end }}
|
||||
env:
|
||||
- name: BITNAMI_DEBUG
|
||||
value: {{ ternary "true" "false" .Values.image.debug | quote }}
|
||||
- name: INFLUXDB_HTTP_AUTH_ENABLED
|
||||
value: {{ .Values.authEnabled | quote }}
|
||||
{{- if .Values.adminUser.user }}
|
||||
- name: INFLUXDB_ADMIN_USER
|
||||
value: {{ .Values.adminUser.user | quote }}
|
||||
{{- if .Values.adminUser.usePasswordFile }}
|
||||
- name: INFLUXDB_ADMIN_USER_PASSWORD_FILE
|
||||
value: "/opt/bitnami/influxdb/secrets/admin-user-password"
|
||||
{{- else }}
|
||||
- name: INFLUXDB_ADMIN_USER_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "influxdb.secretName" . }}
|
||||
key: admin-user-password
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.user.user }}
|
||||
- name: INFLUXDB_USER
|
||||
value: {{ .Values.user.user | quote }}
|
||||
{{- if .Values.user.usePasswordFile }}
|
||||
- name: INFLUXDB_USER_PASSWORD_FILE
|
||||
value: "/opt/bitnami/influxdb/secrets/user-password"
|
||||
{{- else }}
|
||||
- name: INFLUXDB_USER_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "influxdb.secretName" . }}
|
||||
key: user-password
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.readUser.user }}
|
||||
- name: INFLUXDB_READ_USER
|
||||
value: {{ .Values.readUser.user | quote }}
|
||||
{{- if .Values.readUser.usePasswordFile }}
|
||||
- name: INFLUXDB_READ_USER_PASSWORD_FILE
|
||||
value: "/opt/bitnami/influxdb/secrets/read-user-password"
|
||||
{{- else }}
|
||||
- name: INFLUXDB_READ_USER_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "influxdb.secretName" . }}
|
||||
key: read-user-password
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.writeUser.user }}
|
||||
- name: INFLUXDB_WRITE_USER
|
||||
value: {{ .Values.writeUser.user | quote }}
|
||||
{{- if .Values.writeUser.usePasswordFile }}
|
||||
- name: INFLUXDB_WRITE_USER_PASSWORD_FILE
|
||||
value: "/opt/bitnami/influxdb/secrets/write-user-password"
|
||||
{{- else }}
|
||||
- name: INFLUXDB_WRITE_USER_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "influxdb.secretName" . }}
|
||||
key: write-user-password
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.database }}
|
||||
- name: INFLUXDB_DB
|
||||
value: {{ .Values.database | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.influxdb.extraEnvVars }}
|
||||
{{- tpl (toYaml .Values.influxdb.extraEnvVars) $ | nindent 8 }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 8086
|
||||
protocol: TCP
|
||||
- name: rcp
|
||||
containerPort: 8088
|
||||
protocol: TCP
|
||||
{{- if .Values.influxdb.livenessProbe.enabled }}
|
||||
livenessProbe:
|
||||
exec:
|
||||
command:
|
||||
- bash
|
||||
- -c
|
||||
- |
|
||||
if [[ -f "${INFLUXDB_ADMIN_USER_PASSWORD_FILE:-}" ]]; then
|
||||
export INFLUXDB_ADMIN_USER_PASSWORD="$(< "${INFLUXDB_ADMIN_USER_PASSWORD_FILE}")"
|
||||
fi
|
||||
{{ if .Values.authEnabled }}INFLUX_USERNAME="$INFLUXDB_ADMIN_USER" INFLUX_PASSWORD="$INFLUXDB_ADMIN_USER_PASSWORD"{{ end }} influx -host 127.0.0.1 -port 8086 -execute "SHOW DATABASES"
|
||||
initialDelaySeconds: {{ .Values.influxdb.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.influxdb.livenessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.influxdb.livenessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.influxdb.livenessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.influxdb.livenessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
{{- if .Values.influxdb.readinessProbe.enabled }}
|
||||
readinessProbe:
|
||||
exec:
|
||||
command:
|
||||
- bash
|
||||
- -c
|
||||
- |
|
||||
if [[ -f "${INFLUXDB_ADMIN_USER_PASSWORD_FILE:-}" ]]; then
|
||||
export INFLUXDB_ADMIN_USER_PASSWORD="$(< "${INFLUXDB_ADMIN_USER_PASSWORD_FILE}")"
|
||||
fi
|
||||
{{ if .Values.authEnabled }}INFLUX_USERNAME="$INFLUXDB_ADMIN_USER" INFLUX_PASSWORD="$INFLUXDB_ADMIN_USER_PASSWORD"{{ end }} influx -host 127.0.0.1 -port 8086 -execute "SHOW DATABASES"
|
||||
initialDelaySeconds: {{ .Values.influxdb.readinessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.influxdb.readinessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.influxdb.readinessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.influxdb.readinessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.influxdb.readinessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
{{- if .Values.influxdb.resources }}
|
||||
resources: {{- toYaml .Values.influxdb.resources | nindent 10 }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
{{- if or (.Files.Glob "files/conf/influxdb.conf") .Values.influxdb.configuration .Values.influxdb.existingConfiguration }}
|
||||
- name: influxdb-config
|
||||
mountPath: /opt/bitnami/influxdb/etc
|
||||
{{- end }}
|
||||
{{- if or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,txt}") .Values.influxdb.initdbScripts .Values.influxdb.initdbScriptsCM }}
|
||||
- name: custom-init-scripts
|
||||
mountPath: /docker-entrypoint-initdb.d/
|
||||
{{- end }}
|
||||
{{- if or .Values.adminUser.usePasswordFile .Values.user.usePasswordFile .Values.readUser.usePasswordFile .Values.writeUser.usePasswordFile }}
|
||||
- name: influxdb-credentials
|
||||
mountPath: /opt/bitnami/influxdb/secrets/
|
||||
{{- end }}
|
||||
{{- if .Values.persistence.enabled }}
|
||||
- name: data
|
||||
mountPath: /bitnami/influxdb
|
||||
{{- end }}
|
||||
volumes:
|
||||
{{- if or (.Files.Glob "files/conf/influxdb.conf") .Values.influxdb.configuration .Values.influxdb.existingConfiguration }}
|
||||
- name: influxdb-config
|
||||
configMap:
|
||||
name: {{ include "influxdb.configmapName" . }}
|
||||
{{- end }}
|
||||
{{- if or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,txt}") .Values.influxdb.initdbScripts .Values.influxdb.initdbScriptsCM }}
|
||||
- name: custom-init-scripts
|
||||
configMap:
|
||||
name: {{ include "influxdb.initdbScriptsConfigmapName" . }}
|
||||
{{- end }}
|
||||
{{- if or .Values.adminUser.usePasswordFile .Values.user.usePasswordFile .Values.readUser.usePasswordFile .Values.writeUser.usePasswordFile }}
|
||||
- name: influxdb-credentials
|
||||
secret:
|
||||
secretName: {{ include "influxdb.secretName" . }}
|
||||
items:
|
||||
{{- if .Values.adminUser.usePasswordFile }}
|
||||
- key: admin-user-password
|
||||
path: admin-user-password
|
||||
{{- end }}
|
||||
{{- if .Values.user.usePasswordFile }}
|
||||
- key: user-password
|
||||
path: user-password
|
||||
{{- end }}
|
||||
{{- if .Values.readUser.usePasswordFile }}
|
||||
- key: read-user-password
|
||||
path: read-user-password
|
||||
{{- end }}
|
||||
{{- if .Values.writeUser.usePasswordFile }}
|
||||
- key: write-user-password
|
||||
path: write-user-password
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if and .Values.persistence.enabled .Values.persistence.existingClaim }}
|
||||
- name: data
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ include "influxdb.fullname" . }}
|
||||
{{- else if not .Values.persistence.enabled }}
|
||||
- name: data
|
||||
emptyDir: {}
|
||||
{{- else if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }}
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: data
|
||||
spec:
|
||||
accessModes:
|
||||
{{- range .Values.persistence.accessModes }}
|
||||
- {{ . | quote }}
|
||||
{{- end }}
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.persistence.size | quote }}
|
||||
{{ include "influxdb.storageClass" . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,36 @@
|
||||
{{- if .Values.ingress.enabled -}}
|
||||
{{- $architecture := .Values.architecture }}
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ template "influxdb.fullname" . }}
|
||||
labels: {{ include "influxdb.labels" . | nindent 4 }}
|
||||
annotations:
|
||||
{{- if .Values.ingress.certManager }}
|
||||
kubernetes.io/tls-acme: "true"
|
||||
{{- end }}
|
||||
{{- range $key, $value := .Values.ingress.annotations }}
|
||||
{{ $key }}: {{ $value | quote }}
|
||||
{{- end }}
|
||||
spec:
|
||||
rules:
|
||||
{{- range .Values.ingress.hosts }}
|
||||
- host: {{ .name }}
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
backend:
|
||||
serviceName: {{ include "influxdb.fullname" $ }}
|
||||
servicePort: http
|
||||
{{- if eq $architecture "high-availability" }}
|
||||
- path: /write
|
||||
backend:
|
||||
serviceName: {{ include "influxdb.fullname" $ }}-relay
|
||||
servicePort: http
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.ingress.tls }}
|
||||
tls:
|
||||
{{ toYaml .Values.ingress.tls | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,31 @@
|
||||
{{- if .Values.networkPolicy.enabled }}
|
||||
kind: NetworkPolicy
|
||||
apiVersion: {{ template "influxdb.networkPolicy.apiVersion" . }}
|
||||
metadata:
|
||||
name: {{ include "influxdb.fullname" . }}
|
||||
labels: {{ include "influxdb.labels" . | nindent 4 }}
|
||||
spec:
|
||||
podSelector:
|
||||
matchLabels: {{ include "influxdb.matchLabels" . | nindent 6 }}
|
||||
app.kubernetes.io/component: influxdb
|
||||
policyTypes:
|
||||
- Ingress
|
||||
ingress:
|
||||
# Allow inbound connections
|
||||
- ports:
|
||||
- port: 8086
|
||||
protocol: TCP
|
||||
- port: 8088
|
||||
protocol: TCP
|
||||
{{- if not .Values.networkPolicy.allowExternal }}
|
||||
from:
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
{{ template "influxdb.fullname" . }}-client: "true"
|
||||
{{- if eq .Values.architecture "high-availability" }}
|
||||
- podSelector:
|
||||
matchLabels: {{ include "influxdb.matchLabels" . | nindent 10 }}
|
||||
app.kubernetes.io/component: relay
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,15 @@
|
||||
{{- if and (eq .Values.architecture "high-availability") (or (.Files.Glob "files/conf/relay.toml") .Values.relay.configuration) (not .Values.relay.existingConfiguration) }}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ include "influxdb.fullname" . }}-relay
|
||||
labels: {{ include "influxdb.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: relay
|
||||
data:
|
||||
{{- if (.Files.Glob "files/conf/relay.toml") }}
|
||||
{{ (.Files.Glob "iles/conf/relay.toml").AsConfig | indent 2 }}
|
||||
{{- else if .Values.relay.configuration }}
|
||||
relay.toml: |-
|
||||
{{ tpl .Values.relay.configuration . | indent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,97 @@
|
||||
{{- if eq .Values.architecture "high-availability" }}
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "influxdb.fullname" . }}-relay
|
||||
labels: {{ include "influxdb.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: relay
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels: {{ include "influxdb.matchLabels" . | nindent 6 }}
|
||||
app.kubernetes.io/component: relay
|
||||
template:
|
||||
metadata:
|
||||
labels: {{ include "influxdb.labels" . | nindent 8 }}
|
||||
app.kubernetes.io/component: relay
|
||||
spec:
|
||||
{{- include "influxdb.imagePullSecrets" . | indent 6 }}
|
||||
affinity:
|
||||
{{- if eq .Values.relay.antiAffinity "hard" }}
|
||||
podAntiAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
- topologyKey: "kubernetes.io/hostname"
|
||||
labelSelector:
|
||||
matchLabels: {{ include "influxdb.matchLabels" . | nindent 18 }}
|
||||
app.kubernetes.io/component: relay
|
||||
{{- else if eq .Values.relay.antiAffinity "soft" }}
|
||||
podAntiAffinity:
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
- weight: 1
|
||||
podAffinityTerm:
|
||||
topologyKey: kubernetes.io/hostname
|
||||
labelSelector:
|
||||
matchLabels: {{ include "influxdb.matchLabels" . | nindent 18 }}
|
||||
app.kubernetes.io/component: relay
|
||||
{{- end }}
|
||||
{{- if .Values.relay.nodeAffinity }}
|
||||
nodeAffinity: {{ toYaml .Values.relay.nodeAffinity | nindent 10 }}
|
||||
{{- end }}
|
||||
{{- with .Values.relay.nodeSelector }}
|
||||
nodeSelector: {{ tpl (toYaml .) $ | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.relay.tolerations }}
|
||||
tolerations: {{ tpl (toYaml .) $ | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.relay.securityContext.enabled }}
|
||||
securityContext:
|
||||
fsGroup: {{ .Values.relay.securityContext.fsGroup }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: relay
|
||||
image: {{ include "influxdb.relay.image" . }}
|
||||
imagePullPolicy: {{ .Values.relay.image.pullPolicy | quote }}
|
||||
{{- if .Values.relay.securityContext.enabled }}
|
||||
securityContext:
|
||||
runAsUser: {{ .Values.relay.securityContext.runAsUser }}
|
||||
{{- end }}
|
||||
command:
|
||||
- /influxdb_relay
|
||||
args:
|
||||
- -config
|
||||
- /conf/relay.toml
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 9096
|
||||
protocol: TCP
|
||||
{{- if .Values.relay.livenessProbe.enabled }}
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
port: http
|
||||
initialDelaySeconds: {{ .Values.relay.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.relay.livenessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.relay.livenessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.relay.livenessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.relay.livenessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
{{- if .Values.relay.readinessProbe.enabled }}
|
||||
readinessProbe:
|
||||
tcpSocket:
|
||||
port: http
|
||||
initialDelaySeconds: {{ .Values.relay.readinessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.relay.readinessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.relay.readinessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.relay.readinessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.relay.readinessProbe.failureThreshold }}
|
||||
{{- end }}
|
||||
{{- if .Values.relay.resources }}
|
||||
resources: {{- toYaml .Values.relay.resources | nindent 10 }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: relay-config
|
||||
mountPath: /conf
|
||||
volumes:
|
||||
- name: relay-config
|
||||
configMap:
|
||||
name: {{ include "influxdb.relay.configmapName" . }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,29 @@
|
||||
{{- if eq .Values.architecture "high-availability" }}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "influxdb.fullname" . }}-relay
|
||||
labels: {{ include "influxdb.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: relay
|
||||
spec:
|
||||
type: {{ .Values.relay.service.type }}
|
||||
{{- if and .Values.relay.service.loadBalancerIP (eq .Values.relay.service.type "LoadBalancer") }}
|
||||
loadBalancerIP: {{ .Values.relay.service.loadBalancerIP }}
|
||||
{{- end }}
|
||||
{{- if and (eq .Values.relay.service.type "LoadBalancer") .Values.relay.service.loadBalancerSourceRanges }}
|
||||
loadBalancerSourceRanges:
|
||||
{{ with .Values.relay.service.loadBalancerSourceRanges }}
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if and (eq .Values.relay.service.type "ClusterIP") .Values.relay.service.clusterIP }}
|
||||
clusterIP: {{ .Values.relay.service.clusterIP }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- port: {{ .Values.relay.service.port }}
|
||||
targetPort: http
|
||||
protocol: TCP
|
||||
name: http
|
||||
selector: {{ include "influxdb.matchLabels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: relay
|
||||
{{- end }}
|
||||
@@ -0,0 +1,475 @@
|
||||
## Global Docker image parameters
|
||||
## Please, note that this will override the image parameters, including dependencies, configured to use the global value
|
||||
## Current available global Docker image parameters: imageRegistry, imagePullSecrets and storageClass
|
||||
##
|
||||
# global:
|
||||
# imageRegistry: myRegistryName
|
||||
# imagePullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
# storageClass: myStorageClass
|
||||
|
||||
# Default values for influxdb.
|
||||
# This is a YAML-formatted file.
|
||||
# Declare variables to be passed into your templates.
|
||||
|
||||
## Bitnami InfluxDB image
|
||||
## ref: https://hub.docker.com/r/bitnami/influxdb/tags/
|
||||
##
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/influxdb
|
||||
tag: 1.7.8-r5
|
||||
## Specify a imagePullPolicy. Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
|
||||
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
|
||||
##
|
||||
pullPolicy: IfNotPresent
|
||||
## Optionally specify an array of imagePullSecrets (secrets must be manually created in the namespace)
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
|
||||
## Set to true if you would like to see extra information on logs
|
||||
## ref: https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging
|
||||
##
|
||||
debug: false
|
||||
|
||||
## String to partially override influxdb.fullname template (will maintain the release name)
|
||||
##
|
||||
# nameOverride:
|
||||
|
||||
## String to fully override influxdb.fullname template
|
||||
##
|
||||
# fullnameOverride:
|
||||
|
||||
## InfluxDB architecture. Allowed values: standalone or high-availability
|
||||
##
|
||||
architecture: high-availability
|
||||
|
||||
## Database to be created on first run
|
||||
## ref: https://github.com/bitnami/bitnami-docker-influxdb#creating-a-database-on-first-run
|
||||
##
|
||||
database: my_database
|
||||
|
||||
## Enable/disable authentication
|
||||
## ref: https://github.com/bitnami/bitnami-docker-influxdb#allowing-empty-passwords
|
||||
##
|
||||
authEnabled: true
|
||||
|
||||
## InfluxDB admin credentials
|
||||
##
|
||||
adminUser:
|
||||
user: admin
|
||||
pwd:
|
||||
usePasswordFile: false
|
||||
## InfluxDB credentials for user with 'admin' privileges on the db specified at 'database' parameter
|
||||
##
|
||||
user:
|
||||
user:
|
||||
pwd:
|
||||
usePasswordFile: false
|
||||
## InfluxDB credentials for user with 'read' privileges on the db specified at 'database' parameter
|
||||
##
|
||||
readUser:
|
||||
user:
|
||||
pwd:
|
||||
usePasswordFile: false
|
||||
## InfluxDB credentials for user with 'write' privileges on the db specified at 'database' parameter
|
||||
##
|
||||
writeUser:
|
||||
user:
|
||||
pwd:
|
||||
usePasswordFile: false
|
||||
|
||||
## Secret with InfluxDB credentials
|
||||
## NOTE: This will override the users/passwords defined at adminUser, user, readUser and writeUser
|
||||
##
|
||||
# existingSecret:
|
||||
|
||||
## InfluxDB backend parameters
|
||||
##
|
||||
influxdb:
|
||||
## InfluxDB Configuration
|
||||
## Specify content for influxdb.conf
|
||||
## Alternatively, you can put your influxdb.conf under the files/conf/ directory
|
||||
##
|
||||
# configuration: |-
|
||||
# reporting-disabled = false
|
||||
# bind-address = "127.0.0.1:8088"
|
||||
# [meta]
|
||||
# dir = "/bitnami/influxdb/meta"
|
||||
# ...
|
||||
|
||||
## ConfigMap with InfluxDB configuration
|
||||
## NOTE: This will override influxdb.configuration
|
||||
##
|
||||
# existingConfiguration:
|
||||
|
||||
## initdb scripts
|
||||
## Specify dictionary of scripts to be run at first boot
|
||||
## Alternatively, you can put your scripts under the files/docker-entrypoint-initdb.d directory
|
||||
##
|
||||
# initdbScripts:
|
||||
# my_init_script.sh: |
|
||||
# #!/bin/sh
|
||||
# echo "Do something."
|
||||
|
||||
## ConfigMap with scripts to be run at first boot
|
||||
## NOTE: This will override initdbScripts
|
||||
##
|
||||
# initdbScriptsCM
|
||||
|
||||
## An array to add extra environment variables
|
||||
## For example:
|
||||
## extraEnvVars:
|
||||
## - name: INFLUXDB_DATA_QUERY_LOG_ENABLED
|
||||
## value: "true"
|
||||
##
|
||||
# extraEnvVars:
|
||||
|
||||
## Number of InfluxDB replicas to deploy
|
||||
##
|
||||
replicaCount: 3
|
||||
|
||||
## Update strategy, can be set to RollingUpdate or OnDelete by default.
|
||||
## ref: https://kubernetes.io/docs/tutorials/stateful-application/basic-stateful-set/#updating-statefulsets
|
||||
##
|
||||
updateStrategy: RollingUpdate
|
||||
|
||||
## Pod AntiAffinity
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
|
||||
##
|
||||
antiAffinity: soft
|
||||
|
||||
## Node Affinity. The value is evaluated as a template.
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#node-affinity-beta-feature
|
||||
##
|
||||
nodeAffinity: {}
|
||||
|
||||
## Node labels for pod assignment. Evaluated as a template.
|
||||
## Ref: https://kubernetes.io/docs/user-guide/node-selection/
|
||||
##
|
||||
nodeSelector: {}
|
||||
|
||||
## Tolerations for pod assignment. Evaluated as a template.
|
||||
## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
|
||||
##
|
||||
tolerations: {}
|
||||
|
||||
## K8s Security Context for InfluxDB pods
|
||||
## https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
|
||||
##
|
||||
securityContext:
|
||||
enabled: true
|
||||
fsGroup: 1001
|
||||
runAsUser: 1001
|
||||
|
||||
## InfluxDB pods' resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
resources: {}
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
# limits:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
# requests:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
|
||||
## InfluxDB pods' liveness and readiness probes
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes
|
||||
##
|
||||
livenessProbe:
|
||||
enabled: true
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
successThreshold: 1
|
||||
failureThreshold: 6
|
||||
readinessProbe:
|
||||
enabled: true
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
successThreshold: 1
|
||||
failureThreshold: 6
|
||||
|
||||
## Service paramaters
|
||||
##
|
||||
service:
|
||||
## Service type
|
||||
##
|
||||
type: ClusterIP
|
||||
## InfluxDB HTTP Port
|
||||
##
|
||||
port: 8086
|
||||
## InfluxDB RPC Port
|
||||
##
|
||||
rcpPort: 8088
|
||||
## Set the LoadBalancer service type to internal only.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
|
||||
##
|
||||
# loadBalancerIP:
|
||||
## Load Balancer sources
|
||||
## https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service
|
||||
##
|
||||
# loadBalancerSourceRanges:
|
||||
# - 10.10.10.0/24
|
||||
## Set the Cluster IP to use
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#choosing-your-own-ip-address
|
||||
##
|
||||
# clusterIP: None
|
||||
## Provide any additional annotations which may be required
|
||||
##
|
||||
annotations: {}
|
||||
|
||||
## InfluxDB Relay parameters
|
||||
##
|
||||
relay:
|
||||
## Bitnami InfluxDB Relay image
|
||||
## ref: https://hub.docker.com/r/bitnami/influxdb-relay/tags/
|
||||
##
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/influxdb-relay
|
||||
tag: 0.20161114.0-r0
|
||||
## Specify a imagePullPolicy. Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
|
||||
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
|
||||
##
|
||||
pullPolicy: IfNotPresent
|
||||
## Optionally specify an array of imagePullSecrets (secrets must be manually created in the namespace)
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
|
||||
## InfluxDB Relay Configuration
|
||||
## Specify content for relay.toml
|
||||
## Alternatively, you can put your relay.toml under the files/conf/ directory
|
||||
##
|
||||
configuration: |-
|
||||
[[http]]
|
||||
# Name of the HTTP server, used for display purposes only.
|
||||
name = "relay-server"
|
||||
|
||||
# TCP address to bind to, for HTTP server.
|
||||
bind-addr = "0.0.0.0:9096"
|
||||
|
||||
# Array of InfluxDB instances to use as backends for Relay.
|
||||
output = [
|
||||
{{- $influxdbReplicaCount := int .Values.influxdb.replicaCount }}
|
||||
{{- $influxdbFullname := include "influxdb.fullname" . }}
|
||||
{{- $influxdbHeadlessServiceName := printf "%s-headless" (include "influxdb.fullname" .) }}
|
||||
{{- $releaseName := .Release.Namespace }}
|
||||
{{- range $e, $i := until $influxdbReplicaCount }}
|
||||
{ name="{{ $influxdbFullname }}-{{ $i }}", location="http://{{ $influxdbFullname }}-{{ $i }}.{{ $influxdbHeadlessServiceName }}.{{ $releaseName }}.svc.cluster.local:8086/write", timeout="10s"},
|
||||
{{- end }}
|
||||
]
|
||||
|
||||
## ConfigMap with InfluxDB Relay configuration
|
||||
## NOTE: This will override relay.configuration
|
||||
##
|
||||
# existingConfiguration:
|
||||
|
||||
## Number of InfluxDB Relay replicas to deploy
|
||||
##
|
||||
replicaCount: 2
|
||||
|
||||
## Update strategy, can be set to RollingUpdate or OnDelete by default.
|
||||
## ref: https://kubernetes.io/docs/tutorials/stateful-application/basic-stateful-set/#updating-statefulsets
|
||||
##
|
||||
updateStrategy: RollingUpdate
|
||||
|
||||
## Pod AntiAffinity
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
|
||||
##
|
||||
antiAffinity: soft
|
||||
|
||||
## Node Affinity. The value is evaluated as a template.
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#node-affinity-beta-feature
|
||||
##
|
||||
nodeAffinity: {}
|
||||
|
||||
## Node labels for pod assignment. Evaluated as a template.
|
||||
## Ref: https://kubernetes.io/docs/user-guide/node-selection/
|
||||
##
|
||||
nodeSelector: {}
|
||||
|
||||
## Tolerations for pod assignment. Evaluated as a template.
|
||||
## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
|
||||
##
|
||||
tolerations: {}
|
||||
|
||||
## K8s Security Context for InfluxDB pods
|
||||
## https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
|
||||
##
|
||||
securityContext:
|
||||
enabled: true
|
||||
fsGroup: 1001
|
||||
runAsUser: 1001
|
||||
|
||||
## InfluxDB Relay pods' resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
resources: {}
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
# limits:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
# requests:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
|
||||
## InfluxDB Relay pods' liveness and readiness probes
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes
|
||||
##
|
||||
livenessProbe:
|
||||
enabled: true
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
successThreshold: 1
|
||||
failureThreshold: 6
|
||||
readinessProbe:
|
||||
enabled: true
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
successThreshold: 1
|
||||
failureThreshold: 6
|
||||
|
||||
## Service paramaters
|
||||
##
|
||||
service:
|
||||
## Service type
|
||||
##
|
||||
type: ClusterIP
|
||||
## InfluxDB Relay HTTP port
|
||||
##
|
||||
port: 9096
|
||||
## Set the LoadBalancer service type to internal only.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
|
||||
##
|
||||
# loadBalancerIP:
|
||||
## Load Balancer sources
|
||||
## https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service
|
||||
##
|
||||
# loadBalancerSourceRanges:
|
||||
# - 10.10.10.0/24
|
||||
## Set the Cluster IP to use
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#choosing-your-own-ip-address
|
||||
##
|
||||
# clusterIP: None
|
||||
## Provide any additional annotations which may be required
|
||||
##
|
||||
annotations: {}
|
||||
|
||||
## Ingress paramaters
|
||||
##
|
||||
ingress:
|
||||
## Set to true to enable ingress record generation
|
||||
enabled: false
|
||||
|
||||
## Set this to true in order to add the corresponding annotations for cert-manager
|
||||
certManager: false
|
||||
|
||||
## Ingress annotations done as key:value pairs
|
||||
## For a full list of possible ingress annotations, please see
|
||||
## ref: https://github.com/kubernetes/ingress-nginx/blob/master/docs/annotations.md
|
||||
##
|
||||
## If tls is set to true, annotation ingress.kubernetes.io/secure-backends: "true" will automatically be set
|
||||
## If certManager is set to true, annotation kubernetes.io/tls-acme: "true" will automatically be set
|
||||
annotations:
|
||||
# kubernetes.io/ingress.class: nginx
|
||||
|
||||
## The list of hostnames to be covered with this ingress record.
|
||||
## Most likely this will be just one host, but in the event more hosts are needed, this is an array
|
||||
hosts:
|
||||
- name: influxdb.local
|
||||
path: /
|
||||
|
||||
## The tls configuration for the ingress
|
||||
## see: https://kubernetes.io/docs/concepts/services-networking/ingress/#tls
|
||||
# tls:
|
||||
# - hosts:
|
||||
# - influxdb.local
|
||||
# secretName: influxdb.local-tls
|
||||
|
||||
secrets:
|
||||
## If you're providing your own certificates, please use this to add the certificates as secrets
|
||||
## key and certificate should start with -----BEGIN CERTIFICATE----- or
|
||||
## -----BEGIN RSA PRIVATE KEY-----
|
||||
##
|
||||
## name should line up with a tlsSecret set further up
|
||||
## If you're using cert-manager, this is unneeded, as it will create the secret for you if it is not set
|
||||
##
|
||||
## It is also possible to create and manage the certificates outside of this helm chart
|
||||
## Please see README.md for more information
|
||||
# - name: influxdb.local-tls
|
||||
# key:
|
||||
# certificate:
|
||||
|
||||
## NetworkPolicy paramaters
|
||||
##
|
||||
networkPolicy:
|
||||
enabled: true
|
||||
|
||||
## The Policy model to apply. When set to false, only pods with the correct
|
||||
## client labels will have network access to the ports InfluxDB is listening
|
||||
## on. When true, InfluxDB will accept connections from any source
|
||||
## (with the correct destination port).
|
||||
##
|
||||
allowExternal: false
|
||||
|
||||
## Persistence paramaters
|
||||
##
|
||||
persistence:
|
||||
enabled: true
|
||||
## A manually managed Persistent Volume and Claim
|
||||
## If defined, PVC must be created manually before volume will be bound
|
||||
## The value is evaluated as a template
|
||||
##
|
||||
# existingClaim:
|
||||
## Persistent Volume Storage Class
|
||||
## If defined, storageClassName: <storageClass>
|
||||
## If set to "-", storageClassName: "", which disables dynamic provisioning
|
||||
## If undefined (the default) or set to null, no storageClassName spec is
|
||||
## set, choosing the default provisioner.
|
||||
##
|
||||
# storageClass: "-"
|
||||
## Persistent Volume Access Mode
|
||||
##
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
## Persistent Volume Claim size
|
||||
##
|
||||
size: 8Gi
|
||||
|
||||
## Init Container paramaters
|
||||
## Change the owner and group of the persistent volume mountpoint to 'runAsUser:fsGroup'
|
||||
## values from the securityContext section.
|
||||
##
|
||||
volumePermissions:
|
||||
enabled: false
|
||||
## Bitnami Minideb image
|
||||
## ref: https://hub.docker.com/r/bitnami/minideb/tags/
|
||||
##
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/minideb
|
||||
tag: latest
|
||||
## Specify a imagePullPolicy. Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
|
||||
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
|
||||
##
|
||||
pullPolicy: Always
|
||||
## Optionally specify an array of imagePullSecrets (secrets must be manually created in the namespace)
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
@@ -0,0 +1,475 @@
|
||||
## Global Docker image parameters
|
||||
## Please, note that this will override the image parameters, including dependencies, configured to use the global value
|
||||
## Current available global Docker image parameters: imageRegistry, imagePullSecrets and storageClass
|
||||
##
|
||||
# global:
|
||||
# imageRegistry: myRegistryName
|
||||
# imagePullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
# storageClass: myStorageClass
|
||||
|
||||
# Default values for influxdb.
|
||||
# This is a YAML-formatted file.
|
||||
# Declare variables to be passed into your templates.
|
||||
|
||||
## Bitnami InfluxDB image
|
||||
## ref: https://hub.docker.com/r/bitnami/influxdb/tags/
|
||||
##
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/influxdb
|
||||
tag: 1.7.8-r5
|
||||
## Specify a imagePullPolicy. Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
|
||||
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
|
||||
##
|
||||
pullPolicy: IfNotPresent
|
||||
## Optionally specify an array of imagePullSecrets (secrets must be manually created in the namespace)
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
|
||||
## Set to true if you would like to see extra information on logs
|
||||
## ref: https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging
|
||||
##
|
||||
debug: false
|
||||
|
||||
## String to partially override influxdb.fullname template (will maintain the release name)
|
||||
##
|
||||
# nameOverride:
|
||||
|
||||
## String to fully override influxdb.fullname template
|
||||
##
|
||||
# fullnameOverride:
|
||||
|
||||
## InfluxDB architecture. Allowed values: standalone or high-availability
|
||||
##
|
||||
architecture: standalone
|
||||
|
||||
## Database to be created on first run
|
||||
## ref: https://github.com/bitnami/bitnami-docker-influxdb#creating-a-database-on-first-run
|
||||
##
|
||||
database: my_database
|
||||
|
||||
## Enable/disable authentication
|
||||
## ref: https://github.com/bitnami/bitnami-docker-influxdb#allowing-empty-passwords
|
||||
##
|
||||
authEnabled: true
|
||||
|
||||
## InfluxDB admin credentials
|
||||
##
|
||||
adminUser:
|
||||
user: admin
|
||||
pwd:
|
||||
usePasswordFile: false
|
||||
## InfluxDB credentials for user with 'admin' privileges on the db specified at 'database' parameter
|
||||
##
|
||||
user:
|
||||
user:
|
||||
pwd:
|
||||
usePasswordFile: false
|
||||
## InfluxDB credentials for user with 'read' privileges on the db specified at 'database' parameter
|
||||
##
|
||||
readUser:
|
||||
user:
|
||||
pwd:
|
||||
usePasswordFile: false
|
||||
## InfluxDB credentials for user with 'write' privileges on the db specified at 'database' parameter
|
||||
##
|
||||
writeUser:
|
||||
user:
|
||||
pwd:
|
||||
usePasswordFile: false
|
||||
|
||||
## Secret with InfluxDB credentials
|
||||
## NOTE: This will override the users/passwords defined at adminUser, user, readUser and writeUser
|
||||
##
|
||||
# existingSecret:
|
||||
|
||||
## InfluxDB backend parameters
|
||||
##
|
||||
influxdb:
|
||||
## InfluxDB Configuration
|
||||
## Specify content for influxdb.conf
|
||||
## Alternatively, you can put your influxdb.conf under the files/conf/ directory
|
||||
##
|
||||
# configuration: |-
|
||||
# reporting-disabled = false
|
||||
# bind-address = "127.0.0.1:8088"
|
||||
# [meta]
|
||||
# dir = "/bitnami/influxdb/meta"
|
||||
# ...
|
||||
|
||||
## ConfigMap with InfluxDB configuration
|
||||
## NOTE: This will override influxdb.configuration
|
||||
##
|
||||
# existingConfiguration:
|
||||
|
||||
## initdb scripts
|
||||
## Specify dictionary of scripts to be run at first boot
|
||||
## Alternatively, you can put your scripts under the files/docker-entrypoint-initdb.d directory
|
||||
##
|
||||
# initdbScripts:
|
||||
# my_init_script.sh: |
|
||||
# #!/bin/sh
|
||||
# echo "Do something."
|
||||
|
||||
## ConfigMap with scripts to be run at first boot
|
||||
## NOTE: This will override initdbScripts
|
||||
##
|
||||
# initdbScriptsCM
|
||||
|
||||
## An array to add extra environment variables
|
||||
## For example:
|
||||
## extraEnvVars:
|
||||
## - name: INFLUXDB_DATA_QUERY_LOG_ENABLED
|
||||
## value: "true"
|
||||
##
|
||||
# extraEnvVars:
|
||||
|
||||
## Number of InfluxDB replicas to deploy
|
||||
##
|
||||
replicaCount: 1
|
||||
|
||||
## Update strategy, can be set to RollingUpdate or OnDelete by default.
|
||||
## ref: https://kubernetes.io/docs/tutorials/stateful-application/basic-stateful-set/#updating-statefulsets
|
||||
##
|
||||
updateStrategy: RollingUpdate
|
||||
|
||||
## Pod AntiAffinity
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
|
||||
##
|
||||
antiAffinity: soft
|
||||
|
||||
## Node Affinity. The value is evaluated as a template.
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#node-affinity-beta-feature
|
||||
##
|
||||
nodeAffinity: {}
|
||||
|
||||
## Node labels for pod assignment. Evaluated as a template.
|
||||
## Ref: https://kubernetes.io/docs/user-guide/node-selection/
|
||||
##
|
||||
nodeSelector: {}
|
||||
|
||||
## Tolerations for pod assignment. Evaluated as a template.
|
||||
## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
|
||||
##
|
||||
tolerations: {}
|
||||
|
||||
## K8s Security Context for InfluxDB pods
|
||||
## https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
|
||||
##
|
||||
securityContext:
|
||||
enabled: true
|
||||
fsGroup: 1001
|
||||
runAsUser: 1001
|
||||
|
||||
## InfluxDB pods' resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
resources: {}
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
# limits:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
# requests:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
|
||||
## InfluxDB pods' liveness and readiness probes
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes
|
||||
##
|
||||
livenessProbe:
|
||||
enabled: true
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
successThreshold: 1
|
||||
failureThreshold: 6
|
||||
readinessProbe:
|
||||
enabled: true
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
successThreshold: 1
|
||||
failureThreshold: 6
|
||||
|
||||
## Service paramaters
|
||||
##
|
||||
service:
|
||||
## Service type
|
||||
##
|
||||
type: ClusterIP
|
||||
## InfluxDB HTTP Port
|
||||
##
|
||||
port: 8086
|
||||
## InfluxDB RPC Port
|
||||
##
|
||||
rcpPort: 8088
|
||||
## Set the LoadBalancer service type to internal only.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
|
||||
##
|
||||
# loadBalancerIP:
|
||||
## Load Balancer sources
|
||||
## https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service
|
||||
##
|
||||
# loadBalancerSourceRanges:
|
||||
# - 10.10.10.0/24
|
||||
## Set the Cluster IP to use
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#choosing-your-own-ip-address
|
||||
##
|
||||
# clusterIP: None
|
||||
## Provide any additional annotations which may be required
|
||||
##
|
||||
annotations: {}
|
||||
|
||||
## InfluxDB Relay parameters
|
||||
##
|
||||
relay:
|
||||
## Bitnami InfluxDB Relay image
|
||||
## ref: https://hub.docker.com/r/bitnami/influxdb-relay/tags/
|
||||
##
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/influxdb-relay
|
||||
tag: 0.20161114.0-r0
|
||||
## Specify a imagePullPolicy. Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
|
||||
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
|
||||
##
|
||||
pullPolicy: IfNotPresent
|
||||
## Optionally specify an array of imagePullSecrets (secrets must be manually created in the namespace)
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
|
||||
## InfluxDB Relay Configuration
|
||||
## Specify content for relay.toml
|
||||
## Alternatively, you can put your relay.toml under the files/conf/ directory
|
||||
##
|
||||
configuration: |-
|
||||
[[http]]
|
||||
# Name of the HTTP server, used for display purposes only.
|
||||
name = "relay-server"
|
||||
|
||||
# TCP address to bind to, for HTTP server.
|
||||
bind-addr = "0.0.0.0:9096"
|
||||
|
||||
# Array of InfluxDB instances to use as backends for Relay.
|
||||
output = [
|
||||
{{- $influxdbReplicaCount := int .Values.influxdb.replicaCount }}
|
||||
{{- $influxdbFullname := include "influxdb.fullname" . }}
|
||||
{{- $influxdbHeadlessServiceName := printf "%s-headless" (include "influxdb.fullname" .) }}
|
||||
{{- $releaseName := .Release.Namespace }}
|
||||
{{- range $e, $i := until $influxdbReplicaCount }}
|
||||
{ name="{{ $influxdbFullname }}-{{ $i }}", location="http://{{ $influxdbFullname }}-{{ $i }}.{{ $influxdbHeadlessServiceName }}.{{ $releaseName }}.svc.cluster.local:8086/write", timeout="10s"},
|
||||
{{- end }}
|
||||
]
|
||||
|
||||
## ConfigMap with InfluxDB Relay configuration
|
||||
## NOTE: This will override relay.configuration
|
||||
##
|
||||
# existingConfiguration:
|
||||
|
||||
## Number of InfluxDB Relay replicas to deploy
|
||||
##
|
||||
replicaCount: 1
|
||||
|
||||
## Update strategy, can be set to RollingUpdate or OnDelete by default.
|
||||
## ref: https://kubernetes.io/docs/tutorials/stateful-application/basic-stateful-set/#updating-statefulsets
|
||||
##
|
||||
updateStrategy: RollingUpdate
|
||||
|
||||
## Pod AntiAffinity
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
|
||||
##
|
||||
antiAffinity: soft
|
||||
|
||||
## Node Affinity. The value is evaluated as a template.
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#node-affinity-beta-feature
|
||||
##
|
||||
nodeAffinity: {}
|
||||
|
||||
## Node labels for pod assignment. Evaluated as a template.
|
||||
## Ref: https://kubernetes.io/docs/user-guide/node-selection/
|
||||
##
|
||||
nodeSelector: {}
|
||||
|
||||
## Tolerations for pod assignment. Evaluated as a template.
|
||||
## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
|
||||
##
|
||||
tolerations: {}
|
||||
|
||||
## K8s Security Context for InfluxDB pods
|
||||
## https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
|
||||
##
|
||||
securityContext:
|
||||
enabled: true
|
||||
fsGroup: 1001
|
||||
runAsUser: 1001
|
||||
|
||||
## InfluxDB Relay pods' resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
resources: {}
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
# limits:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
# requests:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
|
||||
## InfluxDB Relay pods' liveness and readiness probes
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes
|
||||
##
|
||||
livenessProbe:
|
||||
enabled: true
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
successThreshold: 1
|
||||
failureThreshold: 6
|
||||
readinessProbe:
|
||||
enabled: true
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
successThreshold: 1
|
||||
failureThreshold: 6
|
||||
|
||||
## Service paramaters
|
||||
##
|
||||
service:
|
||||
## Service type
|
||||
##
|
||||
type: ClusterIP
|
||||
## InfluxDB Relay HTTP port
|
||||
##
|
||||
port: 9096
|
||||
## Set the LoadBalancer service type to internal only.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
|
||||
##
|
||||
# loadBalancerIP:
|
||||
## Load Balancer sources
|
||||
## https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service
|
||||
##
|
||||
# loadBalancerSourceRanges:
|
||||
# - 10.10.10.0/24
|
||||
## Set the Cluster IP to use
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#choosing-your-own-ip-address
|
||||
##
|
||||
# clusterIP: None
|
||||
## Provide any additional annotations which may be required
|
||||
##
|
||||
annotations: {}
|
||||
|
||||
## Ingress paramaters
|
||||
##
|
||||
ingress:
|
||||
## Set to true to enable ingress record generation
|
||||
enabled: false
|
||||
|
||||
## Set this to true in order to add the corresponding annotations for cert-manager
|
||||
certManager: false
|
||||
|
||||
## Ingress annotations done as key:value pairs
|
||||
## For a full list of possible ingress annotations, please see
|
||||
## ref: https://github.com/kubernetes/ingress-nginx/blob/master/docs/annotations.md
|
||||
##
|
||||
## If tls is set to true, annotation ingress.kubernetes.io/secure-backends: "true" will automatically be set
|
||||
## If certManager is set to true, annotation kubernetes.io/tls-acme: "true" will automatically be set
|
||||
annotations:
|
||||
# kubernetes.io/ingress.class: nginx
|
||||
|
||||
## The list of hostnames to be covered with this ingress record.
|
||||
## Most likely this will be just one host, but in the event more hosts are needed, this is an array
|
||||
hosts:
|
||||
- name: influxdb.local
|
||||
path: /
|
||||
|
||||
## The tls configuration for the ingress
|
||||
## see: https://kubernetes.io/docs/concepts/services-networking/ingress/#tls
|
||||
# tls:
|
||||
# - hosts:
|
||||
# - influxdb.local
|
||||
# secretName: influxdb.local-tls
|
||||
|
||||
secrets:
|
||||
## If you're providing your own certificates, please use this to add the certificates as secrets
|
||||
## key and certificate should start with -----BEGIN CERTIFICATE----- or
|
||||
## -----BEGIN RSA PRIVATE KEY-----
|
||||
##
|
||||
## name should line up with a tlsSecret set further up
|
||||
## If you're using cert-manager, this is unneeded, as it will create the secret for you if it is not set
|
||||
##
|
||||
## It is also possible to create and manage the certificates outside of this helm chart
|
||||
## Please see README.md for more information
|
||||
# - name: influxdb.local-tls
|
||||
# key:
|
||||
# certificate:
|
||||
|
||||
## NetworkPolicy paramaters
|
||||
##
|
||||
networkPolicy:
|
||||
enabled: false
|
||||
|
||||
## The Policy model to apply. When set to false, only pods with the correct
|
||||
## client labels will have network access to the ports InfluxDB is listening
|
||||
## on. When true, InfluxDB will accept connections from any source
|
||||
## (with the correct destination port).
|
||||
##
|
||||
allowExternal: true
|
||||
|
||||
## Persistence paramaters
|
||||
##
|
||||
persistence:
|
||||
enabled: true
|
||||
## A manually managed Persistent Volume and Claim
|
||||
## If defined, PVC must be created manually before volume will be bound
|
||||
## The value is evaluated as a template
|
||||
##
|
||||
# existingClaim:
|
||||
## Persistent Volume Storage Class
|
||||
## If defined, storageClassName: <storageClass>
|
||||
## If set to "-", storageClassName: "", which disables dynamic provisioning
|
||||
## If undefined (the default) or set to null, no storageClassName spec is
|
||||
## set, choosing the default provisioner.
|
||||
##
|
||||
# storageClass: "-"
|
||||
## Persistent Volume Access Mode
|
||||
##
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
## Persistent Volume Claim size
|
||||
##
|
||||
size: 8Gi
|
||||
|
||||
## Init Container paramaters
|
||||
## Change the owner and group of the persistent volume mountpoint to 'runAsUser:fsGroup'
|
||||
## values from the securityContext section.
|
||||
##
|
||||
volumePermissions:
|
||||
enabled: false
|
||||
## Bitnami Minideb image
|
||||
## ref: https://hub.docker.com/r/bitnami/minideb/tags/
|
||||
##
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/minideb
|
||||
tag: latest
|
||||
## Specify a imagePullPolicy. Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
|
||||
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
|
||||
##
|
||||
pullPolicy: Always
|
||||
## Optionally specify an array of imagePullSecrets (secrets must be manually created in the namespace)
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
Reference in New Issue
Block a user