Skip to content

add support for BYOC TLS#8

Merged
williamtrelawny merged 3 commits intomainfrom
feat/byoc-tls
Aug 1, 2025
Merged

add support for BYOC TLS#8
williamtrelawny merged 3 commits intomainfrom
feat/byoc-tls

Conversation

@monrax
Copy link
Copy Markdown
Collaborator

@monrax monrax commented Jun 30, 2025

Add support for Bring-Your-Own-Certificate TLS

Copy link
Copy Markdown
Collaborator

@alix-graylog alix-graylog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good. Thanks for adding this!

@monrax
Copy link
Copy Markdown
Collaborator Author

monrax commented Aug 1, 2025

We had the wrong environment variable before: it should be GRAYLOG_HTTP_ENABLE_TLS, not GRAYLOG_ENABLE_TLS. TLS without ingress should work now.

How to test?

  1. Make sure you have a running cluster. If you don't have one, please take a look at CONTRIBUTING.md for instructions on how to set up a local cluster.
  2. Install the Graylog chart
helm install graylog . -n graylog --create-namespace
  1. Generate a self-signed certificate using OpenSSL and store it a kubernetes secret:
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout private.key -out public.crt -subj "/CN=mygraylog"
kubectl create secret tls my-cert --cert=public.crt --key=private.key -n graylog
  1. Add an entry to /etc/hosts (or your DNS provider)
addr=$(kubectl get svc -n graylog graylog-svc --template "{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}")
echo $addr  mygraylog | sudo tee -a /etc/hosts
  1. Enable TLS by upgrading your installation
helm upgrade graylog ./graylog -n graylog --reuse-values --set graylog.config.tls.byoc.enabled=true --set  graylog.config.tls.byoc.secretName="my-cert" --set graylog.config.byoc.cn=mygraylog
  1. Wait for the pods to be recreated, and use cURL to test the connection
curl -kv https://mygraylog:9000/

@monrax
Copy link
Copy Markdown
Collaborator Author

monrax commented Aug 1, 2025

I have tested this with AWS EKS and an external DNS provider already and it works as expected. Please, give it a try and write your observations down below!

Copy link
Copy Markdown
Collaborator

@alix-graylog alix-graylog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not super familiar with the BYO TLS of graylog, but this looks sound to me

@williamtrelawny
Copy link
Copy Markdown
Collaborator

I just tested this on EKS and it works perfectly 🚀

@williamtrelawny williamtrelawny merged commit 575df56 into main Aug 1, 2025
1 check passed
Copy link
Copy Markdown
Collaborator

@williamtrelawny williamtrelawny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works perfectly on EKS!

@williamtrelawny williamtrelawny deleted the feat/byoc-tls branch August 1, 2025 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants