Skip to content

EAI-7854 Repair YAML block scalar in keycloak realm ConfigMap - #804

Merged
pre merged 1 commit into
mainfrom
EAI-7854-keycloak-realm-yaml
Aug 10, 2026
Merged

EAI-7854 Repair YAML block scalar in keycloak realm ConfigMap#804
pre merged 1 commit into
mainfrom
EAI-7854-keycloak-realm-yaml

Conversation

@pre

@pre pre commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Problem

helm template sources/keycloak-config fails on main:

Error: YAML parse error on keycloak-config/templates/keycloak-realm-templates-cm.yaml:
error converting YAML to JSON: yaml: line 2123: did not find expected key

Root cause

The whole file is a single YAML block scalar (airm-realm.json: |) whose
content is indented by 4 spaces. Commit 0608a00 ("397 remove realm secrets",
#441) emptied the org.keycloak.keys.KeyProvider array but left its closing
bracket at column 0:

        "org.keycloak.keys.KeyProvider": [
]

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-config renders cleanly.
  • Embedded JSON parses: .realm == "airm", KeyProvider array length 0.
  • jq -S diff of the intended JSON payload before vs after is identical,
    so no realm configuration changes.
  • Templated every chart under sources/ that has a Chart.yaml. No other
    chart has this breakage.

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.
@pre
pre requested a review from a team as a code owner August 7, 2026 11:07

@blankdots blankdots left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@pre
pre merged commit c57ad68 into main Aug 10, 2026
7 checks passed
@pre
pre deleted the EAI-7854-keycloak-realm-yaml branch August 10, 2026 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants