EAI-7854 Repair YAML block scalar in keycloak realm ConfigMap - #804
Open
pre wants to merge 1 commit into
Open
Conversation
The airm-realm.json value is a YAML block scalar with 4-space indented content. The closing bracket of the emptied KeyProvider array sat at column 0, which terminates the block scalar early, so the parser read it as a new mapping key. This made 'helm template sources/keycloak-config' fail with 'line 2123: did not find expected key'. Indenting the bracket restores rendering. The embedded JSON is byte-identical after re-parsing, the empty array was intentional.
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.
Problem
helm template sources/keycloak-configfails onmain:Root cause
The whole file is a single YAML block scalar (
airm-realm.json: |) whosecontent is indented by 4 spaces. Commit 0608a00 ("397 remove realm secrets",
#441) emptied the
org.keycloak.keys.KeyProviderarray but left its closingbracket at column 0:
A column-0 line terminates the block scalar, so the parser stops treating the
rest of the JSON as scalar content and reads
]as a new mapping key.Fix
Indent the bracket onto the same line. Emptying the array was intentional in
0608a00, only the indentation was wrong.
Verification
helm template sources/keycloak-configrenders cleanly..realm == "airm",KeyProviderarray length 0.jq -Sdiff of the intended JSON payload before vs after is identical,so no realm configuration changes.
sources/that has aChart.yaml. No otherchart has this breakage.