/
influx-statefulset.yaml
81 lines (81 loc) · 2.02 KB
/
influx-statefulset.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
apiVersion: apps/v1
kind: StatefulSet
metadata:
labels:
app: influxdb
name: influxdb
spec:
replicas: 1
selector:
matchLabels:
app: influxdb
serviceName: influxdb
template:
metadata:
labels:
app: influxdb
spec:
volumes:
- name: persistent-storage-config
persistentVolumeClaim:
claimName: influxdb-ebs-claim-config
- name: persistent-storage-data
persistentVolumeClaim:
claimName: influxdb-ebs-claim-data
containers:
- image: influxdb:2.4
volumeMounts:
- name: persistent-storage-config
mountPath: /etc/influxdb2
- name: persistent-storage-data
mountPath: /var/lib/influxdb2
env:
- name: DOCKER_INFLUXDB_INIT_MODE
value: "setup"
- name: DOCKER_INFLUXDB_INIT_USERNAME
value: "christian"
- name: DOCKER_INFLUXDB_INIT_PASSWORD
value: "funkypassword"
- name: DOCKER_INFLUXDB_INIT_ORG
value: "phobosys"
- name: DOCKER_INFLUXDB_INIT_BUCKET
value: "sensor"
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 3
httpGet:
path: /health
port: api
scheme: HTTP
initialDelaySeconds: 30
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 5
name: influxdb
ports:
- containerPort: 8086
name: api
protocol: TCP
readinessProbe:
failureThreshold: 3
httpGet:
path: /health
port: api
scheme: HTTP
initialDelaySeconds: 5
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
---
apiVersion: v1
kind: Service
metadata:
name: influxdb-service
spec:
ports:
- port: 8086
targetPort: 8086
protocol: TCP
type: NodePort
selector:
app: influxdb