-
Notifications
You must be signed in to change notification settings - Fork 94
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
Rust xDS server #506
Rust xDS server #506
Conversation
1bb219b
to
1711d0e
Compare
Curious - you thinking to replace the Go implementation, or is this just an extra way of doing a similar thing? |
The goal is to replace the Go implementation for a few reasons.
|
This 100% sounds awesome. I believe the original intent to utilise Go was to take advantage of https://github.com/envoyproxy/go-control-plane - but if that's less useful here (you're digging far deeper into things than I have), that seems very reasonable. Also - from first pass, the Rust K8s client looks really nice. I think the whole idea of
I'm all in. Love it. |
Yes, the current goal is only to replicate the existing behaviour of the Go xDS server so there should be nothing surprising in this implementation. Definitely open to more design discussions as we discuss more advanced features, and move past what is currently implemented in the Go xDS server, which is a very straightforward State Of The World aggregated xDS. |
This code is now ready for review. It implements the initial version of xDS with support for Agones to be able to run Quilkin as a cluster. There is still some more work to be done, but to not make this PR too big, we're going to do them as follow-ups, I'll mention some of the work below, which I'll turn into issues to track their progess. The only new behaviour is that there's a new Future Work
@markmandel The CI is currently failing because it cannot find OpenSSL, but AFAICT the build-image does install quilkin/build/build-image/Dockerfile Line 29 in f016bc5
|
The CI failure is a hilarious amount of fun. TL:DR - cross deliberately removed OpenSSL: You can reproduce by using The mac build with I'll dig in, see what I can work out. |
Just testing a solution with the |
Okay, that worked with linux and windows - gotta work out what's going on with macos, that's still not working. |
TIme to for me to finish up for the evening, but I think I've got all the platforms compiling 😄 . I'll do some extra testing tomorrow and tidy it up. If you want to take it for a spin, you can see it all here: https://github.com/markmandel/quilkin/tree/pr/rf/xds-server-rust |
4e2ec87
to
f69c0d4
Compare
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.
LGTM! Mostly curious of how we want to work with the Agones SDK and common types. Would be nice to not have to duplicate if we don't have to, even if it's not that much code.
This comment was marked as off-topic.
This comment was marked as off-topic.
#[clap( | ||
short, | ||
long, | ||
default_value = "gameservers", |
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.
I recommend we set these both to default
for both. That namespace is the default, in a Kubernetes cluster - so if people are testing this out, it probably makes the most sense to point it there, since I expect people will dump everything in there sometimes anyway (or at least on first attempt).
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.
That's fine with me, these are just what's in the current xDS implementation.
group = "agones.dev", | ||
version = "v1", | ||
kind = "GameServer", | ||
status = "GameServerStatus", |
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.
Technically we don't have an actual k8s/status value for GameServer
(for our use case it reduces hits to the API server) - but since we're not updating a GameServer
, it likely doesn't matter for our use case (I'm guessing it might be required for this build toolchain? 🤔)
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.
Are you sure, because there is a GameServerStatus
type that is defined here. https://github.com/googleforgames/agones/blob/9fa432c24d5aefbfcd6cf7eef61fcd4b35034663/pkg/apis/agones/v1/gameserver.go#L221
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.
Yes, his is correct, we have a status value - but it's not registered a a /status
subresource on GameServer
, because reasons.
(Basically it's a nice way of updating only a section of a CRD - but the way we treat GameServers
in Agones, it's better if we update GameServer's entire value as a single transaction, so we don't do this for this resource)
If it's working for this, it doesn't actually matter - it might have been an issue if we were trying to update /status
values on the GameSever
as it might use the wrong API.
Mostly this is just a point of interest, and not a blocking issue in the PR.
config: kube::Api<k8s_openapi::api::core::v1::ConfigMap>, | ||
gameservers: kube::Api<GameServer>, |
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.
Rather than using kube::Api
, we should use Reflectors instead, such that we have a local cache that is updated on changes, that we can poll for free with no performance hit to the K8s API control plane (In client-go we use Informers and Listeners, but the concept is the same).
Constant polling against the K8s API server is unfortunately a great way to make the API control plane (and etcd) really upset and will cause the performance of the entire cluster to plummet.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
cc10007
to
109537a
Compare
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
109537a
to
8c26ef3
Compare
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
8c26ef3
to
8a1b577
Compare
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
8a1b577
to
737da6b
Compare
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
737da6b
to
cc35b7a
Compare
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
cc35b7a
to
07cc671
Compare
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
07cc671
to
6a8a14f
Compare
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
1 similar comment
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
Co-Authored-By: rezvaneh <rezvaneh@users.noreply.github.com> Co-Authored-By: markmandel <markmandel@users.noreply.github.com>
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
d919961
to
da2beef
Compare
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
Build Failed 😭 Build Id: eabd1c35-9e7c-4077-94e2-890c6f6593d0 Status: FAILURE To get permission to view the Cloud Build view, join the quilkin-discuss Google Group. |
Closing in favour of #527 |
The following is a minimal implementation of a State of The World (SoTW) Aggegated Discovery Service (aDS) server. This allows us to re-use types from Quilkin inside our xDS server without duplication, easily use our actual xDS server in tests, and simplify our deployments by allowing running the xDS server from the same binary as the client.