Skip to content

Conversation

edimarlnx
Copy link
Contributor

Summary

This PR replaces hardcoded cluster.local DNS suffix with a configurable CLUSTER_DOMAIN environment variable across the search controller components. This change improves flexibility for deployments in Kubernetes clusters that use custom cluster domains.

Changes:

  • Modified CommunitySearchSource.HostSeeds() to use configurable cluster domain
  • Updated EnterpriseResourceSearchSource.HostSeeds() to use configurable cluster domain
  • Updated mongotHostAndPort() function to use configurable cluster domain
  • Added env.ReadOrDefault("CLUSTER_DOMAIN", "cluster.local") calls to maintain backward compatibility

Proof of Work

  • ✅ All hardcoded cluster.local references in search controller replaced with environment variable
  • ✅ Backward compatibility maintained with default fallback to cluster.local
  • ✅ Changelog file added documenting the fix
  • ✅ Code follows existing patterns using pkg/util/env.ReadOrDefault()

Files modified:

  • controllers/searchcontroller/community_search_source.go:30
  • controllers/searchcontroller/enterprise_search_source.go:28
  • controllers/searchcontroller/mongodbsearch_reconcile_helper.go:409

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?

The PR is ready! The commit already includes the changelog file as required by the contributing guidelines.

@edimarlnx
Copy link
Contributor Author

Opened a new pull request from a specific branch: #481

@edimarlnx edimarlnx closed this Sep 26, 2025
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