2024-10-29 13:22:30 +01:00
|
|
|
---
|
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: fail2ban-geoip
|
|
|
|
app.kubernetes.io/instance: fail2ban-prometheus
|
|
|
|
app.kubernetes.io/name: fail2ban-geoip
|
|
|
|
name: fail2ban-geoip
|
|
|
|
namespace: fail2ban-prometheus
|
|
|
|
spec:
|
|
|
|
replicas: 2
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app: fail2ban-geoip
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: fail2ban-geoip
|
|
|
|
app.kubernetes.io/instance: fail2ban-prometheus
|
|
|
|
app.kubernetes.io/name: fail2ban-geoip
|
|
|
|
spec:
|
|
|
|
affinity:
|
|
|
|
podAntiAffinity:
|
|
|
|
preferredDuringSchedulingIgnoredDuringExecution:
|
|
|
|
- podAffinityTerm:
|
|
|
|
labelSelector:
|
|
|
|
matchExpressions:
|
|
|
|
- key: app
|
|
|
|
operator: In
|
|
|
|
values:
|
|
|
|
- fail2ban-geoip
|
|
|
|
topologyKey: kubernetes.io/hostname
|
|
|
|
weight: 1
|
|
|
|
containers:
|
|
|
|
- env:
|
|
|
|
- name: GEOIP_LISTEN_ADDRESS
|
|
|
|
value: :8080
|
2024-11-28 12:07:47 +01:00
|
|
|
- name: GEOIP_EXPORTER_ADDRESS
|
|
|
|
value: :9191
|
|
|
|
- name: GEOIP_ENABLE_EXPORTER
|
2024-11-28 12:37:14 +01:00
|
|
|
value: "true"
|
2024-10-29 13:22:30 +01:00
|
|
|
- name: GEOIP_DATA_URL
|
|
|
|
value: https://data.neuber.io/data.csv
|
|
|
|
image: git.ar21.de/yolokube/country-geo-locations:latest
|
|
|
|
imagePullPolicy: IfNotPresent
|
|
|
|
name: fail2ban-geoip
|
|
|
|
ports:
|
|
|
|
- containerPort: 8080
|
|
|
|
name: http
|
|
|
|
protocol: TCP
|
2024-11-28 12:07:47 +01:00
|
|
|
- containerPort: 9191
|
2024-11-28 12:38:42 +01:00
|
|
|
name: http-metrics
|
2024-11-28 12:07:47 +01:00
|
|
|
protocol: TCP
|
2024-10-29 13:22:30 +01:00
|
|
|
readinessProbe:
|
|
|
|
httpGet:
|
|
|
|
httpHeaders:
|
|
|
|
- name: Accept
|
|
|
|
value: application/json
|
|
|
|
path: /api/v1/location/1.1.1.1
|
|
|
|
port: http
|
|
|
|
initialDelaySeconds: 3
|
|
|
|
periodSeconds: 2
|
|
|
|
resources:
|
|
|
|
limits:
|
|
|
|
cpu: "2"
|
|
|
|
memory: 4Gi
|
|
|
|
requests:
|
|
|
|
cpu: "1.5"
|
|
|
|
memory: 3.5Gi
|
|
|
|
serviceAccountName: fail2ban-geoip-service-account
|