apolloconfig / apollo

Apollo is a reliable configuration management system suitable for microservice configuration management scenarios.
https://www.apolloconfig.com
Apache License 2.0
29.08k stars 10.2k forks source link

apollo的灰度规则是否支持k8s中的服务? #4992

Closed geministarshine closed 10 months ago

geministarshine commented 11 months ago

当我们在k8s中进行灰度发布时,希望配置也能同步进行灰度发布,但是目前apollo中配置的灰度发布规则只支持根据ip进行配置,而k8s中服务的ip是变化的,基本无法应用,请问有针对这方面的改进计划吗?

dosubot[bot] commented 11 months ago

🤖

根据我找到的信息,Apollo的灰度发布规则目前并不直接支持在Kubernetes中变化的IP地址。Apollo的灰度发布规则是基于IP地址的,这在reversedGrayReleaseRuleCache中有所体现,它存储了clientAppId+clientNamespace+ip -> ruleId的映射。

findReleaseIdFromGrayReleaseRule方法中,Apollo会检查客户端IP是否匹配任何灰度发布规则。如果在Kubernetes环境中IP地址不断变化,那么Apollo的灰度发布规则的当前实现可能无法按预期工作。

然而,值得注意的是,这并不意味着Apollo不能与Kubernetes一起使用。它只是意味着,如果服务的IP地址动态变化,灰度发布功能可能无法按预期工作,除非采取额外的措施来处理这种情况,例如使用服务网格或其他网络工具为您的服务提供稳定的网络标识符。

另外,我在Apollo的问题库中找到了一些相关的解决方案。例如,主分支支持使用label进行灰度。这意味着在启动服务时,您可以标记服务组,然后portal可以基于标签进行灰度。这可能是一个解决您问题的方法。

参考链接:

希望这些信息对您有所帮助。如果您有任何其他问题或需要进一步的澄清,请随时告诉我。

Sources


This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

nobodyiam commented 11 months ago

As dosu suggests, apollo supports the label feature:

stale[bot] commented 10 months ago

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 7 days unless it is tagged "help wanted" or other activity occurs. Thank you for your contributions.

stale[bot] commented 10 months ago

This issue has been automatically closed because it has not had activity in the last 7 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted". Thank you for your contributions.