In the mr312 , we introduced the capability of configuration hot updating for the meshregistry module. We also added support for the nacos source and zk source.
The hot updating of meshregistry configuration relies on a complete meshreg bootstrap.RegistryArgs object, and it fully adopts the configuration sent during hot updating. Furthermore, when deploying new configurations through configmap, in order to preserve the configuration hot updating capability of other modules, it is required that the data format in the configmap remains consistent with the data format during deployment, which adds additional cost.
Considering that the usage scenario of meshregistry hot updating is mostly for adjusting the instance filter behavior of different sources, and the bootstrap.RegistryArgs configuration API prioritizes flexibility, it is prone to errors during modification and needs to be populated into the configmap, further increasing the probability of errors.
Therefore, we have introduced a brand new CRD RegistrySources for dynamically configuring meshregistry. RegistrySources provides a more user-friendly API to merge configurations into the original configuration or the dynamically configured configuration based on the configmap using the patch method.
CRD RegistrySources, like other slime CRDs, belongs to the microservice.slime.io group and evolves from version v1alpha1. RegistrySources uses golang to complete the original description and utilizes the Kubernetes community toolchain to generate resources including CRDs. After updates, you can execute MODULES=meshregistry make modules-k8s-gen to update the relevant resources.
In the current version, RegistrySources defines the behavior of filtering instances for the zk source, including visible Dubbo interfaces and invisible instance IPs. The CRD RegistrySources itself is not displayed here. You can obtain it from the code. An example of converting RegistrySources to bootstrap.RegistryArgs is as follows:
In the mr312 , we introduced the capability of configuration hot updating for the meshregistry module. We also added support for the nacos source and zk source.
The hot updating of meshregistry configuration relies on a complete meshreg
bootstrap.RegistryArgs
object, and it fully adopts the configuration sent during hot updating. Furthermore, when deploying new configurations through configmap, in order to preserve the configuration hot updating capability of other modules, it is required that the data format in the configmap remains consistent with the data format during deployment, which adds additional cost.Considering that the usage scenario of meshregistry hot updating is mostly for adjusting the instance filter behavior of different sources, and the
bootstrap.RegistryArgs
configuration API prioritizes flexibility, it is prone to errors during modification and needs to be populated into the configmap, further increasing the probability of errors.Therefore, we have introduced a brand new CRD
RegistrySources
for dynamically configuring meshregistry.RegistrySources
provides a more user-friendly API to merge configurations into the original configuration or the dynamically configured configuration based on the configmap using the patch method.CRD
RegistrySources
, like other slime CRDs, belongs to themicroservice.slime.io
group and evolves from versionv1alpha1
.RegistrySources
uses golang to complete the original description and utilizes the Kubernetes community toolchain to generate resources including CRDs. After updates, you can executeMODULES=meshregistry make modules-k8s-gen
to update the relevant resources.In the current version,
RegistrySources
defines the behavior of filtering instances for the zk source, including visible Dubbo interfaces and invisible instance IPs. The CRDRegistrySources
itself is not displayed here. You can obtain it from the code. An example of converting RegistrySources to bootstrap.RegistryArgs is as follows: