Fix configmaps key in ResourceMap leading to controllers not being able to mark themselves as initialized#1061
Merged
msafwankarim merged 1 commit intoDec 10, 2025
Conversation
…le to mark themselves as initialized
msafwankarim
approved these changes
Dec 10, 2025
3 tasks
msafwankarim
pushed a commit
that referenced
this pull request
Jun 15, 2026
PR #1061 renamed the configmap key in kube.ResourceMap from "configMaps" (camelCase) to "configmaps" (lowercase) to fix controllers not being able to mark themselves as initialized. However, two callers were not updated to match the new canonical key: 1. The Helm chart's deployment template still emits `--resources-to-ignore=configMaps` (camelCase) when `reloader.ignoreConfigMaps: true` is set. 2. The validation in `GetIgnoredResourcesList` only accepts the legacy camelCase spelling. Because `ignoredResourcesList.Contains(k)` uses case-sensitive string equality, the lookup against the new lowercase ResourceMap key never matches. The configmaps controller is created and starts watching ConfigMaps cluster-wide, even though the chart's ClusterRole template (also gated on `ignoreConfigMaps`) does not grant permission for it. The resulting pod logs are full of: configmaps is forbidden: User "system:serviceaccount:reloader:reloader-reloader" cannot list resource "configmaps" in API group "" at the cluster scope This change: - Updates the chart deployment template to emit the canonical lowercase `configmaps` value. - Normalizes the input in `GetIgnoredResourcesList`, accepting both `configMaps` (legacy, for backward compatibility with users who pass the flag directly) and `configmaps` (canonical), and emitting the canonical form to the caller. - Updates the flag help text and adds tests covering both spellings.
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.
This addresses issue #1060 by fixing the constant used in ResourceMap for configmaps.