feat(base): pass cloudwatch service account annotations for IRSA support#441
Merged
Merged
Conversation
Add cloudwatch_service_account_annotations (map(string)) rendered into the base chart's cloudwatch.serviceAccount.annotations only when cloudwatch is enabled and the map is non-empty, so the logs controller ServiceAccount can carry an eks.amazonaws.com/role-arn and reach CloudWatch via IRSA instead of the node instance role. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
gdrojas
reviewed
Jul 16, 2026
Only render cloudwatch.serviceAccount.annotations when cloudwatch is enabled, matching the base chart's own gate and the module's intent. Addresses review feedback on #441. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
gdrojas
approved these changes
Jul 16, 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.
What
Adds a new input
cloudwatch_service_account_annotations(map(string), default{}) to thenullplatform/basemodule and renders it into the base chart'scloudwatch.serviceAccount.annotations.The block is rendered only when
cloudwatch_enabledis true and the map is non-empty, so nothing changes for existing consumers.Why
The base chart's logs controller runs under the
nullplatform-pod-metadata-reader-saServiceAccount. Until now that SA carried no annotations and there was no way to pass any through this module, so on EKS the controller could only reach CloudWatch via the node instance role (broad, node-wide privilege).With this change you can set
eks.amazonaws.com/role-arnon the SA and use IRSA — a scoped IAM role for just the logs controller — instead of granting CloudWatch to every pod on the node.Changes
variables.tf— newcloudwatch_service_account_annotationsvariablelocals.tf— pass the map intotemplatefile()templates/nullplatform_base_values.tmpl.yaml— conditionalserviceAccount.annotationsblockREADME.md— inputs table + AI metadata entryUsage
Testing
serviceAccountblock).tofu fmtclean.BEGIN_AI_METADATAJSON re-validated after the README edit.🤖 Generated with Claude Code