-
Notifications
You must be signed in to change notification settings - Fork 156
Fix Kind DNS configuration for registry API and telemetry #2877
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: nigel brown <nigel@stacklok.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2877 +/- ##
==========================================
- Coverage 56.59% 56.58% -0.02%
==========================================
Files 322 322
Lines 31439 31439
==========================================
- Hits 17794 17790 -4
- Misses 12110 12120 +10
+ Partials 1535 1529 -6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Use Task's dir: directive to set working directory instead of cd in command strings. This is the proper way to handle working directories in Task and should fix CI checks.
YAML requires quotes around values containing template variables
like {{.ROOT_DIR}}. This fixes the parsing error.
Fix linting errors by removing trailing blank lines from: - cmd/thv-operator/kind-config.yaml - cmd/thv-operator/setup-kind.sh
|
@ChrisJBurns @danbarr --kubeconfig kconfig.yaml just wasn't quite working for me - but I can put that back. Was there something I should have been doing with DNS differently? If you don't like this, I'll probably just keep those changes as a local script. |
| cmds: | ||
| - kind create cluster --name toolhive | ||
| - kind get kubeconfig --name toolhive > kconfig.yaml | ||
| - kind create cluster --name toolhive --config kind-config.yaml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
--kubeconfig kconfig.yaml just wasn't quite working for me - but I can put that back.
I think that's because you removed the output of the kubeconfig file here. 😄
|
I'm not sure I understand the issue this is meant to fix? I haven't had any public DNS resolution issues with my kind clusters, MCP servers I run in my cluster are perfectly able to reach public services, same for operators like ngrok. Personally I'm hesitant to override users' choice of upstream DNS even in a dev/test case like this; and in corporate environments this could run afoul of security practices. |
|
Thanks @danbarr . I did wonder if this was just a problem with my env. I'll close this one. |
Summary
This PR fixes DNS resolution issues in Kind clusters by configuring public DNS servers via extraMounts. This is a prerequisite for proper operation of the Kubernetes registry API and OpenTelemetry telemetry collection.
Changes
kind-config.yamlwith DNS configuration using public DNS servers (8.8.8.8, 8.8.4.4, 1.1.1.1)resolv.conffile mounted into Kind nodes for DNS resolutionTaskfile.ymlto use the new Kind configsetup-kind.shscript to automate Kind cluster setup with ToolHive OperatorRelated Issues
Addresses StacklokLabs/research#89: Call k8s registry API instead of thv registry API when running in k8s
Addresses StacklokLabs/research#119: Enable open telemetry collection on toolhive-doc-mcp server in staging EKS
Testing
Notes
resolv.conffile is mounted into Kind nodes viaextraMounts