-
Notifications
You must be signed in to change notification settings - Fork 7
feature: support k8s service discovery. #5
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
base: main
Are you sure you want to change the base?
Conversation
f307f7d to
fe28e1c
Compare
bdb78a8 to
5f533ea
Compare
b974eb4 to
05c0f1e
Compare
| "google.golang.org/grpc/codes" | ||
| "google.golang.org/grpc/status" | ||
|
|
||
| managertypes "github.com/aigw-project/aigw/pkg/aigateway/clustermanager/types" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's not a good idea to reuse the static discovery, introduce a new implementation should be better.
For the code reusing we may introduce a common xds server to avoding copying code, it could be another PR as the second step.
05c0f1e to
09c33f1
Compare
|
@Wangdai-0800 it's not a good idea to use force push, it makes review changes harder. |
|
|
||
| // updata the snapshot form istio | ||
| func (p *StaticClusterProvider) AutoUpdateFromPilot(nodeID string, interval time.Duration) { | ||
| go func() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The AutoUpdateFromPilot function lacks an exit mechanism. It is recommended to use a for+select loop to ensure it can exit at least when context.Done() is triggered.
| s.responseChan <- resp | ||
| } | ||
|
|
||
| func (s *cdsServerImpl) processSubscribedClusters(subscribeClusters []string) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add some INFO logs in the key steps to facilitate issue troubleshooting.
No description provided.