-
Notifications
You must be signed in to change notification settings - Fork 2.2k
fix(k8s): Do not hard code the FQDN #3422
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
Codecov Report
@@ Coverage Diff @@
## master #3422 +/- ##
==========================================
+ Coverage 90.01% 90.34% +0.33%
==========================================
Files 152 152
Lines 10907 10907
==========================================
+ Hits 9818 9854 +36
+ Misses 1089 1053 -36
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
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.
Thank you for the change, looks good to me!
I think you just have to adapt some more tests for CI to pass
===End Flaky Test Report=== =========================== short test summary info ============================ FAILED tests/unit/peapods/pods/test_k8s_pod.py::test_deployments[gateway-1-expected_deployments0] FAILED tests/unit/peapods/pods/test_k8s_pod.py::test_deployments[test-pod-1-expected_deployments1] FAILED tests/unit/peapods/pods/test_k8s_pod.py::test_deployments[test-pod-2-expected_deployments2] FAILED tests/unit/peapods/pods/k8slib/test_kubernetes_deployment.py::test_deploy_service[None-None] FAILED tests/unit/peapods/pods/k8slib/test_kubernetes_deployment.py::test_deploy_service[init_container1-None] FAILED tests/unit/peapods/pods/k8slib/test_kubernetes_deployment.py::test_deploy_service[None-/test] ====== 6 failed, 206 passed, 10 skipped, 3 warnings in 217.04s (0:03:37) ======= Error: Process completed with exit code 1.
https://github.com/jina-ai/jina/pull/3422/checks?check_run_id=3619423946
Sure, will fix them ASAP. Thanks for your review. |
@gaocegege Thanks, I did not know that we can just skip the last part of the domain name. |
There are two situations with the DNS configuration:
The PR should work with these two situations. It will not work if the deployment is using hostNetwork. But it is not caused by this PR, it is caused by the DNSPolicy defined in https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy I do not see the scenario in Jina core, thus I do not think we should care about it. |
Do we have the integration test with Kubernetes? |
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.
Thx for the PR 👍
I think its good to go. There are also K8s intergration tests in tests/k8s
They are still working so our use cases should be fine with this change.
It is not recommended to hard code service FQDN.
Ref https://github.com/kubernetes/dns/blob/master/docs/specification.md
The cluster domain can be configured by the CoreDNS/KubeDNS, and it can be run without the FQDN.