We are trying to create a custom template to include multiple route rules using system.region.name variables (conditions) & also include corresponding targetservers in apiprpoxy.yaml under oas3 in apigee-go-gen but not successful. Does apigee-go-gen follow the apigeex apiproxy.xml indent or what tool could help create the yaml with correct indent?
RouteRule:
.name: east
Conditions:
- Condition: "system.region.name == 'east'"
TargetEndpoint: west
- RouteRule:
.name: west
Conditions:
- Condition: "system.region.name == 'west'"
TargetEndpoint: west
- RouteRule:
.name: default
TargetEndpoint: east
Conditions: []
TargetEndpoints:
- TargetEndpoint:
.name: west
HTTPTargetConnection:
LoadBalancer:
- Algorithm: RoundRobin
- Server:
.name: api-region1
- Server:
.name: api-region2
IsFallback: true
- MaxFailures: 10
- ServerUnhealthyResponse:
- ResponseCode: 502
- ResponseCode: 503
- ResponseCode: 504
- HealthMonitor:
IsEnabled: true
IntervalInSec: 35
HTTPMonitor:
Request:
ConnectTimeoutInSec: 10
SocketReadTimeoutInSec: 30
Port: 443
Verb: GET
Path: /livecheck
SuccessResponse:
ResponseCode: 200
- TargetEndpoint:
.name: east
HTTPTargetConnection:
LoadBalancer:
- Algorithm: RoundRobin
- Server:
.name: api-region2
- Server:
.name: api-region1
IsFallback: true
- MaxFailures: 10
- ServerUnhealthyResponse:
- ResponseCode: 502
- ResponseCode: 503
- ResponseCode: 504
- HealthMonitor:
IsEnabled: true
IntervalInSec: 35
HTTPMonitor:
Request:
ConnectTimeoutInSec: 10
SocketReadTimeoutInSec: 30
Port: 443
Verb: GET
Path: /livecheck
SuccessResponse:
ResponseCode: 200
@raghunathapalle - why dont you use the xml code needed to configure the routeRules you need in a sample proxy and then use the apiproxy-to-yaml command or xml-to-yaml command to generate the yaml templates for you?
Also - your yaml code is difficult to read without the indentation. You can use the "Insert code" option here to post code snippets
@raghunathapalle can you update the original post, and edit the YAML as a code block. It's hard to see the indentation.
Hi @miguelmendoza - see 403 forbidden when we try to add it as a code block in the browser edit. Not sure if there is blocked at security at google end or my org. Is there a secure way to pass it on ?
Feel free to open a GitHub issue here.
Hopefully you can add code snippet there with the issue. Also please provide the version you are using
thanks @ssvaidyanathan @miguelmendoza ; our google solution engineer helped open an github issue for it already few mins back.
https://github.com/apigee/apigee-go-gen/issues/25
thanks for your help on this.
I see that - can you add more info to it?
Like the version you are using, the command you are running.. What is the steps you are following with the yaml code
@raghunathapalle,
I've published a fix for the issue (https://github.com/apigee/apigee-go-gen/pull/26). The following elements were missing for validation:
Can you try like this? (Are you getting 403?)
yes I tried the same & still see 403 frobidden. tried multiple times but still getting same error.
I see. Is there any error message with the 403? If you can, post a screenshot. I will try to follow up with the community moderators, to see if that can be fixed. (If it's an issue with the community site).
above is the screenshot of the error.
While we are troubleshooting your issue, I have reached out via PM for additional information.
Thank you,
Michelle | Community Manager