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

control-plane: make use of k8s plugins #53

Merged
merged 1 commit into from
Jul 8, 2019
Merged

Conversation

yskopets
Copy link
Contributor

@yskopets yskopets commented Jul 2, 2019

Changes:

  • replace former initialization logic with bootstrap process
  • start using k8s plugins
  • start using DiscoverySource API

Version: "v1",
Addresses: []string{"192.168.0.1"},
Ports: []uint32{8080},
Version: "v1",
Copy link
Contributor

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

Copy link
Contributor Author

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.

Copy link
Contributor

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

Copy link
Contributor Author

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).

Copy link
Contributor

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.

@yskopets yskopets changed the base branch from feature/add-bootstrap-process to master July 8, 2019 09:55
@yskopets yskopets added this to the 0.1 milestone Jul 8, 2019
@yskopets yskopets merged commit 9b50a6b into master Jul 8, 2019
@yskopets yskopets deleted the feature/use-k8s-plugins branch July 8, 2019 10:19
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.

None yet

2 participants