Files
home-docker/influxdb.yml
T
2020-05-03 22:42:51 +10:00

91 lines
1.9 KiB
YAML

apiVersion: apps/v1
kind: Deoyment
metadata:
name: influxdb
spec:
selector:
matchLabels:
app: influxdb
replicas: 1
template:
metadata:
labels:
app: influxdb
spec:
volumes:
- name: data
hostPath:
path: /mnt/influxdb
type: Directory
containers:
- name: influxdb
image: influxdb:latest
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8086
name: influxdb-port
protocol: TCP
env:
- name: INFLUXDB_DB
value: home
- name: INFLUXDB_DATA_ENGINE
value: tsm1
- name: INFLUXDB_REPORTING_DISABLED
value: "false"
- name: INFLUXDB_ADMIN_USER
value: junv
- name: INFLUXDB_ADMIN_PASSWORD
value: "Lovewifi2020!"
- name: INFLUXDB_HTTP_AUTH_ENABLED
value: "true"
volumeMounts:
- name: data
mountPath: /var/lib/influxdb
resources:
requests:
cpu: 500m
memory: 1024Mi
limits:
cpu: 800m
memory: 1524Mi
---
apiVersion: v1
kind: Service
metadata:
name: influxdb
labels:
app: influxdb
spec:
type: ClusterIP
ports:
- port: 8086
targetPort: influxdb-port
protocol: TCP
name: web
selector:
app: influxdb
---
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: influxdb-ingress
annotations:
kubernetes.io/ingress.class: "nginx"
kubernetes.io/tls-acme: "true"
cert-manager.io/cluster-issuer: "letsencrypt-prod"
spec:
tls:
- hosts:
- influx.home.toozhao.com
secretName: influxdb-tls
rules:
- host: influx.home.toozhao.com
http:
paths:
- backend:
serviceName: influxdb
servicePort: 8086
path: /