Closed wangchengming666 closed 3 months ago
Attention: Patch coverage is 66.66667%
with 1 lines
in your changes are missing coverage. Please review.
Project coverage is 72.00%. Comparing base (
df2dcae
) to head (d6704a9
). Report is 1 commits behind head on master.
Files | Patch % | Lines |
---|---|---|
...ava/com/alipay/sofa/rpc/config/RegistryConfig.java | 66.66% | 0 Missing and 1 partial :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Looks interesting. Would you please briefly describe the behavior of the register and unRegister? It seems the information is written to the pod's annotation and label?
Looks interesting. Would you please briefly describe the behavior of the register and unRegister? It seems the information is written to the pod's annotation and label?
sure, I will add the doc on this feature
朱立焕收到,谢谢
The update introduces a Kubernetes registry to the SOFA RPC framework, enhancing service discovery and registration within Kubernetes environments. It adds support for configuring Kubernetes client settings, converting Kubernetes pods to provider information, and managing service provider updates based on pod changes. Additionally, it includes testing functionality for these new features, ensuring reliability and performance in Kubernetes deployments.
Files | Change Summary |
---|---|
core/api/src/main/java/com/alipay/sofa/rpc/config/RegistryConfig.java |
Added overloaded getParameter methods for retrieving parameters with default values. |
registry/registry-kubernetes/src/main/java/com/alipay/sofa/rpc/registry/kubernetes/... |
Introduced Kubernetes registry support, including service registration, discovery, and provider management. |
registry/registry-kubernetes/src/main/java/com/alipay/sofa/rpc/registry/kubernetes/constant/KubernetesClientConstants.java registry/registry-kubernetes/src/main/java/com/alipay/sofa/rpc/registry/kubernetes/utils/KubernetesClientUtils.java registry/registry-kubernetes/src/main/java/com/alipay/sofa/rpc/registry/kubernetes/utils/KubernetesConfigUtils.java |
Added Kubernetes client configuration utilities and constants. |
registry/registry-kubernetes/src/main/resources/META-INF/services/sofa-rpc/com.alipay.sofa.rpc.registry.Registry |
Registered Kubernetes registry in service loader. |
registry/registry-kubernetes/src/test/java/com/alipay/sofa/rpc/registry/kubernetes/... |
Provided tests for Kubernetes registry functionality. |
registry/registry-kubernetes/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker |
Enabled mock-maker-inline for advanced mocking capabilities. |
"In the land of code and Kubernetes pods,
A rabbit hopped through, leaving digital nods.
🐰🌟 With each leap and bound,
New registries were found,
And services danced, free from their clods.
So here's to changes, both big and small,
May our code run smoothly, bugs none at all."
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
总体设计
样例
环境准备
代码准备
https://github.com/wangchengming666/sofa-rpc-registry-kubernetes-demo
测试手法
Provider部分
docker build -t sofa-rpc-k8s-provider:1.0.0 .
minikube image load sofa-rpc-k8s-provider:1.0.0
kubectl apply -f ServiceAccount.yml
kubectl apply -f Deployment.yml
kubectl get pods -n sofa-rpc-k8s
kubectl logs -f sofa-rpc-k8s-provider-86f8565dcb-m7r6v -n sofa-rpc-k8s
Consumer部分
docker build -t sofa-rpc-k8s-consumer:1.0.0 .
minikube image load sofa-rpc-k8s-consumer:1.0.0
kubectl apply -f Deployment.yml
kubectl get pods -n sofa-rpc-k8s
kubectl logs -f sofa-rpc-k8s-consumer-5d6cd8698d-pf7wd -n sofa-rpc-k8s
Summary by CodeRabbit
RegistryConfig
with methods to retrieve parameters with default values.