-
Notifications
You must be signed in to change notification settings - Fork 333
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
control-plane: make use of k8s plugins #53
Conversation
7d6f9dc
to
0defca6
Compare
083c918
to
a16c5f6
Compare
0defca6
to
f86ed73
Compare
Version: "v1", | ||
Addresses: []string{"192.168.0.1"}, | ||
Ports: []uint32{8080}, | ||
Version: "v1", |
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.
Can you remind, why do we need a version here?
thanks
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.
Every resource in Envoy Delta xDS API has its own version (see https://github.com/envoyproxy/data-plane-api/blob/master/envoy/api/v2/discovery.proto#L226).
This version
field is an attempt to associate that value with one that already exists in k8s
/Consul
.
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.
With explicite versioning like in proxy template this works fine, but when you eventually want to send a list of clusters/endpoints from the generated from rules you define. Then you have to combine versions from multiple resources.
The most intuitive way is to compute hash from resources, but you can get into hash collisions, so we end up having hashmap with UUIDs for given resources group. This does not have to be shared between control plane instances because when node connects to an control plane instance, it starts with empty version.
Btw. there is no such thing as version in Consul, nor probably in any discovery system. You've got an ID of instance, but the instance data can change.
I know this is not a problem for now, but just letting you know upfront how we solved it :)
Also, I don't think that Delta xDS is fully available in Envoy right now
envoyproxy/envoy#4991
nor in go-control-plane https://github.com/envoyproxy/go-control-plane/search?q=DeltaDiscoveryRequest&unscoped_q=DeltaDiscoveryRequest
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.
In Consul
it's called ModifyIndex
(https://www.consul.io/api/catalog.html#modifyindex)
Delta xDS API is defined in Golang code, although without implementation for now (https://github.com/envoyproxy/go-control-plane/blob/master/pkg/server/server.go#L413-L435).
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.
Yeah, just like in java-control-plane, it's defined because it's in proto.
About index, you're right. Completely forgot about ModifyIndex
Just wanted to point that we have to be aware that we may not have working Incremental xDS when we will start implementing cluster/endpoints propagation.
Changes:
bootstrap
processk8s
pluginsDiscoverySource API