code/etcd-inmemory-monitoring/deployment.yaml

52 lines
1.4 KiB
YAML
Raw Normal View History

2023-04-10 18:52:24 +00:00
apiVersion: apps/v1
kind: Deployment
metadata:
2023-04-10 19:23:12 +00:00
name: controllerbackupmonitoring
2023-04-10 18:52:24 +00:00
namespace: monitoring
spec:
selector:
matchLabels:
2023-04-10 19:23:12 +00:00
app: controllerbackupmonitoring
2023-04-10 18:52:24 +00:00
template:
metadata:
labels:
2023-04-10 19:23:12 +00:00
app: controllerbackupmonitoring
2023-04-10 18:52:24 +00:00
spec:
terminationGracePeriodSeconds: 0
tolerations:
- effect: NoSchedule
key: node-role.kubernetes.io/control-plane
operator: Exists
- effect: NoSchedule
key: node-role.kubernetes.io/master
operator: Exists
2023-04-10 19:23:12 +00:00
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: node-role.kubernetes.io/control-plane
operator: Exists
2023-04-10 18:52:24 +00:00
containers:
- name: exporter
image: docker.example.com/filemonitor:1.0
args:
- python3
- -u
- /exporter.py
- backup:/backup/etcd-snapshot-latest.db
- image:/backup/etcdimage
ports:
- containerPort: 8080
protocol: TCP
name: http
volumeMounts:
2023-04-10 19:23:12 +00:00
- name: controllerbackup
2023-04-10 18:52:24 +00:00
mountPath: /backup
readOnly: true
volumes:
2023-04-10 19:23:12 +00:00
- name: controllerbackup
2023-04-10 18:52:24 +00:00
hostPath:
path: /var/lib/wamblee/etcd