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

Service profile autogeneration #3604

Open
StupidScience opened this issue Oct 19, 2019 · 5 comments
Open

Service profile autogeneration #3604

StupidScience opened this issue Oct 19, 2019 · 5 comments

Comments

@StupidScience
Copy link
Contributor

Feature Request

Generate service profiles automatically based on Swagger (OpenAPI) specification.

What problem are you trying to solve?

At the moment you should generate service profiles explicitly. But services usually serve Swagger Spec as well so there is the way to generate Service Profiles based on it.

How should the problem be solved?

Add kinda annotation with swagger spec path that will be fetched by linkerd control-plane for service profile generation.
I believe here can be some problems in generating new Service Profile at the deployment time.

Any alternatives you've considered?

Generate it automatically based on tap results.

How would users interact with this feature?

I believe it should be just one more linkerd annotation, e.g. linkerd.io/service-profile-openapi-spec: /swagger/doc.json

@grampelberg
Copy link
Contributor

Have you seen linkerd profile --open-api?

@StupidScience
Copy link
Contributor Author

Yes, ofc. But it should be invoked explicitly.

@wmorgan
Copy link
Member

wmorgan commented Oct 21, 2019

@StupidScience To make sure I understand this: your proposal is that users annotate a Deployment object with the URL path of a Swagger-serving endpoint on that Deployment. Then Linkerd calls that endpoint and creates a service profile for the Deployment, and keep it up to date when the contents of that endpoint changes.

This would be an alternative to using linkerd profile --open-api and re-applying the service profiles whenever it changes.

Is that right?

@StupidScience
Copy link
Contributor Author

@wmorgan yep, looks correct.

@grampelberg
Copy link
Contributor

Makes sense! This would need to be an annotation on the service and not the deployment as deployments don't have service profiles. Otherwise, sounds like a cool feature! Could be used for protobufs as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Help Wanted
  
To do
Development

No branches or pull requests

3 participants