mirror of
https://github.com/auricom/home-cluster.git
synced 2025-10-02 00:34:25 +02:00
47 lines
1.3 KiB
YAML
47 lines
1.3 KiB
YAML
---
|
|
apiVersion: batch/v1
|
|
kind: CronJob
|
|
metadata:
|
|
name: &app vector-geoipupdate
|
|
namespace: monitoring
|
|
spec:
|
|
schedule: "@daily"
|
|
concurrencyPolicy: Forbid
|
|
successfulJobsHistoryLimit: 1
|
|
failedJobsHistoryLimit: 2
|
|
jobTemplate:
|
|
spec:
|
|
ttlSecondsAfterFinished: 86400
|
|
template:
|
|
spec:
|
|
automountServiceAccountToken: false
|
|
restartPolicy: Never
|
|
containers:
|
|
- name: *app
|
|
image: docker.io/maxmindinc/geoipupdate:v4.10
|
|
imagePullPolicy: IfNotPresent
|
|
lifecycle:
|
|
preStop:
|
|
exec:
|
|
command:
|
|
- /bin/sh
|
|
- -c
|
|
- rm -rf /usr/share/GeoIP/.geoipupdate.lock
|
|
env:
|
|
- name: GEOIPUPDATE_EDITION_IDS
|
|
value: GeoLite2-City
|
|
- name: GEOIPUPDATE_FREQUENCY
|
|
value: "0"
|
|
- name: GEOIPUPDATE_VERBOSE
|
|
value: "true"
|
|
envFrom:
|
|
- secretRef:
|
|
name: *app
|
|
volumeMounts:
|
|
- name: *app
|
|
mountPath: /usr/share/GeoIP
|
|
volumes:
|
|
- name: *app
|
|
persistentVolumeClaim:
|
|
claimName: vector-geoipupdate-config
|