This repository has been archived on 2023-04-02. You can view files and clone it, but cannot push or open issues or pull requests.
gitops-tbrnt/influxdb/influxdb2.yaml

157 lines
4.8 KiB
YAML

---
# Source: influxdb2/templates/secret.yaml
apiVersion: v1
kind: Secret
metadata:
labels:
app.kubernetes.io/name: influxdb2
helm.sh/chart: influxdb2-2.0.1
app.kubernetes.io/instance: influxdb2
app.kubernetes.io/version: "2.0.6"
app.kubernetes.io/managed-by: Helm
name: influxdb2-auth
data:
admin-token: "ZVRLOFJkT0VvU2hYazhhdFE2ZTVXTkI3dFd6WHFHbGk="
admin-password: "NFdPNW5EcDdOMVdadzdNdHRWeXJLTHlESDE5dUVOdWk="
---
# Source: influxdb2/templates/service.yaml
apiVersion: v1
kind: Service
metadata:
name: influxdb2
labels:
app.kubernetes.io/name: influxdb2
helm.sh/chart: influxdb2-2.0.1
app.kubernetes.io/instance: influxdb2
app.kubernetes.io/version: "2.0.6"
app.kubernetes.io/managed-by: Helm
spec:
type: ClusterIP
ports:
- name: http
port: 80
protocol: TCP
targetPort: 8086
selector:
app.kubernetes.io/name: influxdb2
app.kubernetes.io/instance: influxdb2
---
# Source: influxdb2/templates/statefulset.yaml
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: influxdb2
labels:
app.kubernetes.io/name: influxdb2
helm.sh/chart: influxdb2-2.0.1
app.kubernetes.io/instance: influxdb2
app.kubernetes.io/version: "2.0.6"
app.kubernetes.io/managed-by: Helm
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: influxdb2
app.kubernetes.io/instance: influxdb2
serviceName: "influxdb2"
template:
metadata:
labels:
app.kubernetes.io/name: influxdb2
app.kubernetes.io/instance: influxdb2
annotations:
{}
spec:
volumes:
- name: data
persistentVolumeClaim:
claimName: influxdb2-data-influxdb2-0
containers:
- name: influxdb2
image: "influxdb:2.1.1-alpine"
imagePullPolicy: IfNotPresent
ports:
- name: http
containerPort: 8086
protocol: TCP
env:
# Automated setup will not run if an existing boltdb file is found at the configured path.
# This behavior allows for the InfluxDB container to reboot post-setup without encountering "DB is already set up" errors.
- name: DOCKER_INFLUXDB_INIT_MODE
value: setup
# The username to set for the system's initial super-user (Required).
- name: DOCKER_INFLUXDB_INIT_USERNAME
value: admin
# The password to set for the system's inital super-user (Required).
- name: DOCKER_INFLUXDB_INIT_PASSWORD
valueFrom:
secretKeyRef:
name: influxdb2-auth
key: admin-password
# The name to set for the system's initial organization (Required).
- name: DOCKER_INFLUXDB_INIT_ORG
value: influxdata
# The name to set for the system's initial bucket (Required).
- name: DOCKER_INFLUXDB_INIT_BUCKET
value: default
# The duration the system's initial bucket should retain data. If not set, the initial bucket will retain data forever.
- name: DOCKER_INFLUXDB_INIT_RETENTION
value: 0s
# The authentication token to associate with the system's initial super-user. If not set, a token will be auto-generated by the system.
- name: DOCKER_INFLUXDB_INIT_ADMIN_TOKEN
valueFrom:
secretKeyRef:
name: influxdb2-auth
key: admin-token
# Path to the BoltDB database.
- name: INFLUXD_BOLT_PATH
value: /var/lib/influxdbv2/influxd.bolt
# Path to persistent storage engine files where InfluxDB stores all Time-Structure Merge Tree (TSM) data on disk.
- name: INFLUXD_ENGINE_PATH
value: /var/lib/influxdbv2
# Extra environment variables from .Values.env
livenessProbe:
httpGet:
path: /health
port: http
readinessProbe:
httpGet:
path: /health
port: http
volumeMounts:
- name: data
mountPath: /var/lib/influxdbv2
resources:
{}
---
# Source: influxdb2/templates/ingress.yaml
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: influxdb2
labels:
app.kubernetes.io/name: influxdb2
helm.sh/chart: influxdb2-2.0.1
app.kubernetes.io/instance: influxdb2
app.kubernetes.io/version: "2.0.6"
app.kubernetes.io/managed-by: Helm
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
spec:
tls:
- hosts:
- "influx2.tbrnt.ch"
secretName: influx2-tbrnt-ch-cert
rules:
- host: influx2.tbrnt.ch
http:
paths:
- path: /
backend:
serviceName: influxdb2
servicePort: http