Repository navigation
Configure PostHog without repeated thunderd restarts - #59
Merged
Merged
Conversation
rohanphadnis-thunder
approved these changes
Sep 11, 2026
brianmodel
requested changes
Sep 11, 2026
brianmodel
left a comment
Contributor
There was a problem hiding this comment.
We shouldn't have any logic for posthog specifically, it should just be extra env so that we can add arbitrary env variables to this
brianmodel
approved these changes
Sep 11, 2026
brianmodel
left a comment
Contributor
There was a problem hiding this comment.
Looks good, do we need to rebuild tags?
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.
Behavior:
THUNDERD_ENV_<key>. It places the variables in/etc/thunder/thunderd.env.Note
Medium Risk
The privileged daemon writes to host
/etc/thunder/thunderd.envfrom operator-supplied env (often secrets); misconfiguration or partial writes could affect thunderd behavior, though errors are non-fatal to the reconcile loop.Overview
Adds Helm
daemon.extraEnvso operators can inject extra daemon container environment variables (including secrets viavalueFrom), with chart schema, DaemonSet rendering, and README guidance.The daemon now reads
THUNDERD_ENV_<key>variables at startup intoConfig.ThunderdEnv, then once per pod start (before enrollment/repair) merges those keys into the host/etc/thunder/thunderd.envvia an atomic shell write using newRunShellInput(stdin keeps values off the command line). Unrelated file content is preserved; unchanged effective values skip writes; failures are logged and do not block DRA startup or retry on reconcile. thunderd is not restarted—settings apply on its next start.Reconcile tests were adjusted so dangling systemd symlink fixtures use host-style absolute targets, matching how the sweep reports paths.
Reviewed by Cursor Bugbot for commit 6980d8a. Bugbot is set up for automated code reviews on this repo. Configure here.