77 lines
1.5 KiB
YAML
77 lines
1.5 KiB
YAML
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: input-influx
|
|
namespace: birbnetes
|
|
spec:
|
|
type: ClusterIP
|
|
ports:
|
|
- port: 8086
|
|
targetPort: 8086
|
|
protocol: TCP
|
|
selector:
|
|
app: input-influx
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: input-influxdb
|
|
namespace: birbnetes
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app: input-influx
|
|
strategy:
|
|
type: Recreate
|
|
replicas: 1
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: input-influx
|
|
spec:
|
|
containers:
|
|
- name: input-influx
|
|
image: influxdb
|
|
imagePullPolicy: "IfNotPresent"
|
|
ports:
|
|
- containerPort: 8086
|
|
envFrom:
|
|
- configMapRef:
|
|
name: input-influx-config
|
|
volumeMounts:
|
|
- mountPath: /var/lib/influxdb
|
|
name: input-influx-storage
|
|
volumes:
|
|
- name: input-influx-storage
|
|
persistentVolumeClaim:
|
|
claimName: input-influx-storage-pv-claim
|
|
---
|
|
kind: PersistentVolumeClaim
|
|
apiVersion: v1
|
|
metadata:
|
|
name: input-influx-storage-pv-claim
|
|
labels:
|
|
app: input-influx
|
|
namespace: birbnetes
|
|
spec:
|
|
storageClassName: longhorn
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
resources:
|
|
requests:
|
|
storage: 2Gi
|
|
---
|
|
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: input-influx-config
|
|
labels:
|
|
app: input-influx
|
|
namespace: birbnetes
|
|
data:
|
|
INFLUXDB_DB: input-service
|
|
INFLUXDB_USER: output-service
|
|
INFLUXDB_USER_PASSWORD: input-service-supersecret
|
|
INFLUXDB_READ_USER: grafana
|
|
INFLUXDB_READ_USER_PASSWORD: CorrectHorseBatteryStaple
|