Skip to content
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

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

Closed
geministarshine opened this issue Oct 13, 2023 · 4 comments
Closed

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

geministarshine opened this issue Oct 13, 2023 · 4 comments
Labels

Comments

@geministarshine
Copy link

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

@dosubot
Copy link

dosubot bot commented Oct 13, 2023

🤖

根据我找到的信息,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
Copy link
Member

As dosu suggests, apollo supports the label feature:

Copy link

stale bot commented Nov 16, 2023

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 stale bot added the stale label Nov 16, 2023
Copy link

stale bot commented Nov 24, 2023

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.

@stale stale bot closed this as completed Nov 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants