fix(helpers): Prefer an explicit externalUri over the Service lookup - #158
Merged
Conversation
aaronmgn
force-pushed
the
fix/154-externaluri-restarts
branch
3 times, most recently
from
August 3, 2026 19:28
602538c to
5e4b254
Compare
alix-graylog
approved these changes
Aug 3, 2026
alix-graylog
left a comment
Collaborator
There was a problem hiding this comment.
Looks good, thanks!
aaronmgn
force-pushed
the
fix/154-externaluri-restarts
branch
from
August 3, 2026 19:34
5e4b254 to
5aa8904
Compare
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
Setting
graylog.config.network.externalUrinow takes precedence over the Ingress hostnames and the live Service lookup, so a LoadBalancer acquiring or changing its address no longer rolls the Graylog StatefulSet on the next upgrade. The value accepts a full URI or a bare hostname. Also documents thatrollingUpdate.maxUnavailableonly works where theMaxUnavailableStatefulSetfeature gate is enabled.Details
lookupin thegraylog.externalUrihelper. The lookup does not run at all when the value is set. TLS cn keeps its precedence. Following review feedback on this PR, the explicit value now also comes before the Ingress hostnames: an Ingress hostname cannot carry a path prefix, a public port, or a scheme that differs from the Ingress. Installs without an explicit value render exactly as before.http://https://...). Bare hostnames get the scheme and app port as before, with https when TLS is enabled.status.loadBalancer.ingress[0]access so a Service with empty LB status cannot fail the render.maxUnavailablein values.yaml and both README rows.tests/externaluri_test.yamlcovering the precedence and formatting matrix.externalUriand an Ingress hostname now renders the explicit value, so its config checksum changes once and its pods roll once on the next upgrade. Releases that do not setexternalUrirender identically and do not roll.Linked issues
This fixes #154
PR Checklist
Please check the items that apply to your change.
Testing Checklist
Static Validation
helm lint ./charts/grayloghelm template graylog ./charts/graylog --validateInstallation
helm install graylog ./charts/graylogkubectl rollout status statefulset/grayloghelm test graylogFunctional (if applicable)
Upgrade (if applicable)
Specific to this PR
externalUripinned while LB status existed, the explicit value won, the config checksum stayed identical across repeated upgrades, and the StatefulSet generation never moved. Stack came up healthy (server, Datanode, external MongoDB 7.0.25) and/api/system/lbstatusanswered ALIVE through the LB, with the pinned URI in the pod env. Full unit suite passes (177 tests).externalUriset to a different host, the running container held the explicit URI and/api/system/lbstatusstill answered ALIVE through the Ingress. Upgrading an existing release from this branch's previous state changed the config checksum once for the both-values-set case and not at all for releases withoutexternalUri.Notes for reviewers