Skip to content

Conversation

@lucian-tosa
Copy link
Contributor

@lucian-tosa lucian-tosa commented Dec 18, 2025

Summary

Added a validation for the domain names in replicaSetHorizons. This validation is based on RFC 1123, which means that domain names must:

  • contain no more than 253 characters
  • contain only lowercase alphanumeric characters, '-' or '.'
  • start with an alphanumeric character
  • end with an alphanumeric character

Consequently, domain names must not be empty. This in turn fixes a panic which occured during validation of TLS certificates for the horizon domain names.

Proof of Work

Added unit tests which ensure invalid domain names fail validation

Checklist

  • Have you linked a jira ticket and/or is the ticket in the title?
  • Have you checked whether your jira ticket required DOCSP changes?
  • Have you added changelog file?

@github-actions
Copy link

github-actions bot commented Dec 18, 2025

⚠️ (this preview might not be accurate if the PR is not rebased on current master branch)

MCK 1.6.2 Release Notes

Bug Fixes

  • Fixed a panic that occurred when the domain names for a horizon was empty. Now, if the domain names are not valid (RFC 1123), the validation will fail before reconciling.

@lucian-tosa lucian-tosa marked this pull request as ready for review December 18, 2025 16:07
@lucian-tosa lucian-tosa requested review from a team and vinilage as code owners December 18, 2025 16:07
Comment on lines +1 to +6
---
kind: fix
date: 2025-12-18
---

* Fixed a panic that occurred when the domain names for a horizon was empty. Now, if the domain names are not valid (RFC 1123), the validation will fail before reconciling.
Copy link
Collaborator

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@vinilage Just to make sure you are fully aware of the changes. In case customers have set an invalid domain name, the resource would now be moved to Failed phase, whereas it would be Running previously. This doesn't mean that their domain name worked, it was never validated (not even by OM or mongod).

Copy link
Collaborator

@MaciejKaras MaciejKaras left a comment

Choose a reason for hiding this comment

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

LGTM!

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.

4 participants