Skip to content

fix: 在使用spring-cloud-kubernetes的时候不会初始化Registration #128#130

Merged
stubenhuang merged 1 commit into
bkdevops-projects:developfrom
hingbong:issue-#128
May 23, 2022
Merged

fix: 在使用spring-cloud-kubernetes的时候不会初始化Registration #128#130
stubenhuang merged 1 commit into
bkdevops-projects:developfrom
hingbong:issue-#128

Conversation

@hingbong
Copy link
Copy Markdown
Contributor

No description provided.

val filteredInstances = if (loadBalancerProperties.gray.enabled) {
// 使用k8s的service的时候,应该只有一个endpoint,所以这里只取第一个
if (instances.size == 1) {
return DefaultResponse(instances[0])
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

使用consul的时候,如果instances只有一个,但是与当前服务不在一个灰度环境,这边直接返回会第一个instance会导致调用到不同灰度环境的服务实例

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

改了

@stubenhuang stubenhuang merged commit d635aaf into bkdevops-projects:develop May 23, 2022
@hingbong hingbong deleted the issue-#128 branch May 24, 2022 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants