fix(helm): make the cluster DNS domain configurable#2209
fix(helm): make the cluster DNS domain configurable#2209shekhargit1912 wants to merge 3 commits into
Conversation
The chart hardcoded `cluster.local` when building in-cluster service URLs, so installs on clusters configured with a different DNS domain rendered unreachable addresses that had to be patched by hand after every upgrade. Add a `clusterDomain` value (default `cluster.local`) and use it to build the A2A base URL, the nginx controller upstream, and the bundled PostgreSQL connection string. Existing installs are unaffected: when the value is unset the templates render exactly as before. Fixes kagent-dev#1767 Signed-off-by: shekhargit1912 <shekharchaugule302@gmail.com>
There was a problem hiding this comment.
Pull request overview
This PR makes the Kubernetes cluster DNS domain configurable in the Helm chart so in-cluster service URLs don’t assume cluster.local, addressing installs on clusters with a custom cluster-domain (Fixes #1767).
Changes:
- Added a new
clusterDomainvalue (defaulting tocluster.local) invalues.yaml. - Updated helper templates to build the controller A2A base URL and nginx upstream authority using the configured cluster domain.
- Updated the bundled PostgreSQL connection string template and added Helm unit tests covering custom
clusterDomain.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| helm/kagent/values.yaml | Introduces clusterDomain value and updates the documented default for controller.a2aBaseUrl. |
| helm/kagent/tests/ui-deployment_test.yaml | Adds a test asserting UI internal backend URL uses the custom cluster domain. |
| helm/kagent/tests/controller-deployment_test.yaml | Adds tests asserting A2A base URL and bundled Postgres URL incorporate the custom cluster domain. |
| helm/kagent/templates/controller-deployment.yaml | Uses clusterDomain when constructing the bundled Postgres connection string. |
| helm/kagent/templates/_helpers.tpl | Adds kagent.clusterDomain helper and switches URL helpers to use it. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
A fully-qualified domain (`example.net.`) or a value with stray whitespace rendered an empty DNS label into the service authority, producing URLs like `...svc.example.net.:8083` that many HTTP clients reject. Trim whitespace and surrounding dots, falling back to `cluster.local` when nothing is left. Signed-off-by: shekhargit1912 <shekharchaugule302@gmail.com>
EItanya
left a comment
There was a problem hiding this comment.
Rather than adding this, should we just remove the DNS domain completely. Usually just name.namespace will do the trick
|
AFAIK they're all in cluster, |
|
Per review feedback, drop the configurable clusterDomain value and instead build in-cluster URLs (A2A base URL, nginx upstream authority, bundled Postgres connection string) with the `name.namespace.svc` short form, which resolves correctly regardless of the cluster DNS domain. Signed-off-by: shekhargit1912 <shekharchaugule302@gmail.com>
aaebe1f to
592a63b
Compare
@EItanya |
The chart hardcoded
cluster.localwhen building in-cluster service URLs, so installs on clusters configured with a different DNS domain rendered unreachable addresses that had to be patched by hand after every upgrade.Add a
clusterDomainvalue (defaultcluster.local) and use it to build the A2A base URL, the nginx controller upstream, and the bundled PostgreSQL connection string. Existing installs are unaffected: when the value is unset the templates render exactly as before.Fixes #1767