-
Bug
-
Resolution: Unresolved
-
Undefined
-
None
-
4.20
-
Quality / Stability / Reliability
-
False
-
-
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)