GithubHelp home page GithubHelp logo

Comments (13)

Jonpez2 avatar Jonpez2 commented on June 5, 2024

Any thoughts on this please? Would you prefer me to propose a code change?

from bb-storage.

EdSchouten avatar EdSchouten commented on June 5, 2024

Hey! Sorry for letting you wait.

I'm fine with supporting use cases like these. I think the cleanest way to support this is to factor out the keypair string fields we have in our config files to a separate Protobuf message. We can then use a oneof in there to choose between providing the key material inline, vs. using other frameworks.

Instead of using stuff like spiffe-helper, I'm also fine with integrating https://github.com/spiffe/go-spiffe/tree/main/v2. That way you don't need to run all sorts of sidecars just to get TLS working.

from bb-storage.

Jonpez2 avatar Jonpez2 commented on June 5, 2024

My turn to apologize to you!

So actually an even better approach (for me anyway!) would be to upgrade to grpc 1.38.0 and then allow use of xds, like this: https://cloud.google.com/traffic-director/docs/security-proxyless-setup. That still requires a bit of changes inside buildbarn - specifically, all the servers will have to do this (https://github.com/grpc/grpc-go/blob/master/examples/features/xds/server/main.go#L82) - but it means that all the certificate specification and discovery and so forth becomes someone else's problem. Wdyt?

from bb-storage.

EdSchouten avatar EdSchouten commented on June 5, 2024

Oh, that would be pretty sweet. Feel free to submit a PR to add a gRPC configuration for enabling xDS!

from bb-storage.

Jonpez2 avatar Jonpez2 commented on June 5, 2024

from bb-storage.

Jonpez2 avatar Jonpez2 commented on June 5, 2024

Nothing is ever simple...
grpc/grpc-go#4601

from bb-storage.

EdSchouten avatar EdSchouten commented on June 5, 2024

Hey @Jonpez2!

Would a change like this be of any use to you?

https://github.com/buildbarn/bb-storage/compare/eschouten/20210719-service-registrar

This would allow you to write something like this in pkg/grpc/server.go:

var s interface {
    grpc.ServiceRegistrar
    GetServiceInfo() map[string]grpc.ServiceInfo
    Serve(net.Listener) error
}
if useXDS {
    s = xds.NewGRPCServer(...)
} else {
    s = grpc.NewServer(...)
}

// The rest of the code that registers services and calls .Serve() can go here.

Just let me know and I'll merge this.

from bb-storage.

Jonpez2 avatar Jonpez2 commented on June 5, 2024

from bb-storage.

EdSchouten avatar EdSchouten commented on June 5, 2024

Great! Merged!

It looks like the construct is sufficient for you to achieve what you want, as long as you take the following into account:

from bb-storage.

Jonpez2 avatar Jonpez2 commented on June 5, 2024

from bb-storage.

EdSchouten avatar EdSchouten commented on June 5, 2024

It looks like v2 hasn't been released yet, so it wouldn't make a lot of sense to invest in that right now. I'd say, just put that PR that I linked above into the already existing patches/com_github_grpc_ecosystem_go_grpc_prometheus/ directory.

from bb-storage.

Jonpez2 avatar Jonpez2 commented on June 5, 2024

ok!

from bb-storage.

EdSchouten avatar EdSchouten commented on June 5, 2024

Considering that this issue hasn't received any updates for >1y, I'm going to close it. It should be easier nowadays to get xDS support added, especially with the preparations discussed above. Happy to receive contributions going forward!

from bb-storage.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.