birb_latency_collector/k8s/influxdb.yaml
marcsello 35c3643b1a
All checks were successful
continuous-integration/drone/push Build is passing
added persistency to influxdb
2021-12-02 23:34:10 +01:00

100 lines
1.9 KiB
YAML

---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: influxdb-pvc
namespace: turbomemer
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 15Gi
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: birb-latency-influxdb
namespace: turbomemer
labels:
app: birb-latency-influxdb
spec:
replicas: 1
selector:
matchLabels:
app: birb-latency-influxdb
strategy:
type: Recreate
template:
metadata:
labels:
app: birb-latency-influxdb
spec:
volumes:
- name: data
persistentVolumeClaim:
claimName: influxdb-pvc
containers:
- image: "influxdb:2.1"
volumeMounts:
- name: data
mountPath: "/var/lib/influxdb2"
imagePullPolicy: Always
name: birb-latency-influxdb
envFrom:
- configMapRef:
name: birb-latency-influxdb
ports:
- containerPort: 8086
imagePullSecrets:
- name: regcred
---
apiVersion: v1
kind: Service
metadata:
name: birb-latency-influxdb
namespace: turbomemer
labels:
app: birb-latency-influxdb
spec:
ports:
- name: birb-latency-influxdb
port: 8086
targetPort: 8086
protocol: TCP
selector:
app: birb-latency-influxdb
type: ClusterIP
---
apiVersion: v1
kind: Service
metadata:
name: birb-latency-influxdb-pub
namespace: turbomemer
labels:
app: birb-latency-influxdb
spec:
ports:
- name: birb-latency-influxdb-pub
port: 8086
targetPort: 8086
protocol: TCP
selector:
app: birb-latency-influxdb
type: NodePort
---
apiVersion: v1
kind: ConfigMap
metadata:
name: birb-latency-influxdb
labels:
app: birb-latency-influxdb
namespace: turbomemer
data:
DOCKER_INFLUXDB_INIT_USERNAME: admin
DOCKER_INFLUXDB_INIT_PASSWORD: adminadmin
DOCKER_INFLUXDB_INIT_ORG: alma
DOCKER_INFLUXDB_INIT_BUCKET: alma
DOCKER_INFLUXDB_INIT_ADMIN_TOKEN: my-super-secret-auth-token