-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Support spring cloud gateway #29591
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
Support spring cloud gateway #29591
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -360,6 +360,43 @@ | |
| } | ||
| }, | ||
| "definitions": { | ||
| "ScgRoute": { | ||
| "description": "Spring Cloud Gateway route definition", | ||
| "type": "object", | ||
| "required": [ | ||
| "id", | ||
| "uri" | ||
| ], | ||
| "properties": { | ||
| "id": { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Want to check, is this an azure resource id or not? Having a writable 'id' property in an Azure rest api is unusual, except in the context of adding references to other resources. In which case often there are few other properties to configure. It could be confusing compared to Azure resource ids.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would there be a good alternative name for this property?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And maybe I'll have more questions, like what 'scope' is it uniquely identifying things in?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No it's not a Azure resource ID. It can be values like "route1". The reason is that this spring cloud gateway is an open source middleware. We want to keep the naming convention with the open source configuration to let customers pick it up easier.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK, probably the best approach is just to be very explicit in the documentation / description of the property as to what its expected to contain / look like, and e.g. explain what SCG configuration property you're exposing. |
||
| "description": "Id of the route", | ||
| "type": "string" | ||
| }, | ||
| "uri": { | ||
| "description": "Uri of the route", | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Declare as
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It can be some non url values like "lb:customer-service", which means the gateway will ask the real ip/uri from a service discovery service. So I think string can better surve the case.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And it maybe consist of other formated "uri"s that I'm not aware of, if the customer is using some other service discovery component to work with the gateway.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm. Is "lb:customer-service" an URI? I guess the answer is maybe, 'lb' is not a well-known scheme. But... maybe its well known in SCG context? I have no idea! :-) (yet) But more to the point, you now appear to be claiming that it is an URI (in the description) and yet also that its not an URI. Surely only one of these can be the truth? |
||
| "type": "string" | ||
| }, | ||
| "predicates": { | ||
| "description": "Predicates of the route", | ||
| "type": "array", | ||
| "items": { | ||
| "type": "string" | ||
| } | ||
| }, | ||
| "filters": { | ||
| "description": "Filters of the route", | ||
| "type": "array", | ||
| "items": { | ||
| "type": "string" | ||
| } | ||
| }, | ||
| "order": { | ||
| "description": "Order of the route", | ||
| "type": "integer", | ||
| "format": "int64" | ||
| } | ||
| } | ||
| }, | ||
| "JavaComponentConfigurationProperty": { | ||
| "description": "Configuration properties for a Java Component", | ||
| "type": "object", | ||
|
|
@@ -418,6 +455,7 @@ | |
| "SpringBootAdmin", | ||
| "SpringCloudEureka", | ||
| "SpringCloudConfig", | ||
| "SpringCloudGateway", | ||
| "Nacos" | ||
| ], | ||
| "type": "string", | ||
|
|
@@ -477,6 +515,32 @@ | |
| } | ||
| } | ||
| }, | ||
| "SpringCloudGatewayComponent": { | ||
| "description": "Spring Cloud Gateway properties.", | ||
| "type": "object", | ||
| "allOf": [ | ||
| { | ||
| "$ref": "#/definitions/JavaComponentProperties" | ||
| } | ||
| ], | ||
| "properties": { | ||
| "ingress": { | ||
| "$ref": "#/definitions/JavaComponentIngress", | ||
| "description": "Java Component Ingress configurations." | ||
| }, | ||
| "springCloudGatewayRoutes": { | ||
| "description": "Gateway route definition", | ||
| "type": "array", | ||
| "items": { | ||
| "$ref": "#/definitions/ScgRoute" | ||
| }, | ||
| "x-ms-identifiers": [ | ||
| "id" | ||
| ] | ||
| } | ||
| }, | ||
| "x-ms-discriminator-value": "SpringCloudGateway" | ||
| }, | ||
| "SpringBootAdminComponent": { | ||
| "description": "Spring Boot Admin properties.", | ||
| "type": "object", | ||
|
|
@@ -559,4 +623,3 @@ | |
| } | ||
| } | ||
| } | ||
|
|
||

Uh oh!
There was an error while loading. Please reload this page.