Skip to content

Conversation

@mauricioharley
Copy link

The bgp-l3-xl adoption configuration (PR #1098) introduced Jinja2 whitespace control operators ({%+ and +%}) that cause incorrect YAML indentation when the bgp conditional block is skipped.

When bgp is false (the default for most adoption scenarios), the generated nodeset-cell1.yaml file has invalid YAML syntax:

edpm_telemetry_node_exporter_image: "..."
            edpm_container_registry_logins:    <- 16 spaces instead of 8
  images.paas.redhat.com:

This causes the error:
yaml: line 139: did not find expected key

Changes:

  • Replace {% endif %} with {% endif -%} to trim trailing newline
  • Replace {% if bgp | bool +%} with {% if bgp | bool %} to avoid preserving extra whitespace
  • Replace {%+ endif +%} with {% endif -%} for consistent trimming
  • Replace {%- if ... -%} with {% if ... %} for the registry_logins block
  • Remove incorrect {{ login | indent(10) }} filter that was applying indentation to the login string content rather than the line

The bgp-l3-xl adoption configuration (PR openstack-k8s-operators#1098) introduced Jinja2
whitespace control operators ({%+ and +%}) that cause incorrect YAML
indentation when the bgp conditional block is skipped.

When bgp is false (the default for most adoption scenarios), the
generated nodeset-cell1.yaml file has invalid YAML syntax:

    edpm_telemetry_node_exporter_image: "..."
                edpm_container_registry_logins:    <- 16 spaces instead of 8
      images.paas.redhat.com:

This causes the error:
    yaml: line 139: did not find expected key

Changes:
- Replace {% endif %} with {% endif -%} to trim trailing newline
- Replace {% if bgp | bool +%} with {% if bgp | bool %} to avoid
  preserving extra whitespace
- Replace {%+ endif +%} with {% endif -%} for consistent trimming
- Replace {%- if ... -%} with {% if ... %} for the registry_logins block
- Remove incorrect {{ login | indent(10) }} filter that was applying
  indentation to the login string content rather than the line

Signed-off-by: Mauricio Harley <[email protected]>
@openshift-ci
Copy link

openshift-ci bot commented Jan 16, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign holser for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

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.

1 participant