Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-62001

fix indentation and go indentation issues for haproxy

XMLWordPrintable

    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • None
    • Low
    • None
    • None
    • Rejected
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Description

      The current haproxy-config.template uses inconsistent whitespace and indentation around template actions (e.g., {{ if .BindPorts -}}). This leads to:

      • Misaligned indentation of nested if/with blocks
      • Extra or missing blank lines in the rendered haproxy.config
      • Reduced readability of template actions compared to the intended nesting structure

      We should update the template to:

      • Place top-level actions (like {{ if .BindPorts -}}) at level 0
      • Indent nested actions consistently (2 spaces per level)
      • Remove unnecessary "\n" insertions where:
      {{-}}/{{-}} 
      

      trimming can handle spacing

      • Ensure rendered haproxy.config has correct grouping of stanzas (frontend, listen, etc.), without stray or duplicated blank lines

      Acceptance Criteria

      • haproxy-config.template is reformatted so that:
        • Top-level actions begin at column 0
        • Nested actions are indented exactly one level (2 spaces)
        • Blank lines appear only where semantically appropriate (before a block, not after its keyword)
      • Rendered haproxy.config matches expected output with:
        • No leading spaces before keywords like "frontend public"
        • Consistent indentation of all conditional blocks
        • No extra blank lines between directives inside a block
      • Commit message should note that this change addresses formatting only (no functional changes)

              nid-team-bot NID Team Bot
              btofelrh Brett Tofel
              None
              None
              Shudi Li Shudi Li
              None
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: