feat(geo-ip): Setting up side car geoip update, working downloads - #129
Merged
Conversation
alix-graylog
marked this pull request as ready for review
July 20, 2026 17:54
bemcculley-graylog
approved these changes
Jul 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Migrate GeoIP database updates from a standalone Kubernetes
CronJobto a sidecar container on the Graylog StatefulSet pods. The CronJob mounted Graylog'sReadWriteOncePVC from a separate pod, causing Multi-Attach errors on multi-node clusters and breakinghelm install/upgrade. Runninggeoipupdateas a sidecar in the same pod eliminates the attach conflict and refreshes the database on a schedule without pod restarts.Details
_geoip-sidecar.tpl) added to the Graylog StatefulSet, rendered only whengeolocation.enabledandgeolocation.sidecar.enabledare true and credentials are available.config/geoip-sidecar-entrypoint.yaml) providing the in-pod cron scheduling script; mounted read-only at/geoip-scripts, with ageoip-tmpemptyDir at/tmpand the shared data volume at/usr/share/data/geolocation.templates/workload/cronjobs/geoip.yamland thegraylog.geoip.job.spechelper in_helpers.tpl.values.yaml,values.schema.json):graylog.config.geolocation.sidecar.{enabled,image,schedule,resources,securityContext}.graylog.config.geolocation.maxmindGeoIp.editionIds(parametrized; was hardcoded).maxmindinc/geoipupdate:7.1.1(waslatest).maxmindGeoIp.cronScheduleandmaxmindGeoIp.postInstallRun.GEO_IP_MAXMIND_ACCOUNT_ID/GEO_IP_MAXMIND_LICENSE_KEY, compatible withglobal.existingSecretName. Template fails with a clear message if credentials are missing while the sidecar is enabled.docs/GeoIP_Sidecar_Deployment_Guide.md._*.tplpartial so helm-unittest's scopedtemplates:suites can resolve theinclude, and removed the obsoletegeoip_cronjob_test.yamlsuite that targeted the deleted CronJob template.Linked issues
This fixes #101
PR Checklist
Testing Checklist
Static Validation
helm lint ./charts/grayloghelm template graylog ./charts/graylog(geolocation on and off both render, exit 0)Installation
helm install graylog ./charts/graylogkubectl rollout status statefulset/grayloghelm test graylogSpecific to this PR
helm unittest charts/graylog→ 6 suites / 54 tests passing (helm-unittest v1.0.3, helm v3.17)global.existingSecretNamepath works with the requiredGEO_IP_MAXMIND_*keysNotes for reviewers
Reviewer note:
charts/graylog/tests/unit/geolocation_sidecar_test.yamlis not executed by CI — the plugin glob istests/*_test.yaml(non-recursive), so nothing undertests/unit/runs. If moved intotests/as-is it would fail (missingconfig/graylog.yamlin itstemplates:list, and off-by-one env-index assertions: editionIds isenv[2]not[3], schedule isenv[5]not[6]). Suggested follow-up: fix and relocate it to restore the sidecar coverage previously provided by the deleted CronJob suite.