Skip to content

fix: accept IPv6 addresses in HP_K8S_HOST_ALIASES - #146

Merged
oleksandr-nc merged 1 commit into
mainfrom
fix/k8s-host-aliases-ipv6
Oct 22, 2026
Merged

oleksandr-nc merged 1 commit into
mainfrom
fix/k8s-host-aliases-ipv6

Conversation

@oleksandr-nc

@oleksandr-nc oleksandr-nc commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

HP_K8S_HOST_ALIASES entries are split at the last :, so an IPv6 address breaks them: nextcloud.example.com:fd00::5 becomes the address 5 and the host name nextcloud.example.com:fd00:. Kubernetes then rejects the whole ExApp Deployment, valid aliases in the same list included (spec.template.spec.hostAliases[0].ip: Invalid value: "5": must be a valid IP address), so every ExApp install on the Kubernetes backend fails with 503.

Changes

  • Entries are split at the first :, as Docker's --add-host does, and brackets around an IPv6 address are removed.
  • The README says that an IPv6 address may be written with or without brackets.

Entries with an IPv4 address are parsed as before.

Signed-off-by: Oleksandr Piskun <oleksandr2088@icloud.com>
@coderabbitai

coderabbitai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e140e44f-78a9-4cad-aab9-48171559c295
📥 Commits

Reviewing files that changed from the base of the PR and between 05dbfe1 and 905cb26.

📒 Files selected for processing: 3
  • README.md
  • haproxy_agent.py
  • tests/unit/test_requests.py

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Walkthrough

The host alias parser now splits entries at the first colon and removes surrounding square brackets from addresses. Added tests cover IPv4 and IPv6 mappings, including multiple hostnames sharing one IP. The README example now includes a bracketed IPv6 address.

Priority: ➖ Normal

Merge Risk: ⚪ Minimal · up to 905cb

No actionable merge-blocking risk remains.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 2 files. (1 skipped: 1… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: adding IPv6 support to HP_K8S_HOST_ALIASES.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The pull request description directly explains the IPv6 parsing defect, the Kubernetes failure, and the changes to alias parsing and documentation.
Full details: Docstring Coverage

Explanation

Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 2 files. (1 skipped: 1 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@oleksandr-nc
oleksandr-nc merged commit fae0171 into main Oct 22, 2026
18 checks passed
@oleksandr-nc
oleksandr-nc deleted the fix/k8s-host-aliases-ipv6 branch October 22, 2026 08:24
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