178 lines
5.5 KiB
YAML
178 lines
5.5 KiB
YAML
---
|
|
# Source: influxdb2/templates/serviceaccount.yaml
|
|
apiVersion: v1
|
|
kind: ServiceAccount
|
|
metadata:
|
|
name: influxdb2
|
|
labels:
|
|
app.kubernetes.io/name: influxdb2
|
|
app.kubernetes.io/instance: influxdb2
|
|
app.kubernetes.io/version: "2.2.0"
|
|
app.kubernetes.io/managed-by: Helm
|
|
helm.sh/chart: influxdb2-2.1.0
|
|
---
|
|
# Source: influxdb2/templates/secret.yaml
|
|
apiVersion: v1
|
|
kind: Secret
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: influxdb2
|
|
app.kubernetes.io/instance: influxdb2
|
|
app.kubernetes.io/version: "2.2.0"
|
|
app.kubernetes.io/managed-by: Helm
|
|
helm.sh/chart: influxdb2-2.1.0
|
|
name: influxdb2-auth
|
|
data:
|
|
admin-token: "OExhWEtOZEw3d1RxWTYwbVhQQldBYXM0WU1LbUFiQ3k="
|
|
admin-password: "MktzU3pRS0k4NlhaaXVHOG1nMjhFbU4wQXNMUFdTY04="
|
|
---
|
|
# Source: influxdb2/templates/service.yaml
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: influxdb2
|
|
labels:
|
|
app.kubernetes.io/name: influxdb2
|
|
app.kubernetes.io/instance: influxdb2
|
|
app.kubernetes.io/version: "2.2.0"
|
|
app.kubernetes.io/managed-by: Helm
|
|
helm.sh/chart: influxdb2-2.1.0
|
|
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
|
|
app.kubernetes.io/instance: influxdb2
|
|
app.kubernetes.io/version: "2.2.0"
|
|
app.kubernetes.io/managed-by: Helm
|
|
helm.sh/chart: influxdb2-2.1.0
|
|
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
|
|
spec:
|
|
volumes:
|
|
- name: data
|
|
persistentVolumeClaim:
|
|
claimName: influxdb2-data-influxdb2-0
|
|
serviceAccountName: influxdb2
|
|
containers:
|
|
- name: influxdb2
|
|
image: "influxdb:2.6.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/influxdb2/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/influxdb2
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: http
|
|
scheme: HTTP
|
|
initialDelaySeconds: 0
|
|
periodSeconds: 10
|
|
timeoutSeconds: 1
|
|
failureThreshold: 3
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: http
|
|
scheme: HTTP
|
|
initialDelaySeconds: 0
|
|
periodSeconds: 10
|
|
timeoutSeconds: 1
|
|
successThreshold: 1
|
|
failureThreshold: 3
|
|
volumeMounts:
|
|
- name: data
|
|
mountPath: /var/lib/influxdb2
|
|
subPath:
|
|
resources:
|
|
{}
|
|
---
|
|
# Source: influxdb2/templates/ingress.yaml
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: influxdb2
|
|
labels:
|
|
app.kubernetes.io/name: influxdb2
|
|
app.kubernetes.io/instance: influxdb2
|
|
app.kubernetes.io/version: "2.2.0"
|
|
app.kubernetes.io/managed-by: Helm
|
|
helm.sh/chart: influxdb2-2.1.0
|
|
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: /
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: influxdb2
|
|
port:
|
|
number: 80
|