Feature: Bring Your Own Opensearch - #135
Merged
Merged
Conversation
| annotations: | ||
| {{- include "graylog.annotations" . | nindent 4 }} | ||
| data: | ||
| GRAYLOG_ELASTICSEARCH_HOSTS: {{ include "graylog.opensearch.hosts" . | b64enc }} |
There was a problem hiding this comment.
This may need a URL encoding guard it looks like graylog.opensearch.hosts contains the username and password from the Opensearch created secret
A generated password with e.g. @ could cause url parsing issues.
Collaborator
Author
There was a problem hiding this comment.
Addressed this, thanks!
| Resolve OpenSearch basic-auth credentials as "user:pass" (empty string if none). | ||
| Inline values win; otherwise read from opensearch.auth.existingSecret via lookup. | ||
| */}} | ||
| {{- define "graylog.opensearch.credentials" -}} |
There was a problem hiding this comment.
Minor nitpick: Might be worth adding a guard here for a set username and no pass and vice-versa
Collaborator
Author
There was a problem hiding this comment.
Good point, I'll make an issue for this to get addressed in the sweep.
alix-graylog
marked this pull request as ready for review
July 30, 2026 17:50
21 tasks
bemcculley-graylog
approved these changes
Jul 30, 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
Adds support for pointing Graylog at an existing, self-managed OpenSearch cluster instead of the bundled Graylog Data Node. Set
datanode.enabled: falseandopensearch.enabled: true, give it a host list plus credentials, and the chart wires upGRAYLOG_ELASTICSEARCH_HOSTSand the CA trust for you.The main target is clusters provisioned by the OpenSearch Kubernetes Operator, since that's what most people building OpenSearch in Kubernetes end up using, but nothing here is operator-specific — any reachable 2.x cluster works.
Details
opensearchvalues block:hosts,auth(existing secret or inline user/pass),tls(enabled,caSecret,caKey). Documented invalues.yamland added tovalues.schema.json.<release>-graylog-opensearch) rather than the main Graylog secret.global.existingSecretNamesuppresses the chart-managed secret, so folding the hosts in there would have silently broken BYO-secret users — this way the two features compose.https://user:pass@host:9200), which is the form Graylog expects. Both halves are percent-encoded, so operator-generated passwords with reserved characters work without anyone having to pre-encode them.auth.existingSecretis resolved withlookupat install/upgrade time. Underhelm template/--dry-runit renders without credentials — called out in the docs so it doesn't read as a bug.mvs it into place, so a failed init can't leave a half-built truststore behind, and public CAs (license checks, GeoIP, HTTP notifications) keep working. The OpenSearch CA is imported under its own alias; the existing BYO-cert path (byoc/byoc-ca) reuses the same store, so both can be active at once.GRAYLOG_SELFSIGNED_STARTUP=falsewhen external OpenSearch is enabled — that flag drives Data Node discovery and has to be off for Graylog to honourelasticsearch_hosts.checksum/opensearch-secretannotation. The secret is consumed viaenvFrom, so without it a host or credential change would update the Secret and leave running pods on the stale connection string.usernameKey/passwordKeyall fail the render with an actionable message instead of producing pods that start and then can't reach an indexer.datanode.enabled— previously they rendered unconditionally.docs/bring-your-own-opensearch.md(requirements, config, credential handling, TLS, caveats), aexamples/values/values-byo-opensearch.yamlstarting point, and a README section. NOTES.txt reports the external cluster instead of a Data Node replica count.Linked issues
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
<cluster>-casecret, credentials from the operator's admin credentials secret. Graylog connects, index sets are created, messages are written and searchable.datanode.enabledandopensearch.enabledtrue, and both false, fail at render with the expected messages.keytool -listin the running pod).tests/byo_opensearch_test.yamlandtests/init_graylog_test.yaml.Notes for reviewers
Two known limitations, both documented in the caveats section:
Worth a close look at the init container rewrite in
config/init-graylog.yaml. It touches the existing BYO Graylog certificate path, not just the new OpenSearch one, so it affects users who aren't enabling this feature at all.