forked from radius-project/radius
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support routes.*.destination of gateway for App Graph (radius-project…
…#7079) # Description This is to support `routes.*.destination` property for App graph. It enables to show the connections between Gateway and the other resources in App Graph ## Type of change - This pull request is a minor refactor, code cleanup, test improvement, or other maintenance task and doesn't change the functionality of Radius (issue link optional). Fixes: radius-project#7038 --------- Signed-off-by: Young Bu Park <[email protected]>
- Loading branch information
1 parent
49f57d6
commit 5221bfe
Showing
4 changed files
with
217 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
77 changes: 77 additions & 0 deletions
77
pkg/corerp/frontend/controller/applications/testdata/graph-app-gw-in.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
[ | ||
{ | ||
"id": "/planes/radius/local/resourcegroups/default/providers/Applications.Core/gateways/httpgw", | ||
"name": "httpgw", | ||
"properties": { | ||
"application": "/planes/radius/local/resourcegroups/default/providers/Applications.Core/Applications/myapp", | ||
"routes": [ | ||
{ | ||
"path": "/", | ||
"destination": "http://frontend:8080" | ||
}, | ||
{ | ||
"path": "/backendapi", | ||
"destination": "http://backendapp:8080" | ||
} | ||
] | ||
}, | ||
"type": "Applications.Core/containers" | ||
}, | ||
{ | ||
"id": "/planes/radius/local/resourcegroups/default/providers/Applications.Core/containers/frontend", | ||
"name": "frontend", | ||
"properties": { | ||
"application": "/planes/radius/local/resourcegroups/default/providers/Applications.Core/Applications/myapp", | ||
"container": { | ||
"image": "magpie:latest", | ||
"readinessProbe": { | ||
"kind": "httpGet", | ||
"path": "/healthz", | ||
"containerPort": 8080 | ||
}, | ||
"ports": { | ||
"web": { | ||
"port": 8080, | ||
"protocol": "TCP" | ||
} | ||
} | ||
}, | ||
"connections": { | ||
"sql": { | ||
"source": "http://backendapp:8080" | ||
} | ||
}, | ||
"provisioningState": "Succeeded", | ||
"status": { | ||
"outputResources": { | ||
"id": "/some/thing/else", | ||
"localId": "something" | ||
} | ||
} | ||
}, | ||
"type": "Applications.Core/containers" | ||
}, | ||
{ | ||
"id": "/planes/radius/local/resourcegroups/default/providers/Applications.Core/containers/backendapp", | ||
"name": "backendapp", | ||
"properties": { | ||
"application": "/planes/radius/local/resourcegroups/default/providers/Applications.Core/Applications/myapp", | ||
"container": { | ||
"ports": { | ||
"web": { | ||
"port": 8080, | ||
"protocol": "TCP" | ||
} | ||
} | ||
}, | ||
"provisioningState": "Succeeded", | ||
"status": { | ||
"outputResources": { | ||
"id": "/some/thing/else", | ||
"localId": "something" | ||
} | ||
} | ||
}, | ||
"type": "Applications.Core/containers" | ||
} | ||
] |
53 changes: 53 additions & 0 deletions
53
pkg/corerp/frontend/controller/applications/testdata/graph-app-gw-out.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
[ | ||
{ | ||
"connections": [ | ||
{ | ||
"direction": "Outbound", | ||
"id": "/planes/radius/local/resourcegroups/default/providers/Applications.Core/containers/backendapp" | ||
}, | ||
{ | ||
"direction": "Inbound", | ||
"id": "/planes/radius/local/resourcegroups/default/providers/Applications.Core/gateways/httpgw" | ||
} | ||
], | ||
"id": "/planes/radius/local/resourcegroups/default/providers/Applications.Core/containers/frontend", | ||
"name": "frontend", | ||
"outputResources": [], | ||
"provisioningState": "Succeeded", | ||
"type": "Applications.Core/containers" | ||
}, | ||
{ | ||
"connections": [ | ||
{ | ||
"direction": "Inbound", | ||
"id": "/planes/radius/local/resourcegroups/default/providers/Applications.Core/containers/frontend" | ||
}, | ||
{ | ||
"direction": "Inbound", | ||
"id": "/planes/radius/local/resourcegroups/default/providers/Applications.Core/gateways/httpgw" | ||
} | ||
], | ||
"id": "/planes/radius/local/resourcegroups/default/providers/Applications.Core/containers/backendapp", | ||
"name": "backendapp", | ||
"outputResources": [], | ||
"provisioningState": "Succeeded", | ||
"type": "Applications.Core/containers" | ||
}, | ||
{ | ||
"connections": [ | ||
{ | ||
"direction": "Outbound", | ||
"id": "/planes/radius/local/resourcegroups/default/providers/Applications.Core/containers/backendapp" | ||
}, | ||
{ | ||
"direction": "Outbound", | ||
"id": "/planes/radius/local/resourcegroups/default/providers/Applications.Core/containers/frontend" | ||
} | ||
], | ||
"id": "/planes/radius/local/resourcegroups/default/providers/Applications.Core/gateways/httpgw", | ||
"name": "httpgw", | ||
"outputResources": [], | ||
"provisioningState": "Succeeded", | ||
"type": "Applications.Core/gateways" | ||
} | ||
] |