pkg/network
Prashanth Josyula 874da3bea6
Edit CLUSTER_DOMAIN environment variable support (#3283)
* Edit CLUSTER_DOMAIN environment variable support for custom cluster domains

This change modifies the getClusterDomainName() function to prioritize
the CLUSTER_DOMAIN environment variable over /etc/resolv.conf parsing,
enabling explicit configuration of cluster domains.

This is particularly useful when using service mesh configurations where
the internal DNS domain (e.g., mesh.net) differs from the Kubernetes
cluster domain.

Changes:
- Modified getClusterDomainName() to check CLUSTER_DOMAIN env var first
- Falls back to /etc/resolv.conf parsing if env var is not set
- Updated tests to validate precedence behavior
- Added test cases for custom domain scenarios

* Edit CLUSTER_DOMAIN environment variable support for custom cluster domains

This change modifies the getClusterDomainName() function to prioritize
the CLUSTER_DOMAIN environment variable over /etc/resolv.conf parsing,
enabling explicit configuration of cluster domains.

This is particularly useful when using service mesh configurations where
the internal DNS domain (e.g., mesh.net) differs from the Kubernetes
cluster domain.

Changes:
- Modified getClusterDomainName() to check CLUSTER_DOMAIN env var first
- Falls back to /etc/resolv.conf parsing if env var is not set
- Updated tests to validate precedence behavior
- Added test cases for custom domain scenarios
2025-11-04 01:56:47 +00:00
..
handlers
depcheck_test.go
doc.go
domain.go Edit CLUSTER_DOMAIN environment variable support (#3283) 2025-11-04 01:56:47 +00:00
domain_test.go Edit CLUSTER_DOMAIN environment variable support (#3283) 2025-11-04 01:56:47 +00:00
error_handler.go
h2c.go
network.go
network_test.go
transports.go
transports_test.go