Add grafana.initContainers for Airgapped Analytics - #941
Merged
Conversation
marcleblanc2
enabled auto-merge (squash)
September 5, 2026 01:27
filiphaftek
approved these changes
Sep 11, 2026
Grafana provisions datasources within ~1s of starting and exits if a
`$__file{}` referenced by datasources.yml doesn't exist yet. A sidecar
under `grafana.extraContainers` that writes that file races grafana on
pod start, and grafana crash-loops until the file appears.
`grafana.initContainers` lets the sidecar be a native sidecar init
container (`restartPolicy: Always`) with a startupProbe on the file, so
the kubelet holds grafana until the file is written.
Amp-Thread-ID: https://ampcode.com/threads/T-01a06eff-f826-72a5-9ee6-29e07f496a87
Co-authored-by: Amp <amp@ampcode.com>
marcleblanc2
force-pushed
the
marc/grafana-init-containers
branch
from
September 11, 2026 09:48
921e2f9 to
7040487
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.
Adding
grafana.initContainers, so we can create a native sidecar using the aws-cli Docker image for Airgapped Analytics to work for customers using AWS RDS with IRSA authentication, without the Grafana pod crashing and rebooting twice before stabilizing. Follow-up to #924.Checklist
Test plan
Tested with values:
helm templaterendersrds-tokenunderspec.template.spec.initContainerswithrestartPolicy: Always,grafanaalone undercontainers, andserviceAccountName: grafana-irsakubectl create --dry-run=serveraccepts the rendered StatefulSet on EKS 1.36initContainers: []) render noinitContainerskey, so existing deployments are unchangedhelm unittest charts/sourcegraph: 137 passed;helm lint: clean