2020-04-12 23:31:49 +02:00
|
|
|
apiVersion: v1
|
|
|
|
kind: Service
|
|
|
|
metadata:
|
|
|
|
name: output-influx
|
|
|
|
namespace: birbnetes
|
|
|
|
spec:
|
|
|
|
type: ClusterIP
|
|
|
|
ports:
|
|
|
|
- port: 8086
|
|
|
|
targetPort: 8086
|
|
|
|
protocol: TCP
|
|
|
|
selector:
|
|
|
|
app: output-influx
|
|
|
|
---
|
2020-04-13 00:37:35 +02:00
|
|
|
apiVersion: apps/v1
|
2020-04-12 23:31:49 +02:00
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: output-influxdb
|
2020-04-12 23:33:22 +02:00
|
|
|
namespace: birbnetes
|
2020-04-12 23:31:49 +02:00
|
|
|
spec:
|
2020-04-13 01:08:01 +02:00
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app: output-influx
|
|
|
|
strategy:
|
|
|
|
type: Recreate
|
2020-04-12 23:31:49 +02:00
|
|
|
replicas: 1
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: output-influx
|
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- name: output-influx
|
|
|
|
image: influxdb
|
|
|
|
imagePullPolicy: "IfNotPresent"
|
|
|
|
ports:
|
|
|
|
- containerPort: 8086
|
|
|
|
envFrom:
|
|
|
|
- configMapRef:
|
|
|
|
name: output-influx-config
|
|
|
|
volumeMounts:
|
|
|
|
- mountPath: /var/lib/influxdb
|
|
|
|
name: output-influx-storage
|
|
|
|
volumes:
|
|
|
|
- name: output-influx-storage
|
|
|
|
persistentVolumeClaim:
|
|
|
|
claimName: output-influx-storage-pv-claim
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: PersistentVolume
|
|
|
|
metadata:
|
|
|
|
name: birbnetes-nfs-output-influx
|
|
|
|
namespace: birbnetes
|
|
|
|
spec:
|
|
|
|
capacity:
|
|
|
|
storage: 10Gi
|
|
|
|
accessModes:
|
|
|
|
- ReadWriteMany
|
|
|
|
persistentVolumeReclaimPolicy: Recycle
|
|
|
|
nfs:
|
|
|
|
server: 192.168.100.1
|
2020-04-13 01:16:31 +02:00
|
|
|
path: /srv/kubedata/birbnetes/outflux
|
2020-04-12 23:31:49 +02:00
|
|
|
---
|
|
|
|
kind: PersistentVolumeClaim
|
|
|
|
apiVersion: v1
|
|
|
|
metadata:
|
|
|
|
name: output-influx-storage-pv-claim
|
|
|
|
labels:
|
|
|
|
app: output-influx
|
|
|
|
namespace: birbnetes
|
|
|
|
spec:
|
|
|
|
accessModes:
|
|
|
|
- ReadWriteMany
|
|
|
|
resources:
|
|
|
|
requests:
|
|
|
|
storage: 10Gi
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: ConfigMap
|
|
|
|
metadata:
|
|
|
|
name: output-influx-config
|
|
|
|
labels:
|
|
|
|
app: output-influx
|
|
|
|
namespace: birbnetes
|
|
|
|
data:
|
|
|
|
INFLUXDB_DB: output-service
|
2020-04-13 01:09:24 +02:00
|
|
|
INFLUXDB_HTTP_AUTH_ENABLED: "true"
|
2020-04-12 23:31:49 +02:00
|
|
|
INFLUXDB_WRITE_USER: output-service
|
|
|
|
INFLUXDB_WRITE_USER_PASSWORD: output-service-supersecret
|